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: 

Create Internal table with different names (Dynamic)

Former Member
0 Kudos

Logic

Loop at BUKRS.

Populates Internal table "XYZ"

Use ALV LIST APPEND to add the blocks

Final display output using ALV LIST DISPLAY

Endloop.

Requeirement: If I run the report for multiple company codes I need to have the output like this:

BUKRS1:

Report1

Report2

BUKRS2:

Report1

Report2.

Issue: Since I populte the same internal table name its not working fine. Help me to create DYNAMIC internal table name for each loop and populate the ALV Append with different internal table name say XYZ_BUKRS.

Regards

Mohan

2 REPLIES 2

Former Member
0 Kudos

Hai,

You have to create dynamic field catalogue .

try using this method:-

call method cl_alv_table_create=>create_dynamic_table

exporting

it_fieldcatalog = IT_OUTPUT2[]

importing

ep_table = dy_table.

and then you can assign this to a field-symbol...

Jeevan.

Former Member
0 Kudos

Hi Mohan,

if i understand your requirements correctly i think there is no need for creating dynamic tables.

- you could define a deep structure, with line type like your output table.

- then loop at this structure and create your output.

regards

rea