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 query

Former Member
0 Likes
812

Hi all,

I want to show a range 800000 to 900000 on selection screen. This field should be greyed out so that user can not change the value.

Can any body suggest how can I achieve this ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
782

Hi mayank,

1. Just copy paste to get a taste of it.



report abc.


DATA : NUM TYPE I.


SELECT-OPTIONS : SEL FOR NUM DEFAULT 800000 TO 900000.


*------------------------------------------
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME CS 'SEL'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.


regards,

amit m.

6 REPLIES 6
Read only

Former Member
0 Likes
783

Hi mayank,

1. Just copy paste to get a taste of it.



report abc.


DATA : NUM TYPE I.


SELECT-OPTIONS : SEL FOR NUM DEFAULT 800000 TO 900000.


*------------------------------------------
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME CS 'SEL'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.


regards,

amit m.

Read only

Former Member
0 Likes
782

hmmm like it seems it works, tho i dont see a reason to have something on a selection screen where no selections are possible.

Edited by: Florian Kemmer on Aug 18, 2008 11:53 AM

Read only

Former Member
0 Likes
782

hiii

you can use like below code

in initialization event you need to give values to select options

like

initialization.
s_val-low = '800000'.
s_val-high = '900000'.

append s_val.

at selection-screen.

if s_val-low and s_val-high is not initial.
loop at screen.
if screen-name CS 'S_VAL-LOW' and screen-name CS 'S_VAL-HIGH' .
screen-input EQ 0.
modify screen.
endif.
endloop.
endif.

regards

twinkal

Read only

Former Member
0 Likes
782

Hi Mayank,

Use AT SELECTION SCREEN event

Try the following code:

DATA : v_num TYPE i.

SELECT-OPTIONS : s_range FOR v_num DEFAULT 800000 TO 900000.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'S_RANGE'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Hope this will help.

Regards,

Nitin.

Read only

Former Member
0 Likes
782

Hi

Do you want to display it as parameter or select-option as an F4?

Regards,

Ramya

Read only

Former Member
0 Likes
782

Hi,

Check this sample code


REPORT  z_sdn.

DATA:
  w_num(5) TYPE n.

SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
SELECT-OPTIONS:
  s_num FOR w_num DEFAULT 80000 TO 90000 MODIF ID abc.

SELECTION-SCREEN END OF BLOCK blk.


AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-group1 EQ 'ABC'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Regards

Abhijeet