SAP Function Modules

RH_SAP_ORG_OBJECT_CALL_METHOD SAP Function module - SAP Organizational Object General Method Call







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

Associated Function Group: RHWN
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RH_SAP_ORG_OBJECT_CALL_METHOD - RH SAP ORG OBJECT CALL METHOD





CALL FUNCTION 'RH_SAP_ORG_OBJECT_CALL_METHOD' "SAP Organizational Object General Method Call
  EXPORTING
    method_name =               " swotinvoke-verb
    objtyp =                    " borpar-objtyp
*   objkey =                    " borpar-objkey
*   target_objtyp =             " borpar-objtyp
*   target_objkey =             " borpar-objkey
*   begda = SY-DATUM            " borpar-begda
*   endda = SY-DATUM            " borpar-endda
*   plvar =                     " wplog-plvar
*   suppressdialog =            " borpar-flag_x
  IMPORTING
    new_objkey =                " borpar-objkey
    corr_number =               " borpar-trkorr
* TABLES
*   objkey_tab =                "
  EXCEPTIONS
    OBJECT_NOT_FOUND = 1        "
    METHOD_NOT_FOUND = 2        "
    ERROR_IN_METHOD = 3         "
    .  "  RH_SAP_ORG_OBJECT_CALL_METHOD

ABAP code example for Function Module RH_SAP_ORG_OBJECT_CALL_METHOD





The ABAP code below is a full code listing to execute function module RH_SAP_ORG_OBJECT_CALL_METHOD 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_new_objkey  TYPE BORPAR-OBJKEY ,
ld_corr_number  TYPE BORPAR-TRKORR ,
it_objkey_tab  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_objkey_tab  LIKE LINE OF it_objkey_tab .


DATA(ld_method_name) = some text here

DATA(ld_objtyp) = some text here

DATA(ld_objkey) = some text here

DATA(ld_target_objtyp) = some text here

DATA(ld_target_objkey) = some text here

DATA(ld_begda) = 20210129

DATA(ld_endda) = 20210129

DATA(ld_plvar) = some text here

DATA(ld_suppressdialog) = some text here

"populate fields of struture and append to itab
append wa_objkey_tab to it_objkey_tab. . CALL FUNCTION 'RH_SAP_ORG_OBJECT_CALL_METHOD' EXPORTING method_name = ld_method_name objtyp = ld_objtyp * objkey = ld_objkey * target_objtyp = ld_target_objtyp * target_objkey = ld_target_objkey * begda = ld_begda * endda = ld_endda * plvar = ld_plvar * suppressdialog = ld_suppressdialog IMPORTING new_objkey = ld_new_objkey corr_number = ld_corr_number * TABLES * objkey_tab = it_objkey_tab EXCEPTIONS OBJECT_NOT_FOUND = 1 METHOD_NOT_FOUND = 2 ERROR_IN_METHOD = 3 . " RH_SAP_ORG_OBJECT_CALL_METHOD
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 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_new_objkey  TYPE BORPAR-OBJKEY ,
ld_method_name  TYPE SWOTINVOKE-VERB ,
it_objkey_tab  TYPE STANDARD TABLE OF STRING ,
wa_objkey_tab  LIKE LINE OF it_objkey_tab,
ld_corr_number  TYPE BORPAR-TRKORR ,
ld_objtyp  TYPE BORPAR-OBJTYP ,
ld_objkey  TYPE BORPAR-OBJKEY ,
ld_target_objtyp  TYPE BORPAR-OBJTYP ,
ld_target_objkey  TYPE BORPAR-OBJKEY ,
ld_begda  TYPE BORPAR-BEGDA ,
ld_endda  TYPE BORPAR-ENDDA ,
ld_plvar  TYPE WPLOG-PLVAR ,
ld_suppressdialog  TYPE BORPAR-FLAG_X .


ld_method_name = some text here

"populate fields of struture and append to itab
append wa_objkey_tab to it_objkey_tab.

ld_objtyp = some text here

ld_objkey = some text here

ld_target_objtyp = some text here

ld_target_objkey = some text here

ld_begda = 20210129

ld_endda = 20210129

ld_plvar = some text here

ld_suppressdialog = some text here

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