Skip to Content
avatar image
Former Member

Hide input control in a screen

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?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 07, 2006 at 10:07 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 07, 2006 at 10:17 AM

    Hi

    Use Loop at screen.

    Screen-Active = '0/1'

    Screen-Input = '0/1'.

    Modify screen.

    Endloop.

    regards

    vinod

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Apr 07, 2006 at 10:48 AM

    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

    Add comment
    10|10000 characters needed characters exceeded