I'm trying to get around the GENERATE_SUBPOOL_DIR_FULL error in my application, hope some of you can help me with this:
*) The problem:
I'm implementing part of an application previously written in PHP to my WebAS application designed in MVC (object-oriented). In this program logic I kind of create a matrix (variable rows and columns), which I loop over a few times, modify/alter it (not only the values, also change number of columns).
*) My approach:
Reading the the weblog about <a href="/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table">Dynamic Internal Tables</a> I thought that's the way to go, tried it, worked fine, until there are some more loop iterations, cl_alv_table_create=>create_dynamic_table is called more often, exception is thrown.
After searching the forum, I found <a href="Resetting the counter for Generate Subroutine Pool topic (how to get around GENERATE_SUBPOOL_DIR_FULL)</a>, but now I'm facing some questions I hope to get help with here:
First of all I'm only working with ABAP for 5 months now - object-oriented development is not the problem, but I don't have any experience in dealing with sub programs, memory management and other similar issues in ABAP. So this code here is not totally clear for me:
... EXPORT <whatever is needed> TO MEMORY ID 'ABC'. * Execute the code generation logic in new internal mode SUBMIT <Sub Program> AND RETURN.
... IMPORT <whatever is needed> FROM MEMORY ID 'ABC'. * Logic to generate the internal table of ABAP code ... GENERATE SUBROUTINE POOL <codetab> NAME gv_program. IF SY-SUBRC EQ 0. PERFORM <generated form> IN PROGRAM (gv_program). ENDIF.
It comes down to something like this:
I want to be able to replace or change this call
CALL METHOD cl_alv_table_create=>create_dynamic_table EXPORTING it_fieldcatalog = lt_fieldcatalog IMPORTING ep_table = lt_data.
with some call to another program to not run into the GENERATE_SUBPOOL_DIR_FULL exception anymore - if this is a possible way to get around it!
Getting back the reference to the created table is important, because I use it as my "matrix" in my program logic.
Any help on this is appreciated!