Q
Problem solve Get help with specific problems with your technologies, process and projects.

How can I display a selection screen based on a TCode?

How can I display a selection screen based on a TCode? For example, an Include name ZUXGARE contains these selection screen statements:

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-020.

PARAMETERS PRM_BUKR LIKE T001-BUKRS MEMORY ID BUK OBLIGATORY.

PARAMETERS PRM_WRK LIKE T001W-WERKS MEMORY ID WRK OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B2.

SELECTION-SCREEN SKIP 1.

selection-screen begin of block REBATE with frame title text-021.

PARAMETERS: Yes radiobutton group R1,

No radiobutton group R1.

selection-screen end of block REBATE.

I have used this Include program in two programs TCode ZTCODE1 and ZTCODE2 respectively. As per my requirement Block REBATE should be displayed only in TCode ZTCODE2.

In the AT SELECTION-SCREEN OUTPUT event, code a LOOP AT SCREEN, setting SCREEN-OUTPUT to 0, for the appropriate fields, when SY-TCODE is equal to 'ZTCODE2'.

Don't forget to MODIFY SCREEN in the LOOP, after you have changed the attributes.

Dig Deeper on SAP ABAP

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchContentManagement

SearchHRSoftware

Close