09-24-2008 9:07 AM
Hi Guys,
we have a customized selection program similar to RSNAST00. In that while maintaining the variant when the users enter values other than say "ZABC " in output type field (KSCHL) and press enter certain fields in the screen should not be available for input. I have written this event which is getting trigerred but no changes are done to the screen
AT SELECTION-SCREEN ON S_KSCHL.
LOOP AT SCREEN.
IF screen-group1 = 'SHP'.
IF s_kschl-low NE 'ZABC'.
SCREEN-INPUT = '1'.
ELSE.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN .
ENDIF.
ENDLOOP
Can anyone please advice me how to achieve this.
Thanks
Krithika
09-24-2008 9:11 AM
Hi,
Try this.
AT SELECTION-SCREEN ON S_KSCHL.
IF s_kschl-low NE 'ZABC'.
LOOP AT SCREEN.
IF screen-group1 = 'SHP'.
SCREEN-INPUT = '1'.
MODIFY SCREEN .
ENDLOOP.
else.
LOOP AT SCREEN.
IF screen-group1 = 'SHP'.
SCREEN-INPUT = '0'.
MODIFY SCREEN .
ENDLOOP.
endif.
Sharin.
09-24-2008 9:11 AM
Hi,
Try this.
AT SELECTION-SCREEN ON S_KSCHL.
IF s_kschl-low NE 'ZABC'.
LOOP AT SCREEN.
IF screen-group1 = 'SHP'.
SCREEN-INPUT = '1'.
MODIFY SCREEN .
ENDLOOP.
else.
LOOP AT SCREEN.
IF screen-group1 = 'SHP'.
SCREEN-INPUT = '0'.
MODIFY SCREEN .
ENDLOOP.
endif.
Sharin.
09-24-2008 9:14 AM
Do it in the PBO not PAI of the selection screen, that is use
AT SELECTION-SCREEN OUTPUT event
like
Data:
w_kschl type kschl.
Select-options:
s_kschl for w_kschl.
Parameters:
char(5)." modif id shp.
AT SELECTION-SCREEN OUTPUT.
IF s_kschl-low NE 'ZABC' and s_kschl-low is not initial..
LOOP AT SCREEN.
IF screen-name CS 'CHAR'.
SCREEN-INPUT = 0.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
ENDIF.
With luck,
Pritam.
09-24-2008 9:15 AM
This should be done at at selection-screen output event.
AT SELECTION-SCREEN OUTPUT. "It is OUTPUT
LOOP AT SCREEN.
IF screen-group1 = 'SHP'.
IF s_kschl-low NE 'ZABC'.
SCREEN-INPUT = '1'.
ELSE.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN .
ENDIF.
ENDLOOP
09-24-2008 2:52 PM
Hi
AT SELECTION-SCREEN OUTPUT.
if S_KSCHL is intial or S_KSCHL ne ZABC.
LOOP AT SCREEN.
IF screen-group1 EQ 'NAM'.
screen-active = 0.
MODIFY SCREEN.
ENDIF. " IF screen-group1..
ENDLOOP. " Loop at screen..
ELSE.
LOOP AT SCREEN.
IF screen-group1 EQ 'NAM'.
screen-active = 1.
MODIFY SCREEN.
ENDIF. " IF screen-group1..
ENDLOOP. " Loop at screen..
Regards,
Sravanthi
09-24-2008 5:29 PM
Hi Krithika,
Recently 3 days before i have posted the same question and i got the solution which i am sharing you. I am having a drop box input field where if i select NO from the dropdown then automatically concern fields has to be disabled.
In PBO
IF ZFORMA-CISWK = 'NO'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'ZFORMA-YISWK'. "field will become inactive
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
In PAI
IF ZFORMA-CISWK = 'YES'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'ZFORMA-YISWK'. "field will be active
SCREEN-INPUT = 1.
SCREEN-ACTIVE = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
It is work with me fine.
Hope my answer will help you.
Cheers!!
09-25-2008 8:42 AM
Thank you so much guys all your answers were very helpful. Rewarded everyone.
09-25-2008 8:42 AM