SAP Function Modules

HRHAPCN_OBJ_LIB_READ_BRANCH SAP Function module - Read Children of Objective Library







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

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


Pattern for FM HRHAPCN_OBJ_LIB_READ_BRANCH - HRHAPCN OBJ LIB READ BRANCH





CALL FUNCTION 'HRHAPCN_OBJ_LIB_READ_BRANCH' "Read Children of Objective Library
  EXPORTING
*   plvar =                     " plvar         Plan Version
    root_otype =                " otype         Object Type
    root_objid =                " objektid      Object ID
*   begda = SY-DATUM            " begdatum      Start Date
*   endda = SY-DATUM            " enddatum      End Date
*   tdepth = 2                  " tdepth        Technical Depth of Structure
*   pup_info = 'X'              " syinput       Internal ABAP System Field
*   with_stext = 'X'            " syinput       Internal ABAP System Field
*   sort = 'X'                  " syinput       Internal ABAP System Field
  IMPORTING
    o_tab =                     " hapcn_t_obj_lib  Objective Library Table
  EXCEPTIONS
    ROOT_NOT_FOUND = 1          "               Root object not found
    WEGID_NOT_FOUND = 2         "               Evaluation path not found
    .  "  HRHAPCN_OBJ_LIB_READ_BRANCH

ABAP code example for Function Module HRHAPCN_OBJ_LIB_READ_BRANCH





The ABAP code below is a full code listing to execute function module HRHAPCN_OBJ_LIB_READ_BRANCH 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_o_tab  TYPE HAPCN_T_OBJ_LIB .

DATA(ld_plvar) = 'Check type of data required'.
DATA(ld_root_otype) = 'Check type of data required'.
DATA(ld_root_objid) = 'Check type of data required'.
DATA(ld_begda) = 'Check type of data required'.
DATA(ld_endda) = 'Check type of data required'.
DATA(ld_tdepth) = 'Check type of data required'.
DATA(ld_pup_info) = 'some text here'.
DATA(ld_with_stext) = 'some text here'.
DATA(ld_sort) = 'some text here'. . CALL FUNCTION 'HRHAPCN_OBJ_LIB_READ_BRANCH' EXPORTING * plvar = ld_plvar root_otype = ld_root_otype root_objid = ld_root_objid * begda = ld_begda * endda = ld_endda * tdepth = ld_tdepth * pup_info = ld_pup_info * with_stext = ld_with_stext * sort = ld_sort IMPORTING o_tab = ld_o_tab EXCEPTIONS ROOT_NOT_FOUND = 1 WEGID_NOT_FOUND = 2 . " HRHAPCN_OBJ_LIB_READ_BRANCH
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 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_o_tab  TYPE HAPCN_T_OBJ_LIB ,
ld_plvar  TYPE PLVAR ,
ld_root_otype  TYPE OTYPE ,
ld_root_objid  TYPE OBJEKTID ,
ld_begda  TYPE BEGDATUM ,
ld_endda  TYPE ENDDATUM ,
ld_tdepth  TYPE TDEPTH ,
ld_pup_info  TYPE SYINPUT ,
ld_with_stext  TYPE SYINPUT ,
ld_sort  TYPE SYINPUT .

ld_plvar = 'some text here'.
ld_root_otype = 'some text here'.
ld_root_objid = 'some text here'.
ld_begda = 'some text here'.
ld_endda = 'some text here'.
ld_tdepth = 'some text here'.
ld_pup_info = 'some text here'.
ld_with_stext = 'some text here'.
ld_sort = '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 HRHAPCN_OBJ_LIB_READ_BRANCH or its description.