01-18-2008 4:55 PM
Hi Experts,
I am facing a problem with selection-screen.
I my selection-screen there is a check box. When this check box is checked an other parameter will be appeared on the screen. But when this check box is unselected this parameter is not disappearing on the screen.
I have used the below code in my program in event AT SELECTION-SCREEN OUTPUT
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) TEXT-M00 . "Local Language
PARAMETERS : P_LOCALL AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS:
S_N_TEXT FOR TSADVT-NATION_TEX NO INTERVALS OBLIGATORY MODIF ID LNG.
AT SELECTION-SCREEN OUTPUT.
IF NOT P_LOCALL IS INITIAL.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = C_LNG.
SCREEN-INVISIBLE = C_N_0.
SCREEN-INPUT = C_N_1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = C_LNG.
SCREEN-INVISIBLE = C_N_1.
SCREEN-INPUT = C_N_0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Can any tell me how to resolve the problem.
01-18-2008 5:01 PM
01-18-2008 5:03 PM
hi,
modify:
PARAMETERS : P_LOCALL AS CHECKBOX USER-COMMAND uc01.
replace this:
IF NOT P_LOCALL IS INITIAL.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = C_LNG.
SCREEN-INVISIBLE = C_N_0.
SCREEN-INPUT = C_N_1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = C_LNG.
SCREEN-INVISIBLE = C_N_1.
SCREEN-INPUT = C_N_0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
with:
LOOP AT screen.
IF SCREEN-GROUP1 = 'LNG'.
IF p_locall IS INITIAL.
screen-active = '0'.
ELSE.
screen-active = '1'.
ENDIF.
MODIFY screen.
ENDIF.
ENDLOOP.
hope this helps
ec
01-18-2008 9:54 PM
Hi Raghvendra,
Try the following code which is kind of modified version of the previous post. Use event AT SELECTION-SCREEN and not AT SELECTION-SCREEN OUTPUT as it gets triggerred only once (PBO).
See below:
PARAMETERS : P_LOCALL AS CHECKBOX USER-COMMAND UC01.
AT SELECTION-SCREEN. "put your code under this event
LOOP AT screen.
IF SCREEN-GROUP1 = 'LNG'.
IF sy-ucomm eq 'UC01'. "only for the checkbox clicking
IF p_locall IS INITIAL.
screen-active = '0'.
ELSE.
screen-active = '1'.
ENDIF.
ENDIF.
MODIFY screen.
ENDIF.
ENDLOOP.
Hope this helps.
Thanks
Sanjeev