SAP Function Modules

BAPI_BUS1077_GET_COMP_TREE SAP Function module - EHS: Explode Specification Composition







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

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


Pattern for FM BAPI_BUS1077_GET_COMP_TREE - BAPI BUS1077 GET COMP TREE







CALL FUNCTION 'BAPI_BUS1077_GET_COMP_TREE' "EHS: Explode Specification Composition
  EXPORTING
*   key_date = SY-DATUM         " rcgaddinf-valdat  Validity date for object key
    substanceid =               " bapi1077rh-substance  Specification key
    subchacat =                 " bapi1077vh-subchacat  Value assignment type
*   usexnam =                   " rcgexitpar-usexnam  Name of user exit to cancel for a specification
*   usexpar =                   " bapi1077il-text_line  Parameter of user exit to cancel for a specification
*   i_fb_tree_to_list = SPACE   " funcname      Function Module for Converting Units of Measurement
  IMPORTING
    return =                    " bapireturn    Confirmations
  TABLES
*   i_usage_tab =               " bapi1077du    Usage table
    e_comp_tree_tab =           " bapi1077vp    Composition tree
*   e_comp_list_tab =           " bapi1077vp    List of compositions
*   e_comp_prop_tab =           " bapi1077vp    Table of Valuation Types
*   e_comp_list_float_tab =     " bapi1077vf    List of compositions with numeric values in floating point
*   i_ue_param_tab =            " tcgueen       EHS: User Exit Parameters in User Exit Management
    .  "  BAPI_BUS1077_GET_COMP_TREE

ABAP code example for Function Module BAPI_BUS1077_GET_COMP_TREE

The ABAP code below is a full code listing to execute function module BAPI_BUS1077_GET_COMP_TREE 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_return  TYPE BAPIRETURN ,
it_i_usage_tab  TYPE STANDARD TABLE OF BAPI1077DU,"TABLES PARAM
wa_i_usage_tab  LIKE LINE OF it_i_usage_tab ,
it_e_comp_tree_tab  TYPE STANDARD TABLE OF BAPI1077VP,"TABLES PARAM
wa_e_comp_tree_tab  LIKE LINE OF it_e_comp_tree_tab ,
it_e_comp_list_tab  TYPE STANDARD TABLE OF BAPI1077VP,"TABLES PARAM
wa_e_comp_list_tab  LIKE LINE OF it_e_comp_list_tab ,
it_e_comp_prop_tab  TYPE STANDARD TABLE OF BAPI1077VP,"TABLES PARAM
wa_e_comp_prop_tab  LIKE LINE OF it_e_comp_prop_tab ,
it_e_comp_list_float_tab  TYPE STANDARD TABLE OF BAPI1077VF,"TABLES PARAM
wa_e_comp_list_float_tab  LIKE LINE OF it_e_comp_list_float_tab ,
it_i_ue_param_tab  TYPE STANDARD TABLE OF TCGUEEN,"TABLES PARAM
wa_i_ue_param_tab  LIKE LINE OF it_i_ue_param_tab .


DATA(ld_key_date) = 20190710

DATA(ld_substanceid) = some text here

DATA(ld_subchacat) = some text here

DATA(ld_usexnam) = some text here

DATA(ld_usexpar) = some text here
DATA(ld_i_fb_tree_to_list) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_usage_tab to it_i_usage_tab.

"populate fields of struture and append to itab
append wa_e_comp_tree_tab to it_e_comp_tree_tab.

"populate fields of struture and append to itab
append wa_e_comp_list_tab to it_e_comp_list_tab.

"populate fields of struture and append to itab
append wa_e_comp_prop_tab to it_e_comp_prop_tab.

"populate fields of struture and append to itab
append wa_e_comp_list_float_tab to it_e_comp_list_float_tab.

"populate fields of struture and append to itab
append wa_i_ue_param_tab to it_i_ue_param_tab. . CALL FUNCTION 'BAPI_BUS1077_GET_COMP_TREE' EXPORTING * key_date = ld_key_date substanceid = ld_substanceid subchacat = ld_subchacat * usexnam = ld_usexnam * usexpar = ld_usexpar * i_fb_tree_to_list = ld_i_fb_tree_to_list IMPORTING return = ld_return TABLES * i_usage_tab = it_i_usage_tab e_comp_tree_tab = it_e_comp_tree_tab * e_comp_list_tab = it_e_comp_list_tab * e_comp_prop_tab = it_e_comp_prop_tab * e_comp_list_float_tab = it_e_comp_list_float_tab * i_ue_param_tab = it_i_ue_param_tab . " BAPI_BUS1077_GET_COMP_TREE
IF SY-SUBRC EQ 0. "All OK 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_return  TYPE BAPIRETURN ,
ld_key_date  TYPE RCGADDINF-VALDAT ,
it_i_usage_tab  TYPE STANDARD TABLE OF BAPI1077DU ,
wa_i_usage_tab  LIKE LINE OF it_i_usage_tab,
ld_substanceid  TYPE BAPI1077RH-SUBSTANCE ,
it_e_comp_tree_tab  TYPE STANDARD TABLE OF BAPI1077VP ,
wa_e_comp_tree_tab  LIKE LINE OF it_e_comp_tree_tab,
ld_subchacat  TYPE BAPI1077VH-SUBCHACAT ,
it_e_comp_list_tab  TYPE STANDARD TABLE OF BAPI1077VP ,
wa_e_comp_list_tab  LIKE LINE OF it_e_comp_list_tab,
ld_usexnam  TYPE RCGEXITPAR-USEXNAM ,
it_e_comp_prop_tab  TYPE STANDARD TABLE OF BAPI1077VP ,
wa_e_comp_prop_tab  LIKE LINE OF it_e_comp_prop_tab,
ld_usexpar  TYPE BAPI1077IL-TEXT_LINE ,
it_e_comp_list_float_tab  TYPE STANDARD TABLE OF BAPI1077VF ,
wa_e_comp_list_float_tab  LIKE LINE OF it_e_comp_list_float_tab,
ld_i_fb_tree_to_list  TYPE FUNCNAME ,
it_i_ue_param_tab  TYPE STANDARD TABLE OF TCGUEEN ,
wa_i_ue_param_tab  LIKE LINE OF it_i_ue_param_tab.


ld_key_date = 20190710

"populate fields of struture and append to itab
append wa_i_usage_tab to it_i_usage_tab.

ld_substanceid = some text here

"populate fields of struture and append to itab
append wa_e_comp_tree_tab to it_e_comp_tree_tab.

ld_subchacat = some text here

"populate fields of struture and append to itab
append wa_e_comp_list_tab to it_e_comp_list_tab.

ld_usexnam = some text here

"populate fields of struture and append to itab
append wa_e_comp_prop_tab to it_e_comp_prop_tab.

ld_usexpar = some text here

"populate fields of struture and append to itab
append wa_e_comp_list_float_tab to it_e_comp_list_float_tab.
ld_i_fb_tree_to_list = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_ue_param_tab to it_i_ue_param_tab.

SAP Documentation for FM BAPI_BUS1077_GET_COMP_TREE


This method determines the composition tree with the respective numeric concentration values for the object Specification. ...See here for full SAP fm documentation














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