SAP RSS_METAPROGRAM_GENERATE Function Module for









RSS_METAPROGRAM_GENERATE is a standard rss metaprogram generate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 rss metaprogram generate FM, simply by entering the name RSS_METAPROGRAM_GENERATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: RSSG
Program Name: SAPLRSSG
Main Program: SAPLRSSG
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RSS_METAPROGRAM_GENERATE 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 'RSS_METAPROGRAM_GENERATE'"
EXPORTING
I_PROGRAM_CLASS = "Program Class
* I_USE_METACLASS = RSSG_C_TRUE "
* I_DB_COMMIT = RSSG_C_FALSE "
* I_SCOPE = '2' "
* I_TEMPLATE = "
* I_FORCE_COMPILATION = RSSG_C_FALSE "
* I_DEBUG_LEVEL = 0 "
* I_NO_SYNTAX_CHECK = RSSG_C_FALSE "
* I_AND_LOAD = RSSG_C_FALSE "
* I_SECONDS_TO_WAIT = 30 "
* I_NO_RDIR_CHECK = RSSG_C_FALSE "
* I_BUFFERED = RSSG_C_FALSE "

IMPORTING
E_PROGRAM_NAME = "ABAP Program: Current Main Program
E_PROGRAM_GENERATED = "
E_ERROR_LINE = "Internal Tables, Current Row Index
E_ERROR_MESSAGE = "
E_UCCHECK = "Flag, if unicode check was performed

EXCEPTIONS
INVALID_PROGRAM_CLASS = 1 FOREIGN_LOCK = 2 SYSTEM_FAILURE = 3 TEMPLATE_NOT_FOUND = 4 TEMPLATE_SYNTAX_ERROR = 5 PROGRAM_SYNTAX_ERROR = 6 INSERT_ERROR = 7 INTERNAL_ERROR = 8
.



IMPORTING Parameters details for RSS_METAPROGRAM_GENERATE

I_PROGRAM_CLASS - Program Class

Data type: RSSG_PROGCLASS
Optional: No
Call by Reference: Yes

I_USE_METACLASS -

Data type: RSSG_BOOL
Default: RSSG_C_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DB_COMMIT -

Data type: RSSG_BOOL
Default: RSSG_C_FALSE
Optional: Yes
Call by Reference: Yes

I_SCOPE -

Data type: RSSG_SCOPE
Default: '2'
Optional: Yes
Call by Reference: Yes

I_TEMPLATE -

Data type: SY-REPID
Optional: Yes
Call by Reference: Yes

I_FORCE_COMPILATION -

Data type: RSSG_BOOL
Default: RSSG_C_FALSE
Optional: Yes
Call by Reference: Yes

I_DEBUG_LEVEL -

Data type: I
Optional: Yes
Call by Reference: Yes

I_NO_SYNTAX_CHECK -

Data type: RSSG_BOOL
Default: RSSG_C_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_AND_LOAD -

Data type: RSSG_BOOL
Default: RSSG_C_FALSE
Optional: Yes
Call by Reference: Yes

I_SECONDS_TO_WAIT -

Data type: I
Default: 30
Optional: Yes
Call by Reference: Yes

I_NO_RDIR_CHECK -

Data type: RSSG_BOOL
Default: RSSG_C_FALSE
Optional: Yes
Call by Reference: Yes

I_BUFFERED -

Data type: RSSG_BOOL
Default: RSSG_C_FALSE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for RSS_METAPROGRAM_GENERATE

E_PROGRAM_NAME - ABAP Program: Current Main Program

Data type: SY-REPID
Optional: No
Call by Reference: Yes

E_PROGRAM_GENERATED -

Data type: RSSG_BOOL
Optional: No
Call by Reference: Yes

E_ERROR_LINE - Internal Tables, Current Row Index

Data type: SY-TABIX
Optional: No
Call by Reference: Yes

E_ERROR_MESSAGE -

Data type: RSSG_MESSAGE
Optional: No
Call by Reference: Yes

E_UCCHECK - Flag, if unicode check was performed

Data type: UCCHECK
Optional: No
Call by Reference: Yes

EXCEPTIONS details

INVALID_PROGRAM_CLASS -

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

FOREIGN_LOCK -

Data type:
Optional: No
Call by Reference: Yes

SYSTEM_FAILURE -

