Application Development and Automation 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: 
Read only

Problem in generation Dynamic internal table

P13599469
Explorer
0 Likes
448

Hi,

I have a requirement where I need to generate dynamic internal tables for dynamic field catalogs inside the loop, It is working fine for some loops. then not generating the internal table and giving SY-SUBRC equal to 1, 

CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE

           EXPORTING

             IT_FIELDCATALOG           = GT_DYN_FCAT1

           IMPORTING

             EP_TABLE                  = GT_DYN_TABLE1

           EXCEPTIONS

             GENERATE_SUBPOOL_DIR_FULL = 1

             OTHERS                    = 2.

         IF SY-SUBRC EQ 0.

         ENDIF.

It seems that there is a restriction on no.of  dynamic internal tables generation during runtime and that's causing the issue. Please let me know if you have any alternative to resolve this issue.

Dileep.

2 REPLIES 2
Read only

matt
Active Contributor
0 Likes
416

There is a restriction. It's caused because this method uses dynamically generated subroutines, and you can only generate a limited number.

If you want truly generic tables, you can use the RTTS classes (If you search, you will see how to use them). E.g. Runtime Type Services (RTTS) - ABAP Development - SCN Wiki

Read only

0 Likes
416

Thank you very much,

This resolved my problem.

Dileep.