Application Development 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: 

how to use at selection-screen output

Former Member
0 Kudos

Hi,

How to use "at selection-screen output" event for disabling input of certain fields.

Please explain with easy example.

Thanks,

Mahathi

6 REPLIES 6

Former Member
0 Kudos

PARAMETER: p_fname TYPE rlgrap-filename MODIF ID md1.

At selection-screen output.

LOOP AT SCREEN.

IF screen-group EQ 'MD1' and p_app EQ 'X'.

screen-active = 0.

MODIFY SCREEN.

ENDIF

ENDLOOP.

Hope this helps

Former Member
0 Kudos

if check box parameter p_app is selected,

thsi will disable the file name parameter

Former Member
0 Kudos

Hi Mahathi,

Check this sample code and make due mkodifications for your requirement,

PARAMETERS : p_c1 RADIOBUTTON GROUP r1 USER-COMMAND m1.

PARAMETERS : p_c2 RADIOBUTTON GROUP r1 DEFAULT 'X'.

PARAMETERS : p_1(10) TYPE c.

PARAMETERS : p_2(10) TYPE c.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_c1 = 'X'.

IF screen-name = 'P_2'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ELSEIF p_c2 = 'X'.

IF screen-name = 'P_1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

<b>Kindly reward points if you found the reply helpful.<b>

Cheers,

Chaitanya.

Former Member
0 Kudos

Check the below code.

tables: pa0000, pa0001.

parameters: p_chk1 as checkbox user-command rusr,

p_chk2 as checkbox user-command rusr,

p_chk3 as checkbox user-command rusr,

p_chk4 as checkbox user-command rusr,

p_chk5 as checkbox user-command rusr.

selection-screen: begin of block blk1 with frame.

select-options: s_pernr for pa0000-pernr modif id ABC,

s_stat2 for pa0000-stat2 modif id DEF,

s_werks for pa0001-werks modif id GHI,

s_persg for pa0001-persg modif id JKL,

s_persk for pa0001-persk modif id MNO.

selection-screen: end of block blk1.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'ABC'.

IF p_chk1 = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'DEF'.

IF p_chk2 = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'GHI'.

IF p_chk3 = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'JKL'.

IF p_chk4 = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'MNO'.

IF p_chk5 = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

*************************************

*Note

*Titles for check boxes and select options

*P_CHK1 Personal Number

*P_CHK2 Employment Status

*P_CHK3 Personnel Area

*P_CHK4 Employee Group

*P_CHK5 Employee Sub group

*S_PERNR Personal Number

*S_PERSG Employee Group

*S_PERSK Employee Sub group

*S_STAT2 Employment Status

*S_WERKS Personnel Area

<b>Reward if useful.</b>

former_member386202
Active Contributor
0 Kudos

Hi,

Refer this code

----


  • PARAMETERS & SELECT-OPTIONS *

----


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-011.

PARAMETERS : p_pay1 RADIOBUTTON GROUP grp USER-COMMAND fc DEFAULT 'X',

p_pay2 RADIOBUTTON GROUP grp.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.

SELECT-OPTIONS : s_pernr FOR pa0000-pernr. "Personnel Number

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (31) text-018.

PARAMETERS : p_begda LIKE pa0000-begda OBLIGATORY. "Start Date

SELECTION-SCREEN COMMENT 52(05) text-019.

PARAMETERS : p_endda LIKE pa0000-endda OBLIGATORY. "End Date

SELECTION-SCREEN END OF LINE.

SELECT-OPTIONS : s_stat2 FOR pa0000-stat2, "Status

s_werks FOR pa0001-werks, "Personnel Area

s_raufnr FOR catsdb-raufnr MODIF ID md1. "Internal Order Number

SELECTION-SCREEN END OF BLOCK b2.

----


  • AT SELECTION-SCREEN *

----


AT SELECTION-SCREEN OUTPUT.

IF p_pay1 EQ 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'MD1'.

screen-active = '1'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF p_pay2 EQ 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'MD1'.

screen-active = '1'.

screen-input = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Regards,

Prashnat

Former Member
0 Kudos

Hi mahathi,

try this.

parameters p_name(10).

at selection-screen output.

loop at screen.

if screen-name cp 'p_name'.

screen-input = 0.

modify screen.

endif.

endloop.

Plz Reward if useful,

Mahi.