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 hide the fields in the selection screen

Former Member
0 Kudos

hi please let me know how to keep hide the fileds in the selection screen i.e in display mode, for the condition

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

go throught this code, it solves u'r doubt.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.

PARAMETERS: p_werks LIKE mseg-werks DEFAULT 'CP01' MODIF ID m1 .

SELECTION-SCREEN: END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'M1' .

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

<b>please reward points if helpfull.</b>

with regards,

radhika kolluru.

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
at selection-screen output.

  loop at screen.
     if screen-name = 'SOME_FIELD'.
        screen-active = '0'.
        modify screen.
     endif.
  endloop.

Regards,

Rich Heilman

Former Member
0 Kudos

hi,

use no-display option.

thanks

0 Kudos

hi,

for example:-

select-option: lgort FOR t001l-lgort NO-DISPLAY.

reward points if useful

thanks.

Former Member
0 Kudos

hi,

go throught this code, it solves u'r doubt.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.

PARAMETERS: p_werks LIKE mseg-werks DEFAULT 'CP01' MODIF ID m1 .

SELECTION-SCREEN: END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'M1' .

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

<b>please reward points if helpfull.</b>

with regards,

radhika kolluru.

Former Member
0 Kudos

Hi Sudhir,

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