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

selection-screen

Former Member
0 Likes
1,211

Hey ,

i have a select-option in the selection screen of character type.

eg: data: s_char(100).

selection-screen: begin of block 1.

select-option: s_fld for s_char.

selection-screen: end of block 1.

but this s_fld is accepting only 45 characters. but not 100 characters.

what shld i do to get 100 characters... pls tell... will be rewarded....

thaks in adv

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
775

Hi,

Change your code this way


data: s_char(100).

selection-screen: begin of block 1.

parameters: s_fld like s_char visible length 25.

selection-screen: end of block 1.

aRs

4 REPLIES 4
Read only

Former Member
0 Likes
775

Hi,

It is not possible to make more than 45 charachters in selection screen instead you can use Submit Via selection screen.

The LOW and HIGH fields of a selection option are displayed in a length up to 18 bytes long (scrollable up to 45 bytes). If you define a length longer than 45, fields are truncated on the selection screen after the 45th character. This affects the first line of the SELECT-OPTIONS table. You can, however, use SUBMIT to pass longer selection options to a report if they are specified with the addition NO-DISPLAY and thus do not appear on the selection screen. Without NO-DISPLAY, the fields are then truncated whenever the selection screen is processed in the background ( SUBMIT without VIA SELECTION-SCREEN).

<b>Reward if helpful.</b>

Read only

former_member194669
Active Contributor
0 Likes
776

Hi,

Change your code this way


data: s_char(100).

selection-screen: begin of block 1.

parameters: s_fld like s_char visible length 25.

selection-screen: end of block 1.

aRs

Read only

0 Likes
775

Interesting question, and not something I'd noticed before. The 45 character limit for the "select-options" appears to be embedded within the "generate report" command that compiles your report code and automatically creates the dynpro for the selection screen (typically 1000) .

If you view the program through SE80, you could then edit the selection-screen directly and manually change this... but of course it will get overwritten again when you regenerate the screen (you'll probably get a warning to this effect). Plus there are some places where you only get 45 characters showing e.g. displaying the variant contents... (this looks to be because the LOW & HIGH values in the RSPARAMS structure are only 45 characters long), so I'd caution against doing this manually.

Read only

0 Likes
775

And the limit of 45 characters is documented in SAP help for the SELECT-OPTIONS statement:

"Two input fields with the name selscrit-low and selscrit-high are created on the current selection screen using a matching external data type in a new line at positions 35 and 60. The length of the input fields bases upon the length of the data type which is defined after FOR. The maximum length of the input fields is 45. The maximum visible length of the input fields is, depending on the nesting depth, in blocks with frames between 10 and 18. If the length is larger than the maximum visible length, then the content is scrollable."

But then, who reads documentation anyway.

Andrew