Skip to end of metadata
Go to start of metadata
 

Overview

 

SGEN stands for SAP Load Generator, a transaction used to compile ABAP repository¹ objects that are newly delivered into the system, either via an installation or via an upgrade/support package import. Here the term "Load" refers to an ABAP runtime object, used on ABAP environments.

The Load can be also generated when activating the object on the first time. Every time an ABAP object or its dependent is modified, it needs to be compiled again.

 The ABAP objects are stored on their source code in table REPOSRC and on their runtime state in table REPOLOAD. These tables are crucial and should never be touched or modified by any reason!

The process of (re)generating the loads consumes a lot of space on the database level. A typical ERP6 system with all objects generated will occupy around 5Gb of physical space.


¹ repository objects: programs, classes, methods, interfaces, business server pages (BSP), web dynpros, functions, function groups, among others.


Executing SGEN


SGEN can be called independently by typing /nSGEN on the t-code field or be requested by the upgrade/update tools (SPAM, SAINT or SUM).
SGEN then triggers a job which is responsible for reading the content from REPOSRC and filling REPOLOAD with the respective runtime content. 
The job name is RSPARAGENER8*.

Load generation during upgrade

If you selected the Advanced preconfiguration mode in SUM , you will get the following prompt:

Choose an execution strategy for transaction SGEN.

01)  -  Do not start ABAP load generation during the update.

If you plan to apply a high number of relevant changes to your system after the update in the form of a transport or a Support Package,
we recommend that you generate the ABAP loads manually after the update.

02)  -  Generate ABAP loads on shadow system during uptime.

With this option, the Software Update Manager uses the maximum number of processes entered below to generate the loads in the shadow instance  during the uptime in the update phase

SUBMOD_SHD2_RUN/RUN_RSGEN

03)  -  Generate ABAP loads on shadow system during uptime and start asynchronously in post downtime.

With this option, the Software Update Manager uses the maximum number of processes entered below to generate the ABAP loads in the shadow instance  during the uptime  in the update phase SUBMOD_SHD2_RUN/RUN_RSGEN

The transaction SGEN automatically starts again after the downtime during the Postprocessing roadmap step to regenerate the ABAP loads that were invalidated during the downtime in phase MAIN_POSTP/RUN_RSREGENLOD

More information can be found in the  SUM guide Chapter SGEN Execution Modes

 

Generating Loads with Transaction SGEN

 

1.Call transaction SGEN.

2. Select one of the following options:

  • Regenerate after an SAP System upgrade
  • Generation of BSP Applications
  • Generation of Web Dynpros

3. Repeat the generation for all options that you want to perform.

Transaction SGEN offers the following functions:

  • Selection of predefined generation tasks
  • Selection of software components (such as SAP_ABA, SAP_BASIS) to restrict the amount of objects being generated
  • Selection of the application servers for parallel generation
  • Generation in the background
  • Job Monitor for checking the progress of the generation in the background

If you want to regenerate invalidated loads after the update, you can use report RSGENINVLAS.
This report regenerates all invalidated ABAP loads for every machine type that exists in your system.

Detailed information about SGEN can be found in SGEN Info button "Information on the SAP Load Generator"

On the other hand, the standalone SGEN is executed as described in details on this SCN document

 

Troubleshooting SGEN problems

 

The analysis of SGEN errors is similar to the XPRA  one. It should start by checking the job in SM37 and clicking on the 'Job Details' to verify which work process was used by the job. Then the corresponding dev_w* work process should be verified in ST11 or on the OS level in /work directory. Parallel to this investigation, ST22 should be checked for possible dumps.

1) check jog RSPARAGENR8M in SM37:

 

2) find the work process used by clicking on the 'Job Details' button:

 

3) check the work process in ST11 or directly on the OS level in /work directory:

 

Once the root cause has been found, please search for SAP notes/KBAs and SCN content for the solution. 

 

Notes and KBAs:

 

Error corrections:

