Application Development 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: 

Selection Screen

0 Kudos

Hi,

Selection Screen contain 3 Blocks,

Block 1: 3 radio buttons  --> Rad1 Rad2 Rad3

Block 2 : Parameters & Select Options

Block 3: 2 Radio Buttons --> Rad4 Rad5

based on block 1 and block 3, need to change block 2 parameters.

rad1 and rad 4 --> Block2 will be with some parameters

rad1 and rad5 --> Block2 will be with another parameters.

Unable to chance block2 parameters based on block3 radio buttons. any suggestion?

11 REPLIES 11

former_member226419
Contributor
0 Kudos

Hi,

Please refer below link

BR

Sumeet

0 Kudos

Dont gave any problem from block1 Radio button.

want to disable some parameters in block2 based on block1 and 3 combination.

0 Kudos

Hi R K,

for this you have to use

AT SELECTION-SCREEN OUTPUT event. You have to modify it as per as your requirement.

Please see the sample code

AT SELECTION-SCREEN OUTPUT.

   IF P_STORE NE 'X'.

     LOOP AT SCREEN.

       CASE SCREEN-GROUP1.

         WHEN 'STR'.

           SCREEN-ACTIVE = 0.

           MODIFY SCREEN.

       ENDCASE.

     ENDLOOP.

     CLEAR : P_STR.

   ENDIF.

raymond_giuseppi
Active Contributor
0 Kudos

You have just two things to do

  • Code the hiding in PBO (AT SELECTION-SCREEN OUTPUT) using LOOP AT SCREEN and using the MODIF ID associated to parameters or select-options
  • Use the addition USER-COMMAND on the radiobutton to trigger immediately the PAI/PBO cycle each time user selects an option

Regards,

Raymond

0 Kudos

rad2 will display block3 contain 2 radio buttons.

when switch to 2nd radio button in block 3 some fields in block2 should hide.

its not not even going inside program (debug) to loop the screen.

0 Kudos

Hi,

Just want to clarify the requirement.

When you click RAD2 radio button of block 1,  block3 will display else it will be hidden for RAD1 and RAD3 for block1 .

When you click RAD5 radio button in block 3 it will hide some fields in block 2.

Am I getting rite?

BR

Sumeet

0 Kudos

Yes..

when switch bw block3 radio buttons (which will display from block1 radio buttons) unable to change block2

former_member196157
Active Participant
0 Kudos

hiii,

try the following code,

tables: mara, mseg.

selection-screen: begin of block b1  with frame title text-001.
  parameters: rb1 radiobutton group g1 user-command abap,
              rb2 radiobutton group g1 default 'X' .
selection-screen: end of block b1.


selection-screen begin of block b2 with frame title text-001.

select-options : matnr for mseg-matnr modif id rb1,
                  mtart for mara-mtart modif id rb1,
                  matkl for mara-matkl modif id rb1.
selection-screen end of block b2.


selection-screen begin of block b3 with frame title text-001.

select-options : matnr1 for mseg-matnr modif id rb2,
                  mtart1 for mara-mtart modif id rb2.
selection-screen end of block b3.

at selection-screen output.
if rb1 = 'X'.
perform hide_rb2_options.
else.
perform hide_rb1_options.
endif.


form hide_rb1_options.
loop at screen.
case screen-group1.
when 'RB2'.
screen-active = 1.
modify screen.
when 'RB1'.
screen-active = 0.
modify screen.
endcase.
endloop.

endform. " hide_rb1_options

form hide_rb2_options.
loop at screen.
case screen-group1.
when 'RB1'.
screen-active = 1.
modify screen.
when 'RB2'.
screen-active = 0.
modify screen.
endcase.
endloop.
endform.



former_member226419
Contributor
0 Kudos

Hi,

Refer below code.

TABLES: mara.

SELECTION-SCREEN BEGIN OF BLOCK bl0 WITH FRAME TITLE text-t01.

PARAMETERS: rd_rad1 RADIOBUTTON GROUP r1 DEFAULT 'X' USER-COMMAND ucom1,

             rd_rad2 RADIOBUTTON GROUP r1,

             rd_rad3 RADIOBUTTON GROUP r1.

SELECTION-SCREEN END OF BLOCK bl0.

* SELECTION-SCREEN BEGIN OF BLOCK b20 WITH FRAME TITLE text-t02.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS     : p_par TYPE string MODIF ID sc1.

* SELECT-OPTIONS : s_sel FOR mara-matnr MODIF ID sc1.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

* PARAMETERS     : p_par TYPE string MODIF ID sc1.

SELECT-OPTIONS : s_sel FOR mara-matnr MODIF ID sc1.

SELECTION-SCREEN END OF LINE.

* SELECTION-SCREEN END OF BLOCK b20.

SELECTION-SCREEN BEGIN OF BLOCK b30 WITH FRAME TITLE text-t03.

PARAMETERS: rd_rad4 RADIOBUTTON GROUP r2 DEFAULT 'X' USER-COMMAND ucom1,

             rd_rad5 RADIOBUTTON GROUP r2.

SELECTION-SCREEN END OF BLOCK b30.

AT SELECTION-SCREEN OUTPUT.

   IF rd_rad1 = 'X' AND rd_rad4 = 'X'.

     LOOP AT SCREEN.

       IF screen-group1 = 'SC1'.

         screen-active = 0.

         MODIFY SCREEN.

       ENDIF.

     ENDLOOP.

   ENDIF.

BR

Sumeet

0 Kudos

Able to handle all radio buttons from block1.

Block1 -> Radio button2 & 3 have block 3.

click on rad2 below screen will come, this is for display. now i will check on data upload block 2 should come with FILE parameter.

when i click on upload data here even its not going inside my report also.

0 Kudos

Can you please show me your code?

I am not able to understand what you have written above. Please elaborate little more