‎2007 Sep 04 9:38 AM
Dear gurus,
Is there any way to hide fields on screen without using loop at screen statement? There are too many fields on the screen and it would take a lot of time to loop through them.
Thanks in advance.
‎2007 Sep 04 9:47 AM
Hi...
1. Assign the Screen fields to Modification group (in the Screen painter field attributes)
Then in the PBO module.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INVISIBLE = 1.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
this will give a better performance of LOOP.
<b>reward if Helpful</b>
‎2007 Sep 04 9:42 AM
SELECT-OPTIONS S_PTYPE FOR SAPLANE-PLANETYPE <b>NO-DISPLAY</b>.
‎2007 Sep 04 9:48 AM
Hi Prashant,
I believe I mentioned screen not selection screen. The field is a dictionary field.
Thanks.
‎2007 Sep 04 9:47 AM
Hi...
1. Assign the Screen fields to Modification group (in the Screen painter field attributes)
Then in the PBO module.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INVISIBLE = 1.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
this will give a better performance of LOOP.
<b>reward if Helpful</b>
‎2007 Sep 04 9:50 AM
@Varma,
That would definitely improve performance, but can't it be done without the 'LOOP AT SCREEN' statement???
Thanks.
‎2007 Sep 04 10:03 AM
Hi Sanjay..
If you want to Hide the fields only during runtime based on the Condition then it is must to use the LOOP...
<b>reward if Helpful..</b>
‎2007 Sep 04 9:48 AM
You can use MODIF-ID
E.g.
PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p1 TYPE c LENGTH 10,
p2 TYPE c LENGTH 10,
p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: p4 TYPE c LENGTH 10 MODIF ID bl2,
p5 TYPE c LENGTH 10 MODIF ID bl2,
p6 TYPE c LENGTH 10 MODIF ID bl2.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF show_all <> 'X' AND
screen-group1 = 'BL2'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Please reward points if useful.
Regards,
Taranam