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

Select-option length specification (in report program, not module pool)

former_member367551
Participant
0 Likes
3,023

Dear forumers,

Is there a way to properly customize the length of a select-option in a report program?

Currently, the select-option S_ADMAIL is shown in the selection screen at a length of 18 characters. No matter what I've coded, this length does not change. The requirement states for the length to be shown at 40 characters long:-

Admin Email (type STRING showing up to 40 char on screen)

How may I fix the select-option's visible length to 40 characters?

DATA: v_admail TYPE string.   " Tried with TYPE CHAR40 too

SELECT-OPTIONS: s_admail FOR (v_admail) NO INTERVALS VISIBLE LENGTH 40.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name CS 'S_ADMAIL'.
      screen-length = 40.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Perhaps there is an FM that can accomplish this (but I'm not sure what it is)? Please do help. Thanks a lot.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,417

Dear Tan,

Tables : makt.

select-options maknr for makt-maktx.

now go to the screen painter of your program in change mode and move the Help buttons first to the Right each. now *increasethe length of the Matnr Field length so that they are equal to 40 Char. in your program you have handle the length now if you want to restrict to 18 otherwise it will be ok*

if they don't fit you need incease the Size of the Screen Visible area both in the Screen Painter as well as in the

Screen Attributes

You also get an Information Message just ignore that.

Just open your program in SE80 if you can't go to the screen painter in SE38. the other way just keep this program in Display mode and execute then take F1 help , take Technical Information and double click on the Screen number now go to the Screen Layout and go to Change mode here.

Hope this is Very Clear to you.

I just did it

Cheers

Ram

Edited by: Ramchander Krishnamraju on Oct 27, 2009 10:39 AM

Edited by: Ramchander Krishnamraju on Oct 27, 2009 10:46 AM

8 REPLIES 8
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,417

This will allow 40 characters as input.

data:l_in type char40.

SELECT-OPTIONS:so_input for l_in.

Read only

0 Likes
1,417

Keshu,

I need to have it displayed in the selection screen as 40 characters long. How may I do this?

There are no issues about the input length.

Read only

0 Likes
1,417

Documentaion for visible length

This addition defines a visible length of vlen for the input fields, where vlen must be specified directly as a positive number. If vlen is shorter than the length of columns low and high in the selection table and shorter than the maximum visible length, the input field is displayed at a length of vlen and the entry can be scrolled. Otherwise, the addition is ignored.

Hope you got it

Read only

Former Member
0 Likes
1,417

Hi,

The visible length cannot be changed beyond the maximum allowed as the select options occupy fixed postions predetermined in the selection screen by standard.

Vikranth

Read only

Former Member
0 Likes
1,417

Hi,

in select-options u cannot set like that...see extract from std keyword documentation:

"Two input fields with the name selcrit-low and selcrit-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. "

What you can do is use:

PARAMETERS: p_x TYPE string VISIBLE LENGTH 40.

Read only

Former Member
0 Likes
1,417

HI ,

You declare the select option as follows..

SELECT-OPTIONS: s_admail FOR v_admail VISIBLE LENGTH 40.

may be it work

Thanks

Shambhu

Read only

Former Member
0 Likes
1,418

Dear Tan,

Tables : makt.

select-options maknr for makt-maktx.

now go to the screen painter of your program in change mode and move the Help buttons first to the Right each. now *increasethe length of the Matnr Field length so that they are equal to 40 Char. in your program you have handle the length now if you want to restrict to 18 otherwise it will be ok*

if they don't fit you need incease the Size of the Screen Visible area both in the Screen Painter as well as in the

Screen Attributes

You also get an Information Message just ignore that.

Just open your program in SE80 if you can't go to the screen painter in SE38. the other way just keep this program in Display mode and execute then take F1 help , take Technical Information and double click on the Screen number now go to the Screen Layout and go to Change mode here.

Hope this is Very Clear to you.

I just did it

Cheers

Ram

Edited by: Ramchander Krishnamraju on Oct 27, 2009 10:39 AM

Edited by: Ramchander Krishnamraju on Oct 27, 2009 10:46 AM

Read only

0 Likes
1,417

Thanks so much for all the helpful explanations given. It's clearer now.

The requirement has also been changed as multiple values are needed (if single value - a parameter can be used instead). So I'll be sticking to the select-option and the requirement on the visible length of 40 has been removed as well.

Ramchander, I tried out your solution and it works well too! THANKS!

Edited by: Deborah Tan on Oct 29, 2009 10:07 AM