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

Regarding event

0 Likes
549

Hello,

on selection screen which event is triggered when we click on execute button?

In my case, there are two radio buttons. user click one of the radiobutton and clicks on execute button then i have to check which radio button is clicked and according to this i have to further process the code.so in which event should i write the code for this case?

Actualy i used at selection-screen on radiobutton group event but in this event when i am trying to loop on one of my internal table then it doesn't go in loop.

Hope you understand my problem.

Thanks,

Tushar.

3 REPLIES 3
Read only

Former Member
0 Likes
518

Hi Tushar,

Write your logic in AT SELECTION_SCREEN OUTPUT beacuse after at selecion_screen on radiobutton group event again AT SELECTION_SCREEN OUTPUT triggers since it is PBO event.

Sample code


PARAMETERS: r1 RADIOBUTTON GROUP rad1 USER-COMMAND abc DEFAULT 'X',

             r2 RADIOBUTTON GROUP rad1,

             r3 RADIOBUTTON GROUP rad1.

PARAMETERS : p1 TYPE string MODIF ID rav,

              p2 TYPE string MODIF ID rav,

              p3 TYPE string .

AT SELECTION-SCREEN OUTPUT.

   IF r2 EQ 'X'.

     LOOP AT SCREEN.

       IF screen-group1 = 'RAV'.

          screen-active = 0.

         MODIFY SCREEN.

       ELSEIF screen-name = 'P3'.

         screen-invisible = 1.

         MODIFY SCREEN.

       ENDIF.

     ENDLOOP.

   ENDIF.


Regards,

Ravikiran.K

Read only

Former Member
0 Likes
518

Hi Tushar,

Write your code in At selection screen output.

Sample code for your refernce.

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

parameters:p_rad1 radiobutton group one user-command test,

                 p_rad2 radiobutton group one.

selection-screen:end of

block test.

selection-screen:begin of block test2 with frame title text-002.

parameters:p_file(10) TYPE C MODIF ID TL,

                 p_file1(10)

TYPE C MODIF ID TT.

selection-screen:end of block test2.

   

AT

SELECTION-SCREEN OUTPUT.

  IF P_RAD1 = 'X'.

      LOOP AT SCREEN.

          CHECK SCREEN-GROUP1 = 'TT'.

          SCREEN-INPUT = '0'.

          MODIFY SCREEN.

      ENDLOOP.

  ENDIF.

  IF P_RAD2 = 'X'.
      LOOP AT SCREEN.
         CHECK SCREEN-GROUP1 = 'TL'.
         SCREEN-INPUT = '0'.
         MODIFY SCREEN.
     
ENDLOOP.
  ENDIF.

Hope it will address your query.

Regards,

Kannan

Read only

rajkumarnarasimman
Active Contributor
0 Likes
518

Hi Tushar,

Write the code under AT SELECTION-SCREEN OUTPUT.  Make sure that you have added USER_COMMAND during Radio button declaration as shown below.

Radio Button Declaration:


PARAMETERS: rb_report  RADIOBUTTON GROUP rb_group USER-COMMAND u_cmd,

                             rb_sform  RADIOBUTTON GROUP rb_group.

If USER_COMMAND is declared,  we can assign the event for radio button when the click is made by the user as shown below.

Event - AT SELECTION-SCREEN OUTPUT

AT SELECTION-SCREEN OUTPUT

IF rb_report = 'X'.

PERFORM show_report_screen.

ELSEIF rb_sform = 'X'.

PERFORM show_form_screen.

ENDIF.

Regards

Rajkumar Narsimman