We can Hide parameter / select option in selection screen dynamically by manipulating screen object.
SCREEN is like an internal table with a header line. However, you do not have to declare it in your program. Go to debugging mode and then view structure of screen.
You can modify SCREEN in your ABAP program during the PBO event of a screen. Its contents override the static attributes of the screen fields for a single screen call. The only statements that you can use with SCREEN are:
LOOP AT SCREEN.
...
MODIFY SCREEN.
...
ENDLOOP.
We can hide parameter by set screen-active to 0.
Here is example of how to hide parameter in selection screen. Write it, and change click on radiobutton to hide parameter.
REPORT ZAALGAL0006.
DATA: d_ucomm LIKE sy-ucomm.
PARAMETERS: p_grpa1(10) MODIF ID A,
p_grpa2(5) MODIF ID A,
p_grpb1(2) MODIF ID B.
PARAMETERS: p_actA RADIOBUTTON GROUP rad1 USER-COMMAND ACT DEFAULT 'X',
p_actB RADIOBUTTON GROUP rad1.
AT SELECTION-SCREEN.
d_ucomm = sy-ucomm.
AT SELECTION-SCREEN OUTPUT.
LOOP AT screen.
IF p_actA = 'X'.
IF screen-group1 = 'B'.
screen-active = 0.
ENDIF.
ELSEIF p_actB = 'X'.
IF screen-group1 = 'A'.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY screen.
ENDLOOP.
START-OF-SELECTION.
Wednesday, July 25, 2007
Hide parameter / select option in selection screen
Diposting oleh alionzo di 12:30 AM
Label: ABAP Sample Code
Subscribe to:
Post Comments (Atom)
11 comments:
This bit really helped me... thanks a lot dude... u r a star. :)
Thanks a lot, helped me, too!
Proust from Munich
very clear and very good. Now where did I put the 12 sap help screens that didn't have this answer? Thanks dude.
Help a lot!!! Thanks
Obrigado!!!! from Brasil
That really helped me .3 cheers
Thanks for this...
Quick, simple and point blank...
Check out the select statement in ABAP here
Abap Community Forums
Modify screen,dynamic screen in module programming http://saptechnicals.blogspot.com/2013/04/modify-screen-in-module-programming.html
Thanks dear for sharing this nice information sravani
Thanks for the wonderful post.
-www.abapmadeeasy.com
Thanks for sharing valuable information through your post. The information provided is of great use.
SAP ABAP TRAINING IN HYDERABAD
Post a Comment