Frequently Asked Questions: SGEN

This article is based on SAP Note 1989778 – FAQ: SGEN.

What’s SGEN?

SGEN is the transaction to generate ABAP loads for large numbers of programs, function groups, module pools, and so on, as well as Business Server Page applications (BSP applications).

SAP Note 379918 contains the report name and table name which are used during SGEN execution. Report RSPARAGENLOD, RSPARAGENJOB and RSPARAGENER8 are replaced by RSPARAGENLODM, RSPARAGENJOBM and RSPARAGENER8M respectively in the latest version. Table GENSETC is replaced by GENSETM.

SGEN execution consists of two parts. The first part determines the so-called generation set through the options given in the first screen. The generation set is stored in table GENSETC or GENSETM. The second part is compiling source code into the load. This part is triggered by the background job RSPARAGENER8 or RSPARAGENER8M.

Where can I find more information about SGEN?

You can go to the SGEN transaction and click the pushbutton information. There is a detailed explanation of how to use the transaction. You can also go to SAP online help and search SGEN.

When should I run SGEN?

SGEN is designed for large-scale program generations. You can consider using SGEN in the following scenarios. SAP Note 438038, and 162991 explains other generation tools. As kernel patches could change the version of the ABAP load format, so it is suggested to run SGEN(choose “Regenerate already existing loads” then select “Regenerate all existing loads”) after kernel update or upgrade.

You can find detailed information in SAP Note 1259546, and 672268, and WIKI: Understanding Program Load (ABAP Load).

  • New system installation and heterogeneous system copy
  • Kernel update
  • system update with SPAM/Saint
  • system update/upgrade with SUM
  • Importing transport Request

How I can know whether an object load is generated(compiled) correctly after SGEN execution?

You can check table GENSETC or GENSETM after SGEN execution.

  • If the GENSTATUS flag is X, it means that generation for the object is finished.
  • If the GENSTATUS flag is S, it means that generation for the object failed due to syntax error.
  • If the GENSTATUS flag is E, it means that generation for the object failed due to system error.

If you cannot find an entry for the object in GENSETC or GENSETM, it means that the object was not selected during SGEN execution or a new SGEN execution was started.

How to handle generation syntax error?

There are several reasons that cause syntax errors. In any case, you need to identify the component of the objects and query the component about whether the syntax error can be ignored.

  • Program does not have a main program defined
  • Old programs that are not used anymore
  • Switch linked to the object is off, and program will not be executed until it is turn on.
  • A real syntax error issue

How to handle generation system error?

You need to analyze SM37(Job name: RSPARAGENER8 or RSPARAGENER8M), SM21, ST22 and ST11.

How much free space is required in database for SGEN execution?

If you want to regenerate loads, make sure that there is enough space available in the database. The space required can be several hundred megabytes (MB). Generation over all components requires around 2 gigabytes (GB) of free space.

How to handle time out error during SGEN execution?

Time out error might occur when the generation set is calculated. You need to increase the value of the profile parameter max_wprun_time that defines the maximum runtime of a dialog process.

Why some objects still are compiled automatically after SGEN execution?

There are several reasons. If none of them applies to your situation, you can try to analyze the cause as per SAP Note 1230076.

  • The component of the objects was not selected in the second page of SGEN.
  • Transport requests were imported after SGEN execution.
  • Program error. See SAP Note 1147789, 1869363, and 2040850.

How to improve SGEN performance?

Compared against the calculation of SGEN generation set, the second part of SGEN takes a longer time. However, the second part is out of control of SGEN. This is SAP system-related and depends on resources of the system itself like main memory, number of CPU and last but not least, the database performance.

The runtime of the generation jobs is heavily dependent on the database performance of the system. If you noticed that generation job long time, you can following below:

  • Make sure that there is enough system resource (CPU, memory) and free background work processes. SAP Note 1651645 describes a known issue.
  • Make sure that database performance is fine. Please involve your database expert if necessary.

Why short dump LOAD_VERSION_LOST occurs during SGEN execution?

If an ABAP program load is displaced from the program buffer while it is being used, this program load has to be reloaded into the buffer. The system checks whether the old and the new program load match.

If the program has been regenerated and the new load does not match the old load, the application terminates and the short dump LOAD_VERSION_LOST occurs. SAP Note 1259546, and 672268 explain the short dump in detail. SAP Note 5451 explains how to avoid dump LOAD_PROGRAM_LOST.

See Also

  • 162991 – Generation tools for ABAP programs
  • 379918 – Redesign of the SGEN transaction
  • 413912 – Shorter runtime for specifying generating quantity
  • 438038 – Automatic regeneration of invalidated loads
  • 589124 – Performance improvements when Support Package imported
  • 1132507 – SGEN: Using maximum number of free work processes
  • 1147789 – SGEN does not generate all loads after release upgrade
  • 1230076 – Generation of ABAP loads: Tips for the analysis
  • 1630356 – SGEN terminates after 500 generation errors
  • 1645864 – SGEN generation errors do not cause an error message
  • 1651645 – Maximum number of SGEN processes cannot be greater than 9
  • 1869363 – SGEN: Correction for selection of WebDynpros / BSPs

You May Also Like

Leave a Reply?