SAP RSS_TEMPLATE_INSTANTIATE Function Module for









RSS_TEMPLATE_INSTANTIATE is a standard rss template instantiate 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 template instantiate FM, simply by entering the name RSS_TEMPLATE_INSTANTIATE 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_TEMPLATE_INSTANTIATE 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_TEMPLATE_INSTANTIATE'"
EXPORTING
* I_TEMPLATE = "Template
* I_FORCE_COMPILATION = "
* I_NO_PROGRAM_CHECK = RSSG_C_FALSE "
* I_DEBUG_LEVEL = "
* I_USE_METACLASS = RSSG_C_FALSE "
* I_SECONDS_TO_WAIT = 30 "
* I_NO_RDIR_CHECK = RSSG_C_TRUE "
* I_BUFFERED = RSSG_C_TRUE "
* I_DB_COMMIT = RSSG_C_FALSE "
* I_NO_COMMENT_LINE_SPLIT = RSSG_C_FALSE "
* I_PROGRAM_NAME = "Program to be generated
* I_PROGRAM_TYPE = 1 "Program Type
* I_META_OBJECT = "
* I_PROGRAM_CLASS = "BW generation tool: Program class for generated programs
* I_UNI_IDC25 = "BW Generation tool: GUID in compressed form (CHAR25)
* I_CLIENT = SY-MANDT "Client
* I_GLOBAL_CHECK = "
* I_GLOBAL_PROGRAM = "Main program

IMPORTING
O_ERROR_LINE = "Line number of syntax error
E_RX_EXCEPTION = "
O_ERROR_MESSAGE = "Error message
E_ERROR_LINE = "
E_ERROR_MESSAGE = "
E_T_CODE = "
E_T_VARCODE = "
E_UCCHECK = "Flag, if unicode check was performed
E_T_TEMPLATE_REF = "For internal use only
E_TH_PDIRSUB = "

CHANGING
* C_TX_TEXTPOOL = "BW Generation Tool: Text Pool

TABLES
* E_T_PROGRAM_SOURCE = "

EXCEPTIONS
TEMPLATE_NOT_FOUND = 1 TEMPLATE_SYNTAX_ERROR = 2 PROGRAM_SYNTAX_ERROR = 3 INTERNAL_ERROR = 4 INVALID_INPUT = 5 GENERATION_ERROR = 6
.



IMPORTING Parameters details for RSS_TEMPLATE_INSTANTIATE

I_TEMPLATE - Template

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

I_FORCE_COMPILATION -

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

I_NO_PROGRAM_CHECK -

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

I_DEBUG_LEVEL -

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

I_USE_METACLASS -

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_TRUE
Optional: Yes
Call by Reference: Yes

I_BUFFERED -

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

I_DB_COMMIT -

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

I_NO_COMMENT_LINE_SPLIT -

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

I_PROGRAM_NAME - Program to be generated

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

I_PROGRAM_TYPE - Program Type

Data type: TRDIR-SUBC
Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_META_OBJECT -

Data type:
Optional: Yes
Call by Reference: Yes

I_PROGRAM_CLASS - BW generation tool: Program class for generated programs

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

I_UNI_IDC25 - BW Generation tool: GUID in compressed form (CHAR25)

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

I_CLIENT - Client

Data type: RSSG_CLIENT
Default: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GLOBAL_CHECK -

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

I_GLOBAL_PROGRAM - Main program

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

EXPORTING Parameters details for RSS_TEMPLATE_INSTANTIATE

O_ERROR_LINE - Line number of syntax error

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

E_RX_EXCEPTION -

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

O_ERROR_MESSAGE - Error message

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

E_ERROR_LINE -

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

E_ERROR_MESSAGE -

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

E_T_CODE -

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

E_T_VARCODE -

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

E_UCCHECK - Flag, if unicode check was performed

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

E_T_TEMPLATE_REF - For internal use only

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

E_TH_PDIRSUB -

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

CHANGING Parameters details for RSS_TEMPLATE_INSTANTIATE

C_TX_TEXTPOOL - BW Generation Tool: Text Pool

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

TABLES Parameters details for RSS_TEMPLATE_INSTANTIATE

E_T_PROGRAM_SOURCE -

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

EXCEPTIONS details

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)

INTERNAL_ERROR - Internal Error

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

INVALID_INPUT -

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

GENERATION_ERROR -

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

