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: 

Using Table Control being populated by work area in the program

Former Member
0 Kudos

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?

4 REPLIES 4

Former Member
0 Kudos

Hi,

You have to select the table instead of selecting the table work area for table control.

Regards,

Raju.

Former Member
0 Kudos

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...!

Former Member
0 Kudos

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

Former Member
0 Kudos

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.