05-06-2006 7:22 PM
hi frnds
my requiremnet is
i have got 2 radion buttons . rd1 and rd2 . if i select rd1 then my first block gets activated for salesorder and if rd2 then my 2nd block gets activated for purchase order . and thereafter i have to print the detailed list for the block selected . has any body got the coding of this report as this is a very common report .
thanks
rohit
05-06-2006 7:35 PM
Rohit,
I am giving you here an example for activating/deactivating 1 of 2 parameters based on radio-button chosen. Replicate this in your code for the parameters you want:
tables: mara.
select-options: s_matnr for mara-matnr modif id MD1 ,
s_mtart for mara-mtart modif id MD2.
Parameters: rb_1 radiobutton group grp user-command ucomm default 'X',
rb_2 radiobutton group grp.
at selection-screen output.
loop at screen.
case screen-group1.
when 'MD1'.
if rb_1 = 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
when 'MD2'.
if rb_2 = 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
endcase.
endloop.
05-06-2006 7:35 PM
Rohit,
I am giving you here an example for activating/deactivating 1 of 2 parameters based on radio-button chosen. Replicate this in your code for the parameters you want:
tables: mara.
select-options: s_matnr for mara-matnr modif id MD1 ,
s_mtart for mara-mtart modif id MD2.
Parameters: rb_1 radiobutton group grp user-command ucomm default 'X',
rb_2 radiobutton group grp.
at selection-screen output.
loop at screen.
case screen-group1.
when 'MD1'.
if rb_1 = 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
when 'MD2'.
if rb_2 = 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
endcase.
endloop.
05-06-2006 8:59 PM
Hi Rohit,
try this..
PARAMETERS: rad1 RADIOBUTTON GROUP rad USER-COMMAND radio,
rad2 RADIOBUTTON GROUP rad,
SELECTION-SCREEN BEGIN OF BLOCK PART1 WITH FRAME.
PARAMETERS: NUMBER1 TYPE I modif id ID,
NUMBER2 TYPE I modif id ID,
NUMBER3 TYPE I modif id ID.
SELECTION-SCREEN END OF BLOCK PART1.
SELECTION-SCREEN BEGIN OF BLOCK PART1 WITH FRAME.
PARAMETERS: NUMBER4 TYPE I modif id ID1,
NUMBER5 TYPE I modif id ID1,
NUMBER6 TYPE I modif id ID1.
SELECTION-SCREEN END OF BLOCK PART1.
at selection-screen output.
loop at screen.
case screen-group1.
when 'ID'.
if rad1 = 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
when 'ID1'.
if rad2 = 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
endcase.
endloop.
Regards,
Tanveer.
<b>Please mark helpful answers</b>