Skip to Content

AT SELECTION-SCREEN OUTPUT

I dont understand why my code does not work.

When a radiobutton is pressed, i need to show one range or other:

selection-screen begin of block list with frame title text-003.

parameters: rb_list radiobutton group list,

rb_block radiobutton group list,

rb_reje radiobutton group list default 'X'.

select-options: s_block for tvls-lifsp modif id sc1.

select-options: s_reject for tvag-abgru modif id sc2.

selection-screen end of block list.

at selection-screen output.

if rb_block = 'X'.

loop at screen.

if screen-group1 = 'SC2'.

screen-active = 0.

elseif screen-group1 = 'SC1'.

screen-active = 1.

endif.

modify screen.

endloop.

elseif rb_reje = 'X'.

loop at screen.

if screen-group1 = 'SC1'.

screen-active = 0.

elseif screen-group1 = 'SC2'.

screen-active = 1.

endif.

modify screen.

endloop.

elseif rb_list = 'X'.

loop at screen.

if screen-group1 = 'SC1' or screen-group1 = 'SC2'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

It's an easy code but it does not work.

When the program is run the correct range is showed but then, when u change the radiobutton, the same range is showed all the time.

Thank you

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 10, 2008 at 08:30 PM

    user-command is missing . add that and see it works

    REPORT  ztest_radiobutton.
    
    TABLES: tvls,tvag.
    SELECTION-SCREEN BEGIN OF BLOCK list WITH FRAME TITLE text-003.
    
    PARAMETERS: rb_list RADIOBUTTON GROUP list user-command AAA,
    rb_block RADIOBUTTON GROUP list,
    rb_reje RADIOBUTTON GROUP list DEFAULT 'X'.
    
    SELECT-OPTIONS: s_block FOR tvls-lifsp MODIF ID sc1.
    SELECT-OPTIONS: s_reject FOR tvag-abgru MODIF ID sc2.
    
    SELECTION-SCREEN END OF BLOCK list.
    
    AT SELECTION-SCREEN OUTPUT.
      IF rb_block = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'SC2'.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
    
      ELSEIF rb_reje = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'SC1'.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSEIF rb_list = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'SC1' OR screen-group1 = 'SC2'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

    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.