SAP Function Modules

RS_FUNCTIONMODULE_INSERT SAP Function module - Insert a function module in the R/3 development environment







RS_FUNCTIONMODULE_INSERT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RS_FUNCTIONMODULE_INSERT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SEUF
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM RS_FUNCTIONMODULE_INSERT - RS FUNCTIONMODULE INSERT





CALL FUNCTION 'RS_FUNCTIONMODULE_INSERT' "Insert a function module in the R/3 development environment
  EXPORTING
    funcname =                  " rs38l-name    Function Module Name
    function_pool =             " rs38l-area
*   interface_global = SPACE    " rs38l-global  Global interface ID
*   remote_call = SPACE         " rs38l-remote
    short_text =                " tftit-stext
*   suppress_corr_check = 'X'   " rs38l-extern
*   update_task = SPACE         " rs38l-ukind1
*   corrnum = SPACE             " e071-trkorr   Correction Number
*   namespace = SPACE           " rs38l-namespace  Namespace
*   suppress_language_check = 'X'  " rs38l-head
*   authority_check = 'X'       " rs38l-head
*   save_active = 'X'           " rs38l-head
*   new_source =                " rsfb_source
*   exception_class = SPACE     " char1
*   suppress_upgrade_check = SPACE  " char1
*   remote_basxml_supported = SPACE  " char1
*   rfc_attributes = SPACE      " ucon_rfc_service_attributes
  IMPORTING
    function_include =          " rs38l-include
    corrnum_e =                 " e071-trkorr
* TABLES
*   import_parameter =          " rsimp         Import Parameters
*   export_parameter =          " rsexp         Export Parameters
*   tables_parameter =          " rstbl         Table Parameters
*   changing_parameter =        " rscha
*   exception_list =            " rsexc         List of exceptions
*   parameter_docu =            " rsfdo
*   source =                    " rssource
  EXCEPTIONS
    DOUBLE_TASK = 1             "
    ERROR_MESSAGE = 2           "
    FUNCTION_ALREADY_EXISTS = 3  "
    INVALID_FUNCTION_POOL = 4   "
    INVALID_NAME = 5            "
    TOO_MANY_FUNCTIONS = 6      "
    NO_MODIFY_PERMISSION = 7    "
    NO_SHOW_PERMISSION = 8      "
    ENQUEUE_SYSTEM_FAILURE = 9  "
    CANCELED_IN_CORR = 10       "
    .  "  RS_FUNCTIONMODULE_INSERT

ABAP code example for Function Module RS_FUNCTIONMODULE_INSERT





The ABAP code below is a full code listing to execute function module RS_FUNCTIONMODULE_INSERT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_function_include  TYPE RS38L-INCLUDE ,
ld_corrnum_e  TYPE E071-TRKORR ,
it_import_parameter  TYPE STANDARD TABLE OF RSIMP,"TABLES PARAM
wa_import_parameter  LIKE LINE OF it_import_parameter ,
it_export_parameter  TYPE STANDARD TABLE OF RSEXP,"TABLES PARAM
wa_export_parameter  LIKE LINE OF it_export_parameter ,
it_tables_parameter  TYPE STANDARD TABLE OF RSTBL,"TABLES PARAM
wa_tables_parameter  LIKE LINE OF it_tables_parameter ,
it_changing_parameter  TYPE STANDARD TABLE OF RSCHA,"TABLES PARAM
wa_changing_parameter  LIKE LINE OF it_changing_parameter ,
it_exception_list  TYPE STANDARD TABLE OF RSEXC,"TABLES PARAM
wa_exception_list  LIKE LINE OF it_exception_list ,
it_parameter_docu  TYPE STANDARD TABLE OF RSFDO,"TABLES PARAM
wa_parameter_docu  LIKE LINE OF it_parameter_docu ,
it_source  TYPE STANDARD TABLE OF RSSOURCE,"TABLES PARAM
wa_source  LIKE LINE OF it_source .


DATA(ld_funcname) = some text here

DATA(ld_function_pool) = some text here

DATA(ld_interface_global) = some text here

DATA(ld_remote_call) = some text here

SELECT single STEXT
FROM TFTIT
INTO @DATA(ld_short_text).


DATA(ld_suppress_corr_check) = some text here

DATA(ld_update_task) = some text here

SELECT single TRKORR
FROM E071
INTO @DATA(ld_corrnum).


DATA(ld_namespace) = some text here

DATA(ld_suppress_language_check) = some text here

DATA(ld_authority_check) = some text here

DATA(ld_save_active) = some text here
DATA(ld_new_source) = 'Check type of data required'.
DATA(ld_exception_class) = 'Check type of data required'.
DATA(ld_suppress_upgrade_check) = 'Check type of data required'.
DATA(ld_remote_basxml_supported) = 'Check type of data required'.
DATA(ld_rfc_attributes) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_import_parameter to it_import_parameter.

"populate fields of struture and append to itab
append wa_export_parameter to it_export_parameter.

"populate fields of struture and append to itab
append wa_tables_parameter to it_tables_parameter.

"populate fields of struture and append to itab
append wa_changing_parameter to it_changing_parameter.

"populate fields of struture and append to itab
append wa_exception_list to it_exception_list.

