Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Screen element Box length.

Former Member
0 Likes
598

Hi,

I created a screen and I am trying to group certain fields using the screen element box.

When I create that, the max length it allows is only 132 Chars. Is there any way to stretch it beyond that?

or is that a pre-defined max length? or Am I doing anything wrong?

Thanks and Regards,

Mahesh.

3 REPLIES 3
Read only

Former Member
0 Likes
487

hi,

max length =132 becoz

132-character ====1 line in SAPscript

The maximum permitted length of a parameter on the selection screen is 45 (scrollable up to length 132).

If you have defined it longer than this the parameter is truncated on the selection screen after the 132nd character.

By pre-setting arguments with POSITION and SIZE, you can work around the limitation on the length of a command. You do not need to specify the preset arguments in the BOX command.

With POSITION; you can adjust the position of a line or box relative to a window much more precisely.

In the POSITION command, you can specify positive and negative offsets and use non-integer numbers.

Example: The commands shown below position a box slightly to the left and slightly above a window.

This leaves a margin between the edge of the box and the text in the window.

/: POSITION XORIGIN u2019-.2u2019 CM YORIGIN u2019-.2u2019 CM

/: SIZE WIDTH u2019.2u2019 CM HEIGHT u2019.2u2019 CM

Regards

Jayapriya

Read only

Former Member
0 Likes
487

You would have to look into using the editor object.

Something along these lines


  IF container IS INITIAL.
    CREATE OBJECT container
       EXPORTING container_name = 'TEXT_CTRL'.

    CREATE OBJECT editor
       EXPORTING parent = container
           wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
           wordwrap_position = 80
           wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
  ENDIF.

  IF ok_0010 = 'DISP' OR ok_0010 = 'DELE'
  OR ( ok_0010 = 'CHAN' AND tax_edit EQ 'Y' ).
    CALL METHOD editor->set_readonly_mode
       EXPORTING readonly_mode = '1'.
  ELSE.
    CALL METHOD editor->set_readonly_mode
       EXPORTING readonly_mode = '0'.
  ENDIF.

* call method editor->set_text_as_stream
  CALL METHOD editor->set_text_as_r3table
        EXPORTING table   = text_130.

Read only

0 Likes
487

Hi,

Thanks a lot....

I will look into that....

Thanks and Regards,

Mahesh.