9 Replies Latest reply: Nov 22, 2007 7:59 AM by Premkumar Muthuswamy RSS

Error when Generating the Program

Surender Thungathurti
Currently Being Moderated

Recently there was an SP upgrade and my Planning Book started giving me this error message (SCM version =5.0 and SP = 7)


"Error when generating the program" Message no. /SAPAPO/TSM141

Diagnosis: Generated programs are programs that are generated based on individual data objects, such as planning object structure, planning areas and Infocubes. These programs are then executed in the transaction. An error occured during the generation of such a program


Possible causes:

1. The template has been corrupted

2. The object that the template uses to generate the program contains inconsistencies; for instance an Infocube has not been activated



This error occurs when I try to open the my planning book/creating the selection profile. I've re-activated the Infocube and later deactivate and active my POS and tried to do the same for the Planning Area....but the error still persists. I tried to create a new planning area and tried it again but the error still persists. I've tried to fix any inconsistencies in the planning area time series objects by running the consistency check....however the same error pops up during the consistency check....


Anyone encountered this error message and any possible solutions to this issue.




  • Re: Error when Generating the Program
    Keith Helfrich
    Currently Being Moderated

    Hi Surender,


    I'm also seeing the same problem.  Did you ever find a solution ?




    • Re: Error when Generating the Program
      P. Ayyagari
      Currently Being Moderated

      A suggestion- I am not sure whether this will help.

      However I have seen such cases when the data is inputted wrong


      If my guess is correct, go to ST22 transaction and see If there is an ABAP DUMP


      If you find one- paste the contents of the ABAP DUMP for everyone to analyze, May be we can work out to solve this.


      Otherwise, I suggest go and check the CVCs( Time Series) - May be one of them is wrongly inputted like a comma, or some weird character.


      Suggest you to delete all the time series( CVCs) and recreate them again.

      - Remember to take a backup before you delete the CVCs.


      Hope this helps. Good Luck




      • Re: Error when Generating the Program
        Steven Moore
        Currently Being Moderated

        I did find an ABAP Dump when looking at ST22.  The short message is as follows:


        Runtime Errors         GEN_BRANCHOFFSET_LIMIT_REACHED

        Date and Time          05/14/2007 19:33:54


        Short text

             Jump distance is too large and cannot be generated.


        What happened?

             A jump distance is too large and cannot be generated.

             A control structure or a routine with "CHECK" or "EXIT" contains

             too many ABAP statements.


             Error in the ABAP Application Program


             The current ABAP program "GP_MET_PSTRU_BASIC_FORMS" had to be terminate

              because it has

             come across a statement that unfortunately cannot be executed.


        What can you do?

             Note down which actions and inputs caused the error.


             To process the problem further, contact you SAP system



             Using Transaction ST22 for ABAP Dump Analysis, you can look

             at and manage termination messages, and you can also

             keep them for a long time.



        Error analysis

             During the generation of program "GP_MET_PSTRU_BASIC_FORMS", the system

              determined that

             within an ABAP event a control structure (for example, IF..ENDIF

             or LOOP..ENDLOOP) or a routine (for example, FORM routine) has

             become too large. The resulting jump distance is too large so that

            it could no longer be generated.

            With the internal load format, the jump distance must not be

            greater than 32768 (this is the size of approximately 10.000

            ABAP statements).

            The jump distance that is to be generated, however, is 50885.


        How to correct the error

           The ABAP application program must be changed.

  • Re: Error when Generating the Program
    Surender Thungathurti
    Currently Being Moderated

    Hi Keith,

    You are right its the OSS note, we download and load the data then it works ok no issues.


  • Re: Error when Generating the Program
    Surender Thungathurti
    Currently Being Moderated

    Closed per information in the thread

  • Re: Error when Generating the Program
    Premkumar Muthuswamy
    Currently Being Moderated

    We dont go for any upgrade but i get the same error when i try to load the data from the cube to the planning area.


    Pls help me in this .