SAP Function Modules

RS_FUNCTION_POOL_INSERT SAP Function module - Create a new function group







RS_FUNCTION_POOL_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_FUNCTION_POOL_INSERT into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM RS_FUNCTION_POOL_INSERT - RS FUNCTION POOL INSERT





CALL FUNCTION 'RS_FUNCTION_POOL_INSERT' "Create a new function group
  EXPORTING
    function_pool =             " rsnewleng-area
    short_text =                " tftit-stext
*   responsible = SY-UNAME      " sy-uname
*   namespace = SPACE           " rs38l-namespace
*   devclass =                  " rs38l-devclass
*   suppress_language_check = 'X'  " rs38l-head
*   authority_check = 'X'       " rs38l-head
*   suppress_corr_check = 'X'   " rs38l-extern
*   unicode_checks = 'X'        " trdir-uccheck  Flag, if unicode check was performed
  IMPORTING
    corrnum =                   " e071-trkorr
  EXCEPTIONS
    NAME_ALREADY_EXISTS = 1     "
    NAME_NOT_CORRECT = 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       "
    UNDEFINED_ERROR = 11        "
    .  "  RS_FUNCTION_POOL_INSERT

ABAP code example for Function Module RS_FUNCTION_POOL_INSERT





The ABAP code below is a full code listing to execute function module RS_FUNCTION_POOL_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_corrnum  TYPE E071-TRKORR .


DATA(ld_function_pool) = some text here

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

DATA(ld_responsible) = 'some text here'.

DATA(ld_namespace) = some text here

DATA(ld_devclass) = some text here

DATA(ld_suppress_language_check) = some text here

DATA(ld_authority_check) = some text here

DATA(ld_suppress_corr_check) = some text here

SELECT single UCCHECK
FROM TRDIR
INTO @DATA(ld_unicode_checks).
. CALL FUNCTION 'RS_FUNCTION_POOL_INSERT' EXPORTING function_pool = ld_function_pool short_text = ld_short_text * responsible = ld_responsible * namespace = ld_namespace * devclass = ld_devclass * suppress_language_check = ld_suppress_language_check * authority_check = ld_authority_check * suppress_corr_check = ld_suppress_corr_check * unicode_checks = ld_unicode_checks IMPORTING corrnum = ld_corrnum EXCEPTIONS NAME_ALREADY_EXISTS = 1 NAME_NOT_CORRECT = 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 UNDEFINED_ERROR = 11 . " RS_FUNCTION_POOL_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 ELSEIF SY-SUBRC EQ 11. "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_corrnum  TYPE E071-TRKORR ,
ld_function_pool  TYPE RSNEWLENG-AREA ,
ld_short_text  TYPE TFTIT-STEXT ,
ld_responsible  TYPE SY-UNAME ,
ld_namespace  TYPE RS38L-NAMESPACE ,
ld_devclass  TYPE RS38L-DEVCLASS ,
ld_suppress_language_check  TYPE RS38L-HEAD ,
ld_authority_check  TYPE RS38L-HEAD ,
ld_suppress_corr_check  TYPE RS38L-EXTERN ,
ld_unicode_checks  TYPE TRDIR-UCCHECK .


ld_function_pool = some text here

SELECT single STEXT
FROM TFTIT
INTO ld_short_text.

ld_responsible = 'some text here'.

ld_namespace = some text here

ld_devclass = some text here

ld_suppress_language_check = some text here

ld_authority_check = some text here

ld_suppress_corr_check = some text here

SELECT single UCCHECK
FROM TRDIR
INTO ld_unicode_checks.

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_FUNCTION_POOL_INSERT or its description.