‎2010 Sep 01 8:33 AM
HI,
How to hide the table control generated by wizard.
I have a requirment that in module pool two radio buttons eg: 1,2 if radio button 1 selected table control has to hide. if 2selected table control has to visible. Please gve the solution for that requirement.
Thanks in Advance.
Regards,
Vinay Kumar K
‎2010 Sep 02 12:53 PM
Hi,
In the PBO (in a module outside to the LOOP...ENDLOOP), use this
MODULE status_0100 OUTPUT.
IF sy-ucomm EQ space. "Give the function code on which you want to make your table control go invisible
"Give a space if you want your table control to remail invisible on display of the screen
CLEAR: t_header[].
LOOP AT tabcontrol1-cols[] INTO wa_control1.
wa_control1-invisible = '1'.
MODIFY tabcontrol1-cols[] FROM wa_control1 INDEX sy-tabix.
ENDLOOP.
ENDMODULE.
‎2010 Sep 02 12:53 PM
Hi,
In the PBO (in a module outside to the LOOP...ENDLOOP), use this
MODULE status_0100 OUTPUT.
IF sy-ucomm EQ space. "Give the function code on which you want to make your table control go invisible
"Give a space if you want your table control to remail invisible on display of the screen
CLEAR: t_header[].
LOOP AT tabcontrol1-cols[] INTO wa_control1.
wa_control1-invisible = '1'.
MODIFY tabcontrol1-cols[] FROM wa_control1 INDEX sy-tabix.
ENDLOOP.
ENDMODULE.
‎2010 Sep 03 9:37 AM
‎2010 Sep 08 11:00 AM
Hi
the data type of the Table control can be found in Type-pool CXTAB....Moreover the code suggested by Nitwick would actually make the columns of the table control invisible and not the whole table control...
Please try the following code:
1) Create 2 global variables for indicators of the table control diaplay:
- GV_DISPLAY_TC1 and GV_DISPLAY_TC2..
- Set these variable in the PAI based on the Radio Button selected
- In the PBO before looping at the table control set this line of code...<Table_control_name>-invisible = 'X'.
Hope this solves the issue for you...
Sitakant
‎2010 Sep 07 5:07 AM
Hi,
The best approach here would be to use sub-screen concept. Design two different Sub-Screens for the screen. And then populate the first one with the normal screen UI elements. And then in the second sub-screen populate and generate the Table Control using the Wizard. So, now associate a Function Code for your Radio Buttons.
Based on you logic you can load or unload the Subs- Screens which contains the normal screen and the Table Control related functionality.
Have a look at the following links for sample codes on Subscreens-
http://help.sap.com/abapdocu_70/en/DYNPCALL.htm
http://www.sapdev.co.uk/dialog/subscreen.htm
http://www.erpgenie.com/sap-technical/ABAP/creating-a-subscreen-in-your-ABAP-program
You can also check in the system the following sample programs - using transaction - *SE38 - DEMODYNPRO**
Hope this helps.
Thanks,
Samantak.