Skip to Content

Hiding selection screen input fields along with field names in a Report.

Hello Experts,

I have a following requirement, In my report there are two radi buttons r1 and r2 and say two fields f1 and f2. when i select r2 both the fields f1 and f2 must be visible suppose if i select r1 both fields must disappear, i should not see the input fields and also the field names(f1, f2)
in the screen. Is there any possibility to achieve this requirement.

At least case,can i put the fields f1 and f2 in a seperate block and can i hide the entire block when selecting the radio button r1. If yes please help me to acheive the logic.

Thanks in advance 😊

Thanks and regards,

Satish Kumar Balasubramanian.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Jan 08, 2014 at 04:25 AM

    Hi Sathishi,

    Please write a code like below..

    PARAMETERS : R1 RADIOBUTTON GROUP G1 USER-COMMAND CMD DEFAULT 'X',
    R2 RADIOBUTTON GROUP G1.

    PARAMETERS: FIELD1(30) MODIF ID 'AA',

    FIELD2(30) MODIF ID 'AA',

    FIELD3(30) MODIF ID.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF R2 = 'X'.

    IF SCREEN-GROUP1 = 'AA'.

    SCREEN-ACTIVE = '0'.
    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    When select R2 field1 and field2 will be inactive.

    Arivazhagna S

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 04:25 AM

    Hi Satish -

    You can achieve this AT SELECTION-SCREEN OUTPUT.

    You need to add a MODIF ID to each group. And LOOP over the SCREEN.

    Then CHECK the GROUP1 and you need to set the properties of ACTIVE, INVISIBLE for each of them as per your requirement.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2014 at 04:29 AM

    Hi,

    I think you can try like this

    tables:mara.

    PARAMETERS:rad1 RADIOBUTTON GROUP rad1 default 'X' USER-COMMAND RAD,

    rad2 RADIOBUTTON GROUP rad1.

    SELECT-OPTIONS:num for mara-matnr.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    if rad1 = 'X'.

    IF screen-name cs 'NUM'.

    screen-active = '0'.

    MODIFY SCREEN.

    ENDIF.

    else.

    IF screen-name cs 'NUM'.

    screen-active = '1'.

    MODIFY SCREEN.

    ENDIF.

    endif.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 04:49 AM

    hiii,

    hey 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 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.
    endif.


    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.



    OR u can try the 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 Jan 08, 2014 at 04:55 AM

    Hi,

    Try this

    PARAMETERS:r1 RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND cmd,

    r2 RADIOBUTTON GROUP g1.

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.

    PARAMETERS:f1 TYPE sy-datum MODIF ID m1,

    f2 TYPE sy-datum MODIF ID m1.

    SELECTION-SCREEN END OF BLOCK b1.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF r1 = 'X'.

    IF screen-group1 EQ 'M1'.

    screen-active = '0'.

    ENDIF.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.


    Regards,

    Jeffin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 04:24 AM

    Hi,

    use the event 'At selection-screen output'.

    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.