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: 

Resetting the counter for Generate Subroutine Pool

Former Member
0 Kudos

Hi Every One,

There's a limit on the number of sub-routines that can be generated within a program. This limit is 36 and anythng over this will create a short-dump(GENERATE_SUBPOOL_DIR_FULL).Is there a way to reset the counter so that more sub routines can be written in the same program.

Regards,

Rajeev.N

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos

Hi Rajeev,

-> not possible , see oss-note 63227:

...

" These generated routines are loaded into the program

buffer (program execution area PXA) which is generally only released

when leaving the transaction.

To avoid an overflow of the program memory the maximum number of

subroutines which can be generated is set to 36 at present. This number

is a kernel constant and therefore, not variable. Removing memory

segments from the PXA is currently not supported by the kernel. ..."

Grx Andreas

6 REPLIES 6

andreas_mann3
Active Contributor
0 Kudos

Hi Rajeev,

-> not possible , see oss-note 63227:

...

" These generated routines are loaded into the program

buffer (program execution area PXA) which is generally only released

when leaving the transaction.

To avoid an overflow of the program memory the maximum number of

subroutines which can be generated is set to 36 at present. This number

is a kernel constant and therefore, not variable. Removing memory

segments from the PXA is currently not supported by the kernel. ..."

Grx Andreas

Instead of "GENERATE SUBROUTINE..", why not use "INSERT REPORT..." and then process the temp. report????

I wonder if there is also a 36 limitation here????

-Ken

former_member183804
Active Contributor
0 Kudos

Maybe you can bycome this shortage, by generating and accessing the sub routine pools via local rfc calls.

Kind Regards

Klaus

Former Member
0 Kudos

The limit of 36 sub-pool generations is per internal mode, not per process. Therefore, the way to get around this problem is to generate the sub-routine pool in a separate internal mode. The simplest way to do this is using SUBMIT ... AND RETURN.

Whilst the logic is indeed more complicated, I have done this before and it definitely works.

<b>Main Program</b>


  ...
  EXPORT <whatever is needed> TO MEMORY ID 'ABC'.
* Execute the code generation logic in new internal mode
  SUBMIT <Sub Program> AND RETURN.

<b>Sub Program</b>


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

This should give you enough of an idea to get going. The important thing is that the GENERATE statement is called inside a new internal mode, created by SUBMIT, which is destroyed when <Sub Program> returns.

Cheers,

Scott

Former Member
0 Kudos

Alternative..

this worked for me...but not sure the requirement is the same.

instead of calling CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

and CALL METHOD cl_alv_table_create=>create_dynamic_table,

i used the following:

1. DATA: infty_tab_pointer TYPE REF TO data.

CREATE DATA infty_tab_pointer TYPE standard table of (structure).

2. ASSIGN infty_tab_pointer->* TO <infty_tab>.

FIELD-SYMBOLS: <infty_tab> TYPE TABLE.

<infty_tab> became my internal table.

Will this work?

Bill

0 Kudos

Hi William,

I have same

Create DATA infy_tab_pointer type standard table of(structure)

This statement is not supported in SAP 4.6C system.

What is the alternative for this.