"populate fields of struture and append to itab
append wa_parameter_docu to it_parameter_docu.

"populate fields of struture and append to itab
append wa_source to it_source. . CALL FUNCTION 'RS_FUNCTIONMODULE_INSERT' EXPORTING funcname = ld_funcname function_pool = ld_function_pool * interface_global = ld_interface_global * remote_call = ld_remote_call short_text = ld_short_text * suppress_corr_check = ld_suppress_corr_check * update_task = ld_update_task * corrnum = ld_corrnum * namespace = ld_namespace * suppress_language_check = ld_suppress_language_check * authority_check = ld_authority_check * save_active = ld_save_active * new_source = ld_new_source * exception_class = ld_exception_class * suppress_upgrade_check = ld_suppress_upgrade_check * remote_basxml_supported = ld_remote_basxml_supported * rfc_attributes = ld_rfc_attributes IMPORTING function_include = ld_function_include corrnum_e = ld_corrnum_e * TABLES * import_parameter = it_import_parameter * export_parameter = it_export_parameter * tables_parameter = it_tables_parameter * changing_parameter = it_changing_parameter * exception_list = it_exception_list * parameter_docu = it_parameter_docu * source = it_source EXCEPTIONS DOUBLE_TASK = 1 ERROR_MESSAGE = 2 FUNCTION_ALREADY_EXISTS = 3 INVALID_FUNCTION_POOL = 4 INVALID_NAME = 5 TOO_MANY_FUNCTIONS = 6 NO_MODIFY_PERMISSION = 7 NO_SHOW_PERMISSION = 8 ENQUEUE_SYSTEM_FAILURE = 9 CANCELED_IN_CORR = 10 . " RS_FUNCTIONMODULE_INSERT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_function_include  TYPE RS38L-INCLUDE ,
ld_funcname  TYPE RS38L-NAME ,
it_import_parameter  TYPE STANDARD TABLE OF RSIMP ,
wa_import_parameter  LIKE LINE OF it_import_parameter,
ld_corrnum_e  TYPE E071-TRKORR ,
ld_function_pool  TYPE RS38L-AREA ,
it_export_parameter  TYPE STANDARD TABLE OF RSEXP ,
wa_export_parameter  LIKE LINE OF it_export_parameter,
ld_interface_global  TYPE RS38L-GLOBAL ,
it_tables_parameter  TYPE STANDARD TABLE OF RSTBL ,
wa_tables_parameter  LIKE LINE OF it_tables_parameter,
ld_remote_call  TYPE RS38L-REMOTE ,
it_changing_parameter  TYPE STANDARD TABLE OF RSCHA ,
wa_changing_parameter  LIKE LINE OF it_changing_parameter,
it_exception_list  TYPE STANDARD TABLE OF RSEXC ,
wa_exception_list  LIKE LINE OF it_exception_list,
ld_short_text  TYPE TFTIT-STEXT ,
it_parameter_docu  TYPE STANDARD TABLE OF RSFDO ,
wa_parameter_docu  LIKE LINE OF it_parameter_docu,
ld_suppress_corr_check  TYPE RS38L-EXTERN ,
it_source  TYPE STANDARD TABLE OF RSSOURCE ,
wa_source  LIKE LINE OF it_source,
ld_update_task  TYPE RS38L-UKIND1 ,
ld_corrnum  TYPE E071-TRKORR ,
ld_namespace  TYPE RS38L-NAMESPACE ,
ld_suppress_language_check  TYPE RS38L-HEAD ,
ld_authority_check  TYPE RS38L-HEAD ,
ld_save_active  TYPE RS38L-HEAD ,
ld_new_source  TYPE RSFB_SOURCE ,
ld_exception_class  TYPE CHAR1 ,
ld_suppress_upgrade_check  TYPE CHAR1 ,
ld_remote_basxml_supported  TYPE CHAR1 ,
ld_rfc_attributes  TYPE UCON_RFC_SERVICE_ATTRIBUTES .


ld_funcname = some text here

"populate fields of struture and append to itab
append wa_import_parameter to it_import_parameter.

ld_function_pool = some text here

"populate fields of struture and append to itab
append wa_export_parameter to it_export_parameter.

ld_interface_global = some text here

"populate fields of struture and append to itab
append wa_tables_parameter to it_tables_parameter.

ld_remote_call = some text here

"populate fields of struture and append to itab
append wa_changing_parameter to it_changing_parameter.

"populate fields of struture and append to itab
append wa_exception_list to it_exception_list.

SELECT single STEXT
FROM TFTIT
INTO ld_short_text.


"populate fields of struture and append to itab
append wa_parameter_docu to it_parameter_docu.

ld_suppress_corr_check = some text here

"populate fields of struture and append to itab
append wa_source to it_source.

ld_update_task = some text here

SELECT single TRKORR
FROM E071
INTO ld_corrnum.


ld_namespace = some text here

ld_suppress_language_check = some text here

ld_authority_check = some text here

ld_save_active = some text here
ld_new_source = 'Check type of data required'.
ld_exception_class = 'Check type of data required'.
ld_suppress_upgrade_check = 'Check type of data required'.
ld_remote_basxml_supported = 'Check type of data required'.
ld_rfc_attributes = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RS_FUNCTIONMODULE_INSERT or its description.