SAP GENERATE_REPORT_NAMES Function Module for Generate (report) names according to old or new naming convention









GENERATE_REPORT_NAMES is a standard generate report names 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 (report) names according to old or new naming convention 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 generate report names FM, simply by entering the name GENERATE_REPORT_NAMES into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRGE
Program Name: SAPLHRGE
Main Program:
Appliation area: P
Release date: 01-Jan-1970
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GENERATE_REPORT_NAMES 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 'GENERATE_REPORT_NAMES'"Generate (report) names according to old or new naming convention
EXPORTING
MOLGA = "Country indicator
PROCL = "Program class: calc / time
SHORT_NAME = "Short name (4 characters)
* HR_PROCL = 'C' "

IMPORTING
NAME = "Composite name

EXCEPTIONS
MOLGA_NOT_EXISTS = 1 PROCL_NOT_EXISTS = 2 MOLGA_CANNOT_USED_WITH_PROCL_T = 3 SHORT_NAME_NOT_ACCEPTED = 4
.



IMPORTING Parameters details for GENERATE_REPORT_NAMES

MOLGA - Country indicator

Data type: T500L-MOLGA
Optional: No
Call by Reference: No ( called with pass by value option)

PROCL - Program class: calc / time

Data type: T52A0-PROCL
Optional: No
Call by Reference: No ( called with pass by value option)

SHORT_NAME - Short name (4 characters)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HR_PROCL -

Data type: T52A0-PROCL
Default: 'C'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for GENERATE_REPORT_NAMES

NAME - Composite name

Data type: SY-REPID
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

MOLGA_NOT_EXISTS - No entry in T5001 for country grouping

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PROCL_NOT_EXISTS - This program class does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MOLGA_CANNOT_USED_WITH_PROCL_T - Prog. class T and country grp. <> 99

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SHORT_NAME_NOT_ACCEPTED - Short name contains a space

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for GENERATE_REPORT_NAMES 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_name  TYPE SY-REPID, "   
lv_molga  TYPE T500L-MOLGA, "   
lv_molga_not_exists  TYPE T500L, "   
lv_procl  TYPE T52A0-PROCL, "   
lv_procl_not_exists  TYPE T52A0, "   
lv_short_name  TYPE T52A0, "   
lv_molga_cannot_used_with_procl_t  TYPE T52A0, "   
lv_hr_procl  TYPE T52A0-PROCL, "   'C'
lv_short_name_not_accepted  TYPE T52A0. "   

  CALL FUNCTION 'GENERATE_REPORT_NAMES'  "Generate (report) names according to old or new naming convention
    EXPORTING
         MOLGA = lv_molga
         PROCL = lv_procl
         SHORT_NAME = lv_short_name
         HR_PROCL = lv_hr_procl
    IMPORTING
         NAME = lv_name
    EXCEPTIONS
        MOLGA_NOT_EXISTS = 1
        PROCL_NOT_EXISTS = 2
        MOLGA_CANNOT_USED_WITH_PROCL_T = 3
        SHORT_NAME_NOT_ACCEPTED = 4
. " GENERATE_REPORT_NAMES




ABAP code using 7.40 inline data declarations to call FM GENERATE_REPORT_NAMES

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_name).
 
"SELECT single MOLGA FROM T500L INTO @DATA(ld_molga).
 
 
"SELECT single PROCL FROM T52A0 INTO @DATA(ld_procl).
 
 
 
 
"SELECT single PROCL FROM T52A0 INTO @DATA(ld_hr_procl).
DATA(ld_hr_procl) = 'C'.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!