Application Development 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: 

Module Pool RadioButton

Former Member
0 Kudos
122

Hi All,

I have to display a custom container as soon as a radio button is selected in module pool. Can i use FCT code for this purpose.

Thanks & Regards,

Chandni Sharma.

1 ACCEPTED SOLUTION

Private_Member_49934
Contributor
0 Kudos
82

1)Assign a function code to the radio button group.'

2)IN PAI if the function code is what you assigend to the group Set a flag say g_v_display_cont = 'x'.

3) Set the default visibility of container as invisible.

3) In PBO. Loop at Screen. if g_v_display_cont = x. set screen-invisible = 0. modify screen. endloop.

9 REPLIES 9

Private_Member_49934
Contributor
0 Kudos
83

1)Assign a function code to the radio button group.'

2)IN PAI if the function code is what you assigend to the group Set a flag say g_v_display_cont = 'x'.

3) Set the default visibility of container as invisible.

3) In PBO. Loop at Screen. if g_v_display_cont = x. set screen-invisible = 0. modify screen. endloop.

0 Kudos
82

Thanks for your reply, but the problem i'm facing is the custom container should be displayed as soon as i select that radio button. What is happening right now is if i select the radio button and press enter then it displays the container. I want it to display the container on click or on selection of the radio button. And to make the container invisible again as soon as i select some other radio button.

Thanks & Regards,

Chandni Sharma

0 Kudos
82

If you have assigned function code to the radio button then pai should trigger and then pai should trigger ( where I am hoping you have the loop at screen ) and it should work.

Can you please post you screen flow logic and PBO and PAI modules in notepad?

0 Kudos
82

When i used the case at sy-ucomm and then conditions if it is function code of radio button, it worked. but i am still having the problem with the custom container. i am trying to make it invisible if some other radio button is selected but when i start a loop at screen and case at screen name, it never has the name of the custom container. why so?

code i am using is

   CASE SY-UCOMM.

      WHEN 'RFD'.

       IF SOLD = 'X'.

           ....

       ELSEIF OBSOLETE = 'X'.

           ....

       ELSEIF DAMAGED = 'X'.

           ....

       ELSEIF WORN_OUT = 'X'.

           ....

       ELSEIF LOST = 'X'.

           ....

       ELSEIF OTHERS = 'X'.

         LOOP AT SCREEN.

           CASE SCREEN-NAME.

             WHEN 'CONTAINER'.

               PERFORM CREATE_CONT.

               SCREEN-INVISIBLE = '1'.

               MODIFY SCREEN.

           ENDCASE.

         ENDLOOP.

       ELSEIF OTHERS NE 'X'.

         LOOP AT SCREEN.

           CASE SCREEN-NAME.

             WHEN 'CONTAINER'.

               SCREEN-INVISIBLE = '0'.

               MODIFY SCREEN.

           ENDCASE.

         ENDLOOP.

       ENDIF.

   ENDCASE.

but in the loop the screen name is never CONTAINER i.e. the custom controller. could you please help me with that too.

0 Kudos
82

First thing. Lopp at screen is meant to be in PBO AND NOT PAI.  Would you mind putting it in PBO in a module.

in pbo.

         LOOP AT SCREEN.

           if SCREEN-NAME = 'CONTAINER'.
    if OTHERS = 'X'.
       
   PERFORM CREATE_CONT.

                 SCREEN-INVISIBLE = '1'.
    ELSE.
          SCREEN-INVISIBLE = '0'.

    ENDIF
    MODIFY SCREEN.
      ENDIF.

         ENDLOOP.

0 Kudos
82

the code is in PBO only. and the screen name does not contain the custom controller's name. so i am not able to use this method of making it invisible.

0 Kudos
82

Solved it myself.

0 Kudos
82

What was the problem?

0 Kudos
82

the problem was i had to make the custom container invisible as soon as any other radio button other than OTHERS is selected. so solved it.