Copy and paste ABAP code example for RSS_TEMPLATE_INSTANTIATE 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_template  TYPE SY-REPID, "   
lv_o_error_line  TYPE SY-TABIX, "   
lv_c_tx_textpool  TYPE RSSG_TX_TP, "   
lt_e_t_program_source  TYPE STANDARD TABLE OF ABAPSOURCE, "   
lv_template_not_found  TYPE ABAPSOURCE, "   
lv_e_rx_exception  TYPE CX_ROOT, "   
lv_i_force_compilation  TYPE CX_ROOT, "   
lv_i_no_program_check  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_i_debug_level  TYPE I, "   
lv_i_use_metaclass  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_i_seconds_to_wait  TYPE I, "   30
lv_i_no_rdir_check  TYPE RSSG_BOOL, "   RSSG_C_TRUE
lv_i_buffered  TYPE RSSG_BOOL, "   RSSG_C_TRUE
lv_i_db_commit  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_i_no_comment_line_split  TYPE RSSG_BOOL, "   RSSG_C_FALSE
lv_i_program_name  TYPE SY-REPID, "   
lv_o_error_message  TYPE C, "   
lv_template_syntax_error  TYPE C, "   
lv_e_error_line  TYPE SY-TABIX, "   
lv_i_program_type  TYPE TRDIR-SUBC, "   1
lv_program_syntax_error  TYPE TRDIR, "   
lv_i_meta_object  TYPE TRDIR, "   
lv_internal_error  TYPE TRDIR, "   
lv_e_error_message  TYPE RSSG_MESSAGE, "   
lv_e_t_code  TYPE RSSG_T_CODELINE, "   
lv_invalid_input  TYPE RSSG_T_CODELINE, "   
lv_i_program_class  TYPE RSSG_PROGCLASS, "   
lv_e_t_varcode  TYPE RSSG_T_VARLINE, "   
lv_i_uni_idc25  TYPE RSSG_UNI_IDC25, "   
lv_generation_error  TYPE RSSG_UNI_IDC25, "   
lv_i_client  TYPE RSSG_CLIENT, "   SY-MANDT
lv_e_uccheck  TYPE UCCHECK, "   
lv_i_global_check  TYPE SY-CALLD, "   
lv_e_t_template_ref  TYPE RSSG_T_TEMPLREF, "   
lv_e_th_pdirsub  TYPE RSSG_TH_PDIRSUB, "   
lv_i_global_program  TYPE SY-REPID. "   

  CALL FUNCTION 'RSS_TEMPLATE_INSTANTIATE'  "
    EXPORTING
         I_TEMPLATE = lv_i_template
         I_FORCE_COMPILATION = lv_i_force_compilation
         I_NO_PROGRAM_CHECK = lv_i_no_program_check
         I_DEBUG_LEVEL = lv_i_debug_level
         I_USE_METACLASS = lv_i_use_metaclass
         I_SECONDS_TO_WAIT = lv_i_seconds_to_wait
         I_NO_RDIR_CHECK = lv_i_no_rdir_check
         I_BUFFERED = lv_i_buffered
         I_DB_COMMIT = lv_i_db_commit
         I_NO_COMMENT_LINE_SPLIT = lv_i_no_comment_line_split
         I_PROGRAM_NAME = lv_i_program_name
         I_PROGRAM_TYPE = lv_i_program_type
         I_META_OBJECT = lv_i_meta_object
         I_PROGRAM_CLASS = lv_i_program_class
         I_UNI_IDC25 = lv_i_uni_idc25
         I_CLIENT = lv_i_client
         I_GLOBAL_CHECK = lv_i_global_check
         I_GLOBAL_PROGRAM = lv_i_global_program
    IMPORTING
         O_ERROR_LINE = lv_o_error_line
         E_RX_EXCEPTION = lv_e_rx_exception
         O_ERROR_MESSAGE = lv_o_error_message
         E_ERROR_LINE = lv_e_error_line
         E_ERROR_MESSAGE = lv_e_error_message
         E_T_CODE = lv_e_t_code
         E_T_VARCODE = lv_e_t_varcode
         E_UCCHECK = lv_e_uccheck
         E_T_TEMPLATE_REF = lv_e_t_template_ref
         E_TH_PDIRSUB = lv_e_th_pdirsub
    CHANGING
         C_TX_TEXTPOOL = lv_c_tx_textpool
    TABLES
         E_T_PROGRAM_SOURCE = lt_e_t_program_source
    EXCEPTIONS
        TEMPLATE_NOT_FOUND = 1
        TEMPLATE_SYNTAX_ERROR = 2
        PROGRAM_SYNTAX_ERROR = 3
        INTERNAL_ERROR = 4
        INVALID_INPUT = 5
        GENERATION_ERROR = 6
. " RSS_TEMPLATE_INSTANTIATE




ABAP code using 7.40 inline data declarations to call FM RSS_TEMPLATE_INSTANTIATE

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_i_template).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_o_error_line).
 
 
 
 
 
 
DATA(ld_i_no_program_check) = RSSG_C_FALSE.
 
 
DATA(ld_i_use_metaclass) = RSSG_C_FALSE.
 
DATA(ld_i_seconds_to_wait) = 30.
 
DATA(ld_i_no_rdir_check) = RSSG_C_TRUE.
 
DATA(ld_i_buffered) = RSSG_C_TRUE.
 
DATA(ld_i_db_commit) = RSSG_C_FALSE.
 
DATA(ld_i_no_comment_line_split) = RSSG_C_FALSE.
 
"SELECT single REPID FROM SY INTO @DATA(ld_i_program_name).
 
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_e_error_line).
 
"SELECT single SUBC FROM TRDIR INTO @DATA(ld_i_program_type).
DATA(ld_i_program_type) = 1.
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_client) = SY-MANDT.
 
 
"SELECT single CALLD FROM SY INTO @DATA(ld_i_global_check).
 
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_i_global_program).
 


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!