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: 

GENERATE_SUBPOOL_DIR_FULL error while populating dynamic tables

Former Member
0 Kudos

Hello!

I have created a program that extensively uses dynamic internal tables. However, I faced a probelm regarding dynamic popultion of tables.

Here is the sample:

REPORT ZTEST.

DATA: t_fcat TYPE lvc_t_fcat,

dt_outtab TYPE REF TO DATA.

FIELD-SYMBOLS: <tab> TYPE STANDARD TABLE.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING i_structure_name = 'CSKS'

CHANGING ct_fieldcat = t_fcat.

DO 100 TIMES.

CALL METHOD cl_alv_table_create=>create_dynamic_table

EXPORTING it_fieldcatalog = t_fcat

IMPORTING ep_table = dt_outtab

EXCEPTIONS generate_subpool_dir_full = 1

others = 2.

IF sy-subrc = 0.

WRITE / sy-index.

ELSE.

WRITE: / 'Error - sy-subrc = ', sy-subrc.

EXIT.

ENDIF.

ENDDO.

WRITE / 'End'.

By using this program I found out that I can create no more than 36 internal tables for each program run. At the 37th one, the program raises an exception GENERATE_SUBPOOL_DIR_FULL.

Each method call creates a subroutine pool that stores a table, and obviously their number is limited somehow, in my case to 36.

we can ask user to leave the program and start again, which is really not a feature of a professional application.

I'd like to have the solution with no limits as my program should run for as many as 100 tables where I need to create dynamically, at one strech.

I'm using 4.6 release.

Are there any experiences with this?

Thanks in advance!

Kind regards,

Lalitha.

2 REPLIES 2

LucianoBentiveg
Active Contributor
0 Kudos

Check this form, is one alternative, may be is usefull for you:

FORM create_corresponding_tables TABLES not_standard

STRUCTURE not_standard.

DATA: progname LIKE sy-repid.

DATA: BEGIN OF repcode OCCURS 10,

line(72),

END OF repcode.

repcode-line = 'REPORT NEW_INFOTYPE_DATA.'.

APPEND repcode.

repcode-line = 'FORM DATA_DECLARATIONS.'.

APPEND repcode.

LOOP AT not_standard.

CONCATENATE 'P' not_standard-infty INTO repcode-line.

CONCATENATE 'DATA: ' repcode-line 'LIKE' repcode-line

'OCCURS 10 WITH HEADER LINE.'

INTO repcode-line SEPARATED BY space.

APPEND repcode.

ENDLOOP.

repcode-line = 'ENDFORM.'.

APPEND repcode.

GENERATE SUBROUTINE POOL repcode NAME progname.

PERFORM data_declarations IN PROGRAM (progname).

ENDFORM. " CREATE_CORRESPONDING_TABLES

0 Kudos

Hi Peluka,

Thanks the reply.

Can you be more detail. Can you give some sample which explains the steps.

Thanks.