2011 Feb 08 4:56 AM
Hi experts,
In my report program i have 2 radio button in one block and another block i have 2 input paramters. If i select 2nd radio button the 2nd block should hide. But its not working for me, any one guide this.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_werks TYPE t001w-werks OBLIGATORY,
r_amn RADIOBUTTON GROUP r1 DEFAULT 'X' ,
r_mnc RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002 .
PARAMETERS : p_run TYPE kala-kalaid MODIF ID SC1.
PARAMETERS : p_date TYPE keko-kaladat MODIF ID SC1.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
IF r_mnc = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Mohana
2011 Feb 08 5:12 AM
HI,
Use user command option of radio button.
Try this,
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_werks TYPE t001w-werks OBLIGATORY,
r_amn RADIOBUTTON GROUP r1 USER-COMMAND cop DEFAULT 'X' ," any 3 char function code
r_mnc RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002 .
PARAMETERS : p_run TYPE kala-kalaid MODIF ID SC1.
PARAMETERS : p_date TYPE keko-kaladat MODIF ID SC1.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
IF r_mnc = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
thanks
arun
Hi experts,
In my report program i have 2 radio button in one block and another block i have 2 input paramters. If i select 2nd radio button the 2nd block should hide. But its not working for me, any one guide this.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_werks TYPE t001w-werks OBLIGATORY,
r_amn RADIOBUTTON GROUP r1 DEFAULT 'X' ,
r_mnc RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002 .
PARAMETERS : p_run TYPE kala-kalaid MODIF ID SC1.
PARAMETERS : p_date TYPE keko-kaladat MODIF ID SC1.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
IF r_mnc = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Mohana
2011 Feb 08 5:12 AM
HI,
Use user command option of radio button.
Try this,
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_werks TYPE t001w-werks OBLIGATORY,
r_amn RADIOBUTTON GROUP r1 USER-COMMAND cop DEFAULT 'X' ," any 3 char function code
r_mnc RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002 .
PARAMETERS : p_run TYPE kala-kalaid MODIF ID SC1.
PARAMETERS : p_date TYPE keko-kaladat MODIF ID SC1.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
IF r_mnc = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
thanks
arun
2011 Feb 08 5:33 AM
Hi,
I am sending the following code.You can change the code according to your program.
selection-screen begin of block blck2 with frame title text-002.
parameters: rb1 radiobutton group rb1 user-command sel default 'X'.
parameters: rb2 radiobutton group rb1.
selection-screen end of block blck2.
selection-screen: begin of block b2 with frame title text-003.
parameters:
rb21 radiobutton group rb11 user-command sel1 default 'X' modif id rb2,
rb22 radiobutton group rb11 modif id rb2.
selection-screen: end of block b2.
at selection-screen output.
if rb1 = 'X'.
perform hide_rb2_options.
else.
perform hide_rb1_options.
endif.
form hide_rb2_options.
loop at screen.
case screen-group1.
when 'RB1'.
screen-active = 1.
modify screen.
when 'RB2'.
screen-active = 0.
modify screen.
endcase.
endloop. " LOOP AT SCREEN
endform. " hide_rb2_options
form hide_rb1_options.
loop at screen.
case screen-group1.
when 'RB2'.
screen-active = 1.
modify screen.
when 'RB1'.
screen-active = 0.
modify screen.
endcase.
endloop. " LOOP AT SCREEN
endform. " hide_rb1_options
It is working fine in my program.Please check it.
Regards,
Suvajit.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |