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: 

Hide input control in a screen

Former Member
0 Kudos

I have a SAP screen, with several input elements (those boxes you can write in).

I want to hide some of them based on runtime conditions. Can it be done?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Suppose the name of your control is name1.

Try following code.

Loop at screen.

if screen-name = 'name1'.

screen-invisible = 1.

screen-active = 0.

modify screen.

endif.

endloop.

This will hide the control name1.

Hope it helps.

Regards,

Shashank

4 REPLIES 4

Former Member
0 Kudos

Hi,

Suppose the name of your control is name1.

Try following code.

Loop at screen.

if screen-name = 'name1'.

screen-invisible = 1.

screen-active = 0.

modify screen.

endif.

endloop.

This will hide the control name1.

Hope it helps.

Regards,

Shashank

vinod_gunaware2
Active Contributor
0 Kudos

Hi

Use Loop at screen.

Screen-Active = '0/1'

Screen-Input = '0/1'.

Modify screen.

Endloop.

regards

vinod

0 Kudos

Hi,

Yes you can do that. For doing that you need to check if that screen has a screen variant(find it in SPRO) or else create a screen variant using the transaction shd0.

Hope this helps.

Regards,

ND

Former Member
0 Kudos

hi,

PARAMETER : SCR RADIOBUTTON GROUP RAD2 DEFAULT 'X' USER-COMMAND RADIO .

AT SELECTION-SCREEN OUTPUT.

IF SCR NE 'X' .

LOOP AT SCREEN.

IF SCREEN-GROUP4 = '004' OR

SCREEN-GROUP4 = '005' OR

SCREEN-GROUP4 = '006' .

SCREEN-INPUT = '0'.

SCREEN-ACTIVE = '0'.

  • SCREEN-ACTIVE = '1'.

  • SCREEN-INVISIBLE = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

try this.

Reg,

Visu