2008 Oct 08 3:22 PM
Hi all,
in my selection screen i have like below.
Parameters:P_EBELN type EBELN,
P_EBELP type EBELP.
now my requirement is, when i selected first select option(P_EBELN) the second select option(P_EBELP) should be invisible and vise versa. i don't have selection screen block. i can i do it. tell me with example.
2008 Oct 08 3:39 PM
Hi,
You could try something like this. By blanking out the visible parameter, the invisible one will reappear.
REPORT ztestjrg.
PARAMETERS: p_ebeln TYPE ebeln MODIF ID p1,
p_ebelp TYPE ebelp MODIF ID p2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'P1'.
IF p_ebelp IS NOT INITIAL AND p_ebeln IS INITIAL.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
WHEN 'P2'.
IF p_ebeln IS NOT INITIAL AND p_ebelp IS INITIAL.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
Best Regards,
Jamie
Edited by: James Gaddis on Oct 8, 2008 10:41 AM -- added code to prevent BOTH parameters from being invisible in case both have values entered.
Hi,
You could try something like this. By blanking out the visible parameter, the invisible one will reappear.
REPORT ztestjrg.
PARAMETERS: p_ebeln TYPE ebeln MODIF ID p1,
p_ebelp TYPE ebelp MODIF ID p2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'P1'.
IF p_ebelp IS NOT INITIAL AND p_ebeln IS INITIAL.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
WHEN 'P2'.
IF p_ebeln IS NOT INITIAL AND p_ebelp IS INITIAL.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
Best Regards,
Jamie
Edited by: James Gaddis on Oct 8, 2008 10:41 AM -- added code to prevent BOTH parameters from being invisible in case both have values entered.
2008 Oct 08 3:39 PM
Hi,
You could try something like this. By blanking out the visible parameter, the invisible one will reappear.
REPORT ztestjrg.
PARAMETERS: p_ebeln TYPE ebeln MODIF ID p1,
p_ebelp TYPE ebelp MODIF ID p2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'P1'.
IF p_ebelp IS NOT INITIAL AND p_ebeln IS INITIAL.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
WHEN 'P2'.
IF p_ebeln IS NOT INITIAL AND p_ebelp IS INITIAL.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
Best Regards,
Jamie
Edited by: James Gaddis on Oct 8, 2008 10:41 AM -- added code to prevent BOTH parameters from being invisible in case both have values entered.
2008 Oct 08 4:02 PM
This is similar to James' but demonstrates how you can control via radio button (or checkbox)
REPORT ZTEST .
parameters: p_chk_aa radiobutton group g1 default 'X' user-command dum,
p_ebeln type ebeln modif id aa,
p_chk_bb radiobutton group g1,
p_ebelp type ebelp modif id bb.
****************
at selection-screen output.
perform screen_adjust.
****************
form screen_adjust.
loop at screen.
case screen-group1.
when 'AA'.
if p_chk_aa is initial.
screen-active = 0.
else.
screen-active = 1.
endif.
modify screen.
when 'BB'.
if p_chk_bb is initial.
screen-active = 0.
else.
screen-active = 1.
endif.
modify screen.
endcase.
endloop.
endform.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |