01-04-2005 6:53 AM
Hello everyone,
In my Report program I have two option buttons and two field parameters. The fields for my field parameter will correspond with the two option button I created. Meaning, when I choose option one, the reference fields for my field parameters will be from table1 else it will be from table2. Is this possible?
Thanks a lot,
Jeff
01-04-2005 6:58 AM
I dont think its possible. but you have have two set of parameters and based on option hide or unhide the selection-screen blocks .
Regards
Raja
01-04-2005 6:58 AM
I dont think its possible. but you have have two set of parameters and based on option hide or unhide the selection-screen blocks .
Regards
Raja
01-04-2005 7:10 AM
Hi Jeffrey,
I think this is possible. This is a small code snippet. Try out and let me know, if I am way tangent here.
SELECTION-SCREEN BEGIN OF BLOCK blk.
PARAMETERS : p_rb1 TYPE c RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND FC,
p_rb2 TYPE c RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK blk.
SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME.
PARAMETERS : p_werks1 TYPE werks_d MODIF ID bk1.
SELECTION-SCREEN END OF BLOCK blk_1.
SELECTION-SCREEN BEGIN OF BLOCK blk_2 WITH FRAME.
PARAMETERS : p_werks2 TYPE werks_d MODIF ID bk2,
p_matnr2 TYPE matnr MODIF ID bk2.
SELECTION-SCREEN END OF BLOCK blk_2.
AT SELECTION-SCREEN OUTPUT.
IF p_rb1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'BK1'.
screen-active = 0.
MODIFY SCREEN.
ELSE.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'BK2'.
screen-active = 0.
MODIFY SCREEN.
ELSE.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Subramanian V.
01-04-2005 7:18 AM
Let me re-phrase my answer.
You cannot change the reference of a parameter at runtime.
But you can have two set of parameters with different references and hide/unhide them based on the option selected.
Regards
Raja
01-04-2005 11:55 AM
Hello Subramanian,
The code you gave is totally Awesome!!!
Thanks a lot for the info.
You guys are a real GURU!
It's been a pleasure being a member in
this community!
Thanks,
Jeff
01-04-2005 7:48 AM