09-10-2008 1:26 PM
I'm trying to populate the table control in a subscreen. Instead of using a dictionary table, i'm using a work area of an internal table to populate it. I'm selecting and dropping the various fields onto the table control but there are no columns appearing and neither are the names of the fields appearing in the topmost row of the table control. As a result, the whole table control of the subscreen is appearing ABSOLUTELY BLANK on being executed!!!
Am I doing something wrong? What is the correct way of doing it if I need to use the work area of an internal table?
09-11-2008 5:57 AM
Hi,
You have to select the table instead of selecting the table work area for table control.
Regards,
Raju.
09-11-2008 6:08 AM
Hi,
Check out these checkpoints in your program.
In PBO,
1. Internal table should have atleast one record.
2. With the loop, the records from this internal table should be read into whatever work area you used to name the fields in the table control.
3. In the above step, CURRENT_LINE attribute of the table control must be used as an record index.
Just check it out and say whether it is working or not...!
09-11-2008 6:25 AM
u can use ur work area in table control
if u can use loop at work area
becouse table control process the record of ltable through loop in bpo
else u can not use work area
Edited by: anil chaudhary on Sep 11, 2008 8:07 AM
09-11-2008 9:57 AM
Hi,
You can use the Internal Table from a program without any issues. Only thing that you have to take care are,
1. Populate the Internal Table control.
2. If you ABAP Internal Table name and the Table Control Name are different, then you need to write a module in the PBO to map them. Else automatically things will happen.
3. If you are using a Wizard to generate this Table Control, automatically some statements will be inserted. But if you are creating them manually, then you have to insert then in the PBO and PAI.
Below is a demo code which is somewhat like your problem. Have a look at that so that you can have a better understanding of the same.
DEMO_DYNPRO_TABCONT_LOOP Table Control with LOOP - ENDLOOP
DEMO_DYNPRO_TABCONT_LOOP_AT Table Control with LOOP AT ITAB
DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
Thanks,
Samantak.