How to hide/show ABAP selection screen fields

Learn how to hide or show various fields on your SAP screen in this quick and simple tip.

With a little keebler magic, you can turn on/off (hide/show) fields on your program's selection screen. This makes...

your program dynamic to the user's input.

The ABAP code was written in 4.6B and should work on all live versions of R/3.

Define your parameter or selection-option field like so using the addition MODIF:

SELECT-OPTIONS s_pltyp FOR a606-pltyp NO INTERVALS NO-EXTENSION

MODIF ID prc.

In your code, this could be your logic:

AT SELECTION-SCREEN OUTPUT.

* User clicks the checkbox 'pipe'
  IF NOT pipe IS INITIAL.
* Don't allow input for these fields
    LOOP AT SCREEN.
      CASE screen-group1.
        WHEN 'PRC'.
          screen-input = '0'.
          screen-output = '0'.
          screen-invisible = '1'.
          MODIFY SCREEN.
      ENDCASE.
    ENDLOOP.
  ENDIF.

Next Steps

Get tips on SAP ABAP

Learn more about SAP ABAP internal tables

This was last published in January 2003

Dig Deeper on SAPscript and Smart Forms

PRO+

Content

Find more PRO+ content and other member only offers, here.

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

Have you run into issues setting up or modifying the SAP ABAP selection screen?
Cancel

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close