Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding at Selection-Screen

Former Member
0 Likes
983

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.

1 ACCEPTED SOLUTION
Read only

faisalatsap
Active Contributor
0 Likes
952

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

10 REPLIES 10
Read only

Former Member
0 Likes
952

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

Read only

0 Likes
952

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

Read only

0 Likes
952

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

Read only

0 Likes
952

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

Read only

0 Likes
952

thanks Faisal. Thanks a lot

Read only

former_member156446
Active Contributor
0 Likes
952

This message was moderated.

Read only

0 Likes
952

Hi J@Y ,

Why can't you give the [link of thread|;, instead of copying my code.

Read only

faisalatsap
Active Contributor
0 Likes
953

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

Read only

Former Member
0 Likes
952

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.

Read only

kanishakgupta1
Contributor
0 Likes
952

Try this link...