SAP /SAPAPO/TS_GENER_CODING Function Module for Generate Coding
/SAPAPO/TS_GENER_CODING is a standard /sapapo/ts gener coding SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generate Coding processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for /sapapo/ts gener coding FM, simply by entering the name /SAPAPO/TS_GENER_CODING into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPAPO/OO_TS_GENER
Program Name: /SAPAPO/SAPLOO_TS_GENER
Main Program: /SAPAPO/SAPLOO_TS_GENER
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPAPO/TS_GENER_CODING pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION '/SAPAPO/TS_GENER_CODING'"Generate Coding.
EXPORTING
* I_PLOBID = "GUID zur Identifizierung einer Planungsobjektstruktur
* I_INFOCUBE = "InfoCube
* I_PROGCLASS = 'PSTRU_BASIC_FORMS' "BW Generierungs-Tool: Programmklasse f. generierte Programme
* I_FORCE_GENERATION = "ohne Zeitstempelprüfung generieren
* I_PAREAID = "ID eines S&D Planungsbereich
IMPORTING
E_GEN_REPID = "ABAP-Programm, aktuelles Rahmenprogramm
EXCEPTIONS
GENERATION_FAILED = 1
IMPORTING Parameters details for /SAPAPO/TS_GENER_CODING
I_PLOBID - GUID zur Identifizierung einer Planungsobjektstruktur
Data type: /SAPAPO/TS_PLOBIDOptional: Yes
Call by Reference: Yes
I_INFOCUBE - InfoCube
Data type: RSINFOCUBEOptional: Yes
Call by Reference: Yes
I_PROGCLASS - BW Generierungs-Tool: Programmklasse f. generierte Programme
Data type: RSSGTPCLA-PROGCLASSDefault: 'PSTRU_BASIC_FORMS'
Optional: Yes
Call by Reference: Yes
I_FORCE_GENERATION - ohne Zeitstempelprüfung generieren
Data type: RS_BOOLOptional: Yes
Call by Reference: Yes
I_PAREAID - ID eines S&D Planungsbereich
Data type: /SAPAPO/TS_PAREAIDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for /SAPAPO/TS_GENER_CODING
E_GEN_REPID - ABAP-Programm, aktuelles Rahmenprogramm
Data type: SY-REPIDOptional: No
Call by Reference: Yes
EXCEPTIONS details
GENERATION_FAILED - Parameter /sapapo/gebug_flag auf 'G' setzen!
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /SAPAPO/TS_GENER_CODING Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_i_plobid | TYPE /SAPAPO/TS_PLOBID, " | |||
| lv_e_gen_repid | TYPE SY-REPID, " | |||
| lv_generation_failed | TYPE SY, " | |||
| lv_i_infocube | TYPE RSINFOCUBE, " | |||
| lv_i_progclass | TYPE RSSGTPCLA-PROGCLASS, " 'PSTRU_BASIC_FORMS' | |||
| lv_i_force_generation | TYPE RS_BOOL, " | |||
| lv_i_pareaid | TYPE /SAPAPO/TS_PAREAID. " |
|   CALL FUNCTION '/SAPAPO/TS_GENER_CODING' "Generate Coding |
| EXPORTING | ||
| I_PLOBID | = lv_i_plobid | |
| I_INFOCUBE | = lv_i_infocube | |
| I_PROGCLASS | = lv_i_progclass | |
| I_FORCE_GENERATION | = lv_i_force_generation | |
| I_PAREAID | = lv_i_pareaid | |
| IMPORTING | ||
| E_GEN_REPID | = lv_e_gen_repid | |
| EXCEPTIONS | ||
| GENERATION_FAILED = 1 | ||
| . " /SAPAPO/TS_GENER_CODING | ||
ABAP code using 7.40 inline data declarations to call FM /SAPAPO/TS_GENER_CODING
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single REPID FROM SY INTO @DATA(ld_e_gen_repid). | ||||
| "SELECT single PROGCLASS FROM RSSGTPCLA INTO @DATA(ld_i_progclass). | ||||
| DATA(ld_i_progclass) | = 'PSTRU_BASIC_FORMS'. | |||
Search for further information about these or an SAP related objects