2111715 LOAD_VERSION_LOST dumps
2098472 Short dump ASSERTION_FAILED in method GET_BLOCKS of class CL_SCV_MD_GENERATOR
2067520 Transaction SGEN consumes too many RFC resources
2061871 Report RSDBGENA with program RCOCB013 error DB803 "Screen contains overlapping
2040850 SGEN: fix for missing loads after combination of options in SGEN transaction /
2021688 Column store for table GENSETC
2019604 Fix for ATC in old SGEN RSPARAGENLOD
1996563 LOAD_VERSION_LOST short dumps occur after applying ABAP patches in release 7.4x
1917145 Open SQL: Patch collection
1869363 SGEN: Correction for selection of WebDynpros / BSPs
1849177 SGEN: Object selection of components gives incorrect result
1813419 Generic report calls in ABAP update tools
1793910 SGEN: duplicate keys in transaction SGEN after upgrade
1785264 Generation: Initialization of structures
1769777 SGEN: regenerate after upgrade results in empty set / 1 item
1768590 SGEN: Fix "Technical error (...)" for WebDynpros and BSPs
1757008 SGEN for upgrade components fail
1754690 SGEN UI: fix for software component display in unusual fonts
1743271 Syntax error in /PE1/CL_PE_PP_TASK_POOL
1740934 Buffer synchronization: Avoiding duplicate entries
1737670 Wrong count of syntax errors in SGEN batch job
1725140 SGEN: fix for sequential numbering of entries
1722170 Abort of SGEN in shadow system
1698461 Specific selection or deselection of servers for SGEN
1697804 SGEN generates too few loads during upgrade
1674257 SGEN selection of software component jumps to the start
1651645 Maximum number of SGEN processes cannot be greater than 9
1649918 System Copy: Task Content (2. Improvements)
1646868 SGEN generates deleted Web Dynpros in shadow system
1645864 SGEN generation errors do not cause an error message
1633118 SGEN deletes GENSETM when restarting
1630356 SGEN terminates after 500 generation errors
1627130 System Copy: Corrections to support new SGEN
1621860 SGEN:Generating Web Dynpros or BSP applications causes dumps
1595024 SGEN reads file REPLIST from variable directory
1588826 Limiting the SGEN generation set to 70 objects
1579447 SGEN runs in DEADLOCK situation
1567973 Transaction SGEN for various machine types
1559509 Source-Code plugins are incomplete or empty after EHP4 inst.
1553745 Renewed attempts of transaction SGEN in shadow system

 

How-to and Consulting notes

2061577 SGEN errors out with 500+ errors in recent SAP_BASIS versions
1998406 SYB: ASE errors "nrpacket: recv, Protocol error" during SWPM patch deployment /
1989778 FAQ: SGEN
1969105 Master data maintenance for InfoObjects does not start
1965893 RSGEN_LOAD_SHADOW fails during upgrade with the error: another generation job i
1965384 Running SGEN fails with error.
1946630 BP_BCL: Generation error after upgrade on EA_FINSERV 600-605 to SAP_ABA 7.31/ S
1913164 Error Program /1BCWDY/UJ7ZUKQ3CFMV4A6NLZD4==CP or similar
1897315 Cannot choose components for SGEN: No Components Selected
1865283 Error type: "comp offset does not match comp type"
1860998 Keine Datenausgabe beim Ausführen von IS-H-Statistikreports
1852013 Error Running SGEN - unable to initialize RFC group 'parallel_generators'
1732276 High availability limitations of HANA database
1607789 Dumps during the SGEN in shadow system
1605680 SYB: Troubleshoot the setup of the DBA Cockpit on Sybase ASE
1568076 Selection screens after upgrade
1245200 DBA: ICF Service-Activation for WebDynpro DBA Cockpit
1230076 Generation of ABAP loads: Tips for the analysis
886771 Generation in condition maintenance
744343 Tips for importing Support Packages with minimized downtime
672268 Runtime error LOAD_VERSION_LOST
589124 Performance improvements when Support Package imported
556994 FAQ: Upgrade tools
481548 Mass generation for new load format
419990 Deleting AS/400 ABAP loads and screen loads
418712 Generating self-defined program quantities w/ SGEN
406974 Scheduling new SGEN in the background
357330 AS/400: LCKW when starting R/3 System
356208 Locks on D010SINF after transport
312947 Information on generation table UPGLDGEN
185745 Mass generation due to incorrect load format
162991 Generation tools for ABAP programs
162166 DDIC_COMP_CNT_INCONSISTENT / GETWA_CANT_CLEAR ...

 

Performance


1132507 SGEN: Using maximum number of free work processes
985845 SGEN performance when determining objects to be generated
982053 0% displayed in job monitor in transaction SGEN

  • No labels