ABAP Program to add Dynamic Parameter Text on Selection-Screen

1
474

We can also display the Dynamic Parameter Text for the parameters in the selection screen. In this context, we have to use %_parameter_%_APP_%-TEXT to pass value to the parameter text at runtime/dynamically.

Display Dynamic Parameter Name
Display Dynamic Parameter Name
Code Snippet to show dynamic parameter text 
*———————————————————————
*Shows how to give the selection screen parameter name by
*  using coding
*———————————————————————
REPORT  ZTEST_DY_PARA_NAME.
DATA: w_carrid TYPE sflight-carrid.
*** Selection Screen
SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE aaa.
SELECT-OPTIONS:   s_carrid FOR w_carrid.
SELECTION-SCREEN: END   OF BLOCK blk1.
INITIALIZATION.
* Description for the parameter  
if sy-uname = ‘ABAPTUTORIALS’.    
%_s_carrid_%_app_%-text = ‘Carrier ID’.  
else.    
%_s_carrid_%_app_%-text = ‘Flight ID’.  
endif. 

1 COMMENT

LEAVE A REPLY