Skip to Content

Selection Screen

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2013 at 06:26 AM

    Hi,

    Please refer below link

    BR

    Sumeet

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 30, 2013 at 06:38 AM

    Dont gave any problem from block1 Radio button.

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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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.

  • Posted on Dec 30, 2013 at 06:47 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 30, 2013 at 07:03 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 30, 2013 at 08:43 AM

    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.



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2013 at 08:58 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.