‎2009 Mar 21 5:09 AM
Hi Experts,
In the selection-screen, i have 2 radiobuttons .
parameters : rb1 radiobutton group g2 ,
rb2 radiobutton group g2 .
and 4 input fields.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR. " OBLIGATORY.
SELECT-OPTIONS : S_MTART FOR MARA-MTART NO INTERVALS NO-EXTENSION.
SELECT-OPTIONS : S_WERKS FOR MARA-MATNR NO INTERVALS NO-EXTENSION.
parameters : lifnr like lfa1-lifnr .
Now my requirement is when i execute the report by default the 1st radiobutton is selected. For this radiobutton,
i want to display only the first 3 select-options. And when the user clicks on the second radiobutton,
the parameter LIFNR should appear without pressing enter button. Again when the user clicks on
1st radiobutton the parameter field LIFNr should not appear.
Please can anybod yrpovide the code.
Thanks in advance.
‎2009 Mar 21 5:30 AM
Hi,
Test the Code Bellow it is working as per your requirement,
TABLES: mara.
PARAMETERS : rb1 RADIOBUTTON GROUP g2 USER-COMMAND a DEFAULT 'X',
rb2 RADIOBUTTON GROUP g2 .
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_matnr FOR mara-matnr MODIF ID s1. " OBLIGATORY.
SELECT-OPTIONS : s_mtart FOR mara-mtart NO INTERVALS NO-EXTENSION MODIF ID s1.
SELECT-OPTIONS : s_werks FOR mara-matnr NO INTERVALS NO-EXTENSION MODIF ID s1.
SELECTION-SCREEN END OF BLOCK a.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
PARAMETERS : lifnr LIKE lfa1-lifnr MODIF ID s2.
SELECTION-SCREEN END OF BLOCK b.
BREAK-POINT.
AT SELECTION-SCREEN OUTPUT.
IF rb1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'S2'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF rb2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'S1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Best Regards,
Faisal
‎2009 Mar 21 5:14 AM
hi,
Parameters: R1 radiobutton group rd1 default 'X' user-command ucomm,
R2 radiobutton group rd1.
Selection-screen begin of block b1.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR. " OBLIGATORY.
SELECT-OPTIONS : S_MTART FOR MARA-MTART NO INTERVALS NO-EXTENSION.
SELECT-OPTIONS : S_WERKS FOR MARA-MATNR NO INTERVALS NO-EXTENSION.
PARAMETERS: LIFNR LIKE lfa1-lifnr MODIF ID ab.
Selection-screen End of block b1 .
at selection-screen output.
Loop at screen.
If R1 = 'X'. " When 1st radio button is selected
If Screen-group1 = 'AB'.
Screen-active = 0.
endif.
endif.
modify screen.
endloop.Regards
Sharath
‎2009 Mar 21 6:10 AM
Thanks a lot experts.
But my requirement is that i dont want to press the Enter button, as soon as the user clicks on the 2nd radiobutton, without pressing the enter button, he should be able to see the Vendor input parameter.
Thanks
‎2009 Mar 21 6:13 AM
Hi, Priti
Have you tested my Code there is no need to Press Enter. you just need to select the radio button.
Best Regards,
Faisal
‎2009 Mar 21 6:17 AM
hi,
The code I have given is working as per your purpose.
The use of USER COMMAND option doesn't require the option of using enter whenever the radio buttons are switched.
Thanks
Sharath
‎2009 Mar 21 6:17 AM
‎2009 Mar 21 5:17 AM
‎2009 Mar 21 5:51 AM
‎2009 Mar 21 5:30 AM
Hi,
Test the Code Bellow it is working as per your requirement,
TABLES: mara.
PARAMETERS : rb1 RADIOBUTTON GROUP g2 USER-COMMAND a DEFAULT 'X',
rb2 RADIOBUTTON GROUP g2 .
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_matnr FOR mara-matnr MODIF ID s1. " OBLIGATORY.
SELECT-OPTIONS : s_mtart FOR mara-mtart NO INTERVALS NO-EXTENSION MODIF ID s1.
SELECT-OPTIONS : s_werks FOR mara-matnr NO INTERVALS NO-EXTENSION MODIF ID s1.
SELECTION-SCREEN END OF BLOCK a.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
PARAMETERS : lifnr LIKE lfa1-lifnr MODIF ID s2.
SELECTION-SCREEN END OF BLOCK b.
BREAK-POINT.
AT SELECTION-SCREEN OUTPUT.
IF rb1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'S2'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF rb2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'S1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Best Regards,
Faisal
‎2009 Mar 21 5:37 AM
TABLES: mara, lfa1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS : rb1 RADIOBUTTON GROUP g2 USER-COMMAND mod1 ,
rb2 RADIOBUTTON GROUP g2.
SELECTION-SCREEN END OF BLOCK b1.
HI,
look the below code
SELECT-OPTIONS : s_matnr FOR mara-matnr MODIF ID sc1 . " OBLIGATORY.
SELECT-OPTIONS : s_mtart FOR mara-mtart MODIF ID sc1 NO INTERVALS NO-EXTENSION.
PARAMETERS : lifnr LIKE lfa1-lifnr MODIF ID sc2 .
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF rb2 = 'X'.
IF screen-group1 = 'SC2'.
screen-invisible = 1.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
‎2009 Mar 21 5:56 AM