‎2012 Apr 13 10:34 AM
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.
‎2012 Apr 13 10:40 AM
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.
‎2012 Apr 13 10:40 AM
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.
‎2012 Apr 13 11:03 AM
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
‎2012 Apr 13 11:35 AM
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?
‎2012 Apr 13 11:42 AM
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.
‎2012 Apr 13 11:53 AM
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.
‎2012 Apr 13 12:29 PM
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.
‎2012 Apr 13 12:47 PM
‎2012 Apr 13 12:54 PM
‎2012 Apr 13 7:54 PM
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.