Data type:
Optional: No
Call by Reference: Yes

TEMPLATE_NOT_FOUND -

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

TEMPLATE_SYNTAX_ERROR -

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

PROGRAM_SYNTAX_ERROR -

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

INSERT_ERROR -

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RSS_METAPROGRAM_GENERATE 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_e_program_name  TYPE SY-REPID, "   
lv_i_program_class  TYPE RSSG_PROGCLASS, "   
lv_invalid_program_class  TYPE RSSG_PROGCLASS, "   
lv_i_use_metaclass  TYPE RSSG_BOOL, "   RSSG_C_TRUE
lv_i_db_commit  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_i_scope  TYPE RSSG_SCOPE, "   '2'
lv_i_template  TYPE SY-REPID, "   
lv_foreign_lock  TYPE SY, "   
lv_e_program_generated  TYPE RSSG_BOOL, "   
lv_e_error_line  TYPE SY-TABIX, "   
lv_system_failure  TYPE SY, "   
lv_i_force_compilation  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_i_debug_level  TYPE I, "   0
lv_e_error_message  TYPE RSSG_MESSAGE, "   
lv_template_not_found  TYPE RSSG_MESSAGE, "   
lv_e_uccheck  TYPE UCCHECK, "   
lv_i_no_syntax_check  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_template_syntax_error  TYPE RSSG_BOOL, "   
lv_i_and_load  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_program_syntax_error  TYPE RSSG_BOOL, "   
lv_insert_error  TYPE RSSG_BOOL, "   
lv_i_seconds_to_wait  TYPE I, "   30
lv_internal_error  TYPE I, "   
lv_i_no_rdir_check  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_i_buffered  TYPE RSSG_BOOL. "   RSSG_C_FALSE

  CALL FUNCTION 'RSS_METAPROGRAM_GENERATE'  "
    EXPORTING
         I_PROGRAM_CLASS = lv_i_program_class
         I_USE_METACLASS = lv_i_use_metaclass
         I_DB_COMMIT = lv_i_db_commit
         I_SCOPE = lv_i_scope
         I_TEMPLATE = lv_i_template
         I_FORCE_COMPILATION = lv_i_force_compilation
         I_DEBUG_LEVEL = lv_i_debug_level
         I_NO_SYNTAX_CHECK = lv_i_no_syntax_check
         I_AND_LOAD = lv_i_and_load
         I_SECONDS_TO_WAIT = lv_i_seconds_to_wait
         I_NO_RDIR_CHECK = lv_i_no_rdir_check
         I_BUFFERED = lv_i_buffered
    IMPORTING
         E_PROGRAM_NAME = lv_e_program_name
         E_PROGRAM_GENERATED = lv_e_program_generated
         E_ERROR_LINE = lv_e_error_line
         E_ERROR_MESSAGE = lv_e_error_message
         E_UCCHECK = lv_e_uccheck
    EXCEPTIONS
        INVALID_PROGRAM_CLASS = 1
        FOREIGN_LOCK = 2
        SYSTEM_FAILURE = 3
        TEMPLATE_NOT_FOUND = 4
        TEMPLATE_SYNTAX_ERROR = 5
        PROGRAM_SYNTAX_ERROR = 6
        INSERT_ERROR = 7
        INTERNAL_ERROR = 8
. " RSS_METAPROGRAM_GENERATE




ABAP code using 7.40 inline data declarations to call FM RSS_METAPROGRAM_GENERATE

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_program_name).
 
 
 
DATA(ld_i_use_metaclass) = RSSG_C_TRUE.
 
DATA(ld_i_db_commit) = RSSG_C_FALSE.
 
DATA(ld_i_scope) = '2'.
 
"SELECT single REPID FROM SY INTO @DATA(ld_i_template).
 
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_e_error_line).
 
 
DATA(ld_i_force_compilation) = RSSG_C_FALSE.
 
 
 
 
 
DATA(ld_i_no_syntax_check) = RSSG_C_FALSE.
 
 
DATA(ld_i_and_load) = RSSG_C_FALSE.
 
 
 
DATA(ld_i_seconds_to_wait) = 30.
 
 
DATA(ld_i_no_rdir_check) = RSSG_C_FALSE.
 
DATA(ld_i_buffered) = RSSG_C_FALSE.
 


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!