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

modify screen in AT SELECTION-SCREEN OUTPUT

raffinkira
Participant
0 Likes
2,770

As code showed below:

*&---------------------------------------------------------------------*

*          AT SELECTION-SCREEN OUTPUT

*&---------------------------------------------------------------------*

AT SELECTION-SCREEN OUTPUT.

   LOOP AT SCREEN.

     IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'SG1'.

       SCREEN-INPUT = 0.

       MODIFY SCREEN.

     ENDIF.

   ENDLOOP.

R1 is a radion button and SG1 is a parameter.

If 'R1' is chosen, the status of inputable of 'SG1' DOES NOT change instantly.

It changes ONLY AFTER some kind of behaviors like "Double Click" or 'Enter'.

I want to get the effect like it is in 'SE18' or 'SE19, for example.'

1 ACCEPTED SOLUTION
Read only

custodio_deoliveira
Active Contributor
0 Likes
2,044

Hi Ming,

Please try adding user-command to your radiobutton declaration:

r1 RADIOBUTTON GROUP rbg1 USER-COMMAND c1,

This way when a radiobutton from group rbg1 is selected the program will trigger the event AT SELECTION-SCREEN (not output) passing C1 in sy-ucomm.

Regards,

Custodio

As code showed below:

*&---------------------------------------------------------------------*

*          AT SELECTION-SCREEN OUTPUT

*&---------------------------------------------------------------------*

AT SELECTION-SCREEN OUTPUT.

   LOOP AT SCREEN.

     IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'SG1'.

       SCREEN-INPUT = 0.

       MODIFY SCREEN.

     ENDIF.

   ENDLOOP.

R1 is a radion button and SG1 is a parameter.

If 'R1' is chosen, the status of inputable of 'SG1' DOES NOT change instantly.

It changes ONLY AFTER some kind of behaviors like "Double Click" or 'Enter'.

I want to get the effect like it is in 'SE18' or 'SE19, for example.'

4 REPLIES 4
Read only

custodio_deoliveira
Active Contributor
0 Likes
2,045

Hi Ming,

Please try adding user-command to your radiobutton declaration:

r1 RADIOBUTTON GROUP rbg1 USER-COMMAND c1,

This way when a radiobutton from group rbg1 is selected the program will trigger the event AT SELECTION-SCREEN (not output) passing C1 in sy-ucomm.

Regards,

Custodio

Read only

former_member188282
Active Participant
0 Likes
2,044

Hi Ming,

Assign user-command to radio button.

Try with below code.

PARAMETERS: R1 RADIOBUTTON GROUP RAD1 USER-COMMAND radio.

Regards,

Rajesh.

Read only

Former Member
0 Likes
2,044

Hi Ming,

Try below code

SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: rb_img RADIOBUTTON GROUP rad1 USER-COMMAND rad.
SELECTION-SCREEN COMMENT 4(20) text-s16 FOR FIELD rb_img.
SELECTION-SCREEN COMMENT 32(25) text-s25 FOR FIELD p_from.
SELECTION-SCREEN POSITION POS_HIGH.
PARAMETERS: p_from    LIKE bkpf-bldat MODIF ID gr1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: rb_invo RADIOBUTTON GROUP rad1.
SELECTION-SCREEN COMMENT 4(20) text-s17 FOR FIELD rb_invo.
SELECTION-SCREEN COMMENT 32(25) text-s25 FOR FIELD p_to.
SELECTION-SCREEN POSITION POS_HIGH.
PARAMETERS: p_to      LIKE bkpf-bldat MODIF ID gr2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b_1.


AT SELECTION-SCREEN OUTPUT.
   LOOP AT SCREEN.
     IF screen-group1 = 'GR1'. "Name field
       IF rb_invo = space.
         screen-input = 1.
       ELSE.
         screen-input = 0.
       ENDIF.
       MODIFY SCREEN.
     ENDIF.

     IF screen-group1 = 'GR2'.
       IF rb_invo = 'X'.
         screen-input = 1.
       ELSE.
         screen-input = 0.
       ENDIF.
       MODIFY SCREEN.
     ENDIF.
   ENDLOOP.

Regards

Manasa Veena

Read only

Former Member
0 Likes
2,044

AT SELECTION-SCREEN OUTPUT.

   LOOP AT SCREEN.

     IF R1 EQ 'X'.

        IF screen-name = 'INPUT FIELD NAME 2'.

       SCREEN-INPUT = 0.

       ENDIF.

   ELSE IF R2 EQ 'X'.

      IF screen-name = 'INPUT FIELD NAME 1'.

       SCREEN-INPUT = 0.

      ENDIF.

  ENDIF.

          MODIFY SCREEN.

   ENDLOOP.