there is 2 input parameters n two radiobuttons on the selection screen when click on ist radiobutton then 2nd parameter is not appear on the selection screen and if i click on 2nd radiobutton then ist parameter is not appear on screen .how? plz fwrd at my mail id if anbodt got the solutions
Hi,
Try this code.
TABLES: mara,ekko.
SELECTION-SCREEN begin of line .
PARAMETERS: rad1 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: date FOR mara-matnr MODIF ID mo1.
SELECTION-SCREEN end of line .
SELECTION-SCREEN begin of line .
PARAMETERS: rad2 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: date1 FOR mara-matnr MODIF ID mo1.
SELECTION-SCREEN end of line .
AT SELECTION-SCREEN OUTPUT.
IF rad2 = 'X'.
LOOP
AT SCREEN. IF screen-name = 'DATE-LOW' OR screen-name =
'DATE-HIGH'. screen-input = 0. MODIFY SCREEN. ENDIF.
ENDLOOP. ENDIF.
IF rad1 = 'X'.
LOOP
AT SCREEN. IF screen-name = 'DATE1-LOW' OR screen-name =
'DATE1-HIGH'. screen-input = 0. MODIFY SCREEN. ENDIF.
ENDLOOP. ENDIF.
Reward if you find this helpful.
Regards,
Sumit.
Hi Raghuveer,
Try this code.
This below code works.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : f1 RADIOBUTTON GROUP rg DEFAULT 'X' USER-COMMAND radio,
f1_txt LIKE rlgrap-filename ,
f2 RADIOBUTTON GROUP rg,
f2_txt LIKE rlgrap-filename .
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF f1 = 'X' AND screen-name = 'f2_txt'.
screen-input = '0'.
ELSEIF f1 = 'X' AND screen-name = 'f1_txt'.
screen-intensified = '1'.
ELSEIF f2 = 'X' AND screen-name = 'f1_txt'.
screen-input = '0'.
ELSEIF f2 = 'X' AND screen-name = 'f2_txt'.
screen-intensified = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Reward points and close this thread, if your question is answered.
Regards,
Tanuja.
Hi Raghuveer,
You can do this by using <b>SCREEN Table</b> and <b>Modify Screen</b> statement.
You need to make the desired input fields <b>"Inactive"</b> in both PBO and PAI of selection screen.
Below is the code where I have assigned usercommand to radiobuttons and checking the radiobuttons both in PBO and PAI.
Try this code:
report ztest.
TABLES: MARA.
SELECTION-SCREEN begin of line .
PARAMETERS: rad1 RADIOBUTTON GROUP grp USER-COMMAND ucom,
matnr1 like mara-matnr .
SELECTION-SCREEN end of line .
SELECTION-SCREEN begin of line .
PARAMETERS: rad2 RADIOBUTTON GROUP grp default 'X' ,
matnr2 like mara-matnr .
SELECTION-SCREEN end of line .
AT SELECTION-SCREEN output.
Perform check_rad.
AT SELECTION-SCREEN .
If sy-ucomm eq 'RAD1' or sy-ucomm eq 'RAD2'.
Perform check_rad.
Endif.
*&----
Form check_rad
*&----
Form check_rad.
IF rad1 = 'X'.
LOOP AT SCREEN.
IF screen-name = 'MATNR2' .
SCREEN-Active = 0.
ENDIF.
IF screen-name = 'MATNR1' .
SCREEN-Active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF rad2 = 'X'.
LOOP AT SCREEN.
IF screen-name = 'MATNR1' .
SCREEN-Active = 0.
ENDIF.
IF screen-name = 'MATNR2' .
SCREEN-Active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Endform. "check_rad
hope this helps,
Pragya
Add a comment