SAP BAPI_BUS1077_GET_COMP_TREE Function Module for EHS: Explode Specification Composition









BAPI_BUS1077_GET_COMP_TREE is a standard bapi bus1077 get comp tree SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for EHS: Explode Specification Composition processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for bapi bus1077 get comp tree FM, simply by entering the name BAPI_BUS1077_GET_COMP_TREE into the relevant SAP transaction such as SE37 or SE38.

Function Group: 1077
Program Name: SAPL1077
Main Program: SAPL1077
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_BUS1077_GET_COMP_TREE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'BAPI_BUS1077_GET_COMP_TREE'"EHS: Explode Specification Composition
EXPORTING
* KEY_DATE = SY-DATUM "Validity date for object key
SUBSTANCEID = "Specification key
SUBCHACAT = "Value assignment type
* USEXNAM = "Name of user exit to cancel for a specification
* USEXPAR = "Parameter of user exit to cancel for a specification
* I_FB_TREE_TO_LIST = ' ' "Function Module for Converting Units of Measurement

IMPORTING
RETURN = "Confirmations

TABLES
* I_USAGE_TAB = "Usage table
E_COMP_TREE_TAB = "Composition tree
* E_COMP_LIST_TAB = "List of compositions
* E_COMP_PROP_TAB = "Table of Valuation Types
* E_COMP_LIST_FLOAT_TAB = "List of compositions with numeric values in floating point
* I_UE_PARAM_TAB = "EHS: User Exit Parameters in User Exit Management
.



IMPORTING Parameters details for BAPI_BUS1077_GET_COMP_TREE

KEY_DATE - Validity date for object key

Data type: RCGADDINF-VALDAT
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

SUBSTANCEID - Specification key

Data type: BAPI1077RH-SUBSTANCE
Optional: No
Call by Reference: No ( called with pass by value option)

SUBCHACAT - Value assignment type

Data type: BAPI1077VH-SUBCHACAT
Optional: No
Call by Reference: No ( called with pass by value option)

USEXNAM - Name of user exit to cancel for a specification

Data type: RCGEXITPAR-USEXNAM
Optional: Yes
Call by Reference: No ( called with pass by value option)

USEXPAR - Parameter of user exit to cancel for a specification

Data type: BAPI1077IL-TEXT_LINE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FB_TREE_TO_LIST - Function Module for Converting Units of Measurement

Data type: FUNCNAME
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_BUS1077_GET_COMP_TREE

RETURN - Confirmations

Data type: BAPIRETURN
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_BUS1077_GET_COMP_TREE

I_USAGE_TAB - Usage table

Data type: BAPI1077DU
Optional: Yes
Call by Reference: No ( called with pass by value option)

E_COMP_TREE_TAB - Composition tree

Data type: BAPI1077VP
Optional: No
Call by Reference: No ( called with pass by value option)

E_COMP_LIST_TAB - List of compositions

Data type: BAPI1077VP
Optional: Yes
Call by Reference: No ( called with pass by value option)

E_COMP_PROP_TAB - Table of Valuation Types

Data type: BAPI1077VP
Optional: Yes
Call by Reference: Yes

E_COMP_LIST_FLOAT_TAB - List of compositions with numeric values in floating point

Data type: BAPI1077VF
Optional: Yes
Call by Reference: Yes

I_UE_PARAM_TAB - EHS: User Exit Parameters in User Exit Management

Data type: TCGUEEN
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_BUS1077_GET_COMP_TREE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_return  TYPE BAPIRETURN, "   
lv_key_date  TYPE RCGADDINF-VALDAT, "   SY-DATUM
lt_i_usage_tab  TYPE STANDARD TABLE OF BAPI1077DU, "   
lv_substanceid  TYPE BAPI1077RH-SUBSTANCE, "   
lt_e_comp_tree_tab  TYPE STANDARD TABLE OF BAPI1077VP, "   
lv_subchacat  TYPE BAPI1077VH-SUBCHACAT, "   
lt_e_comp_list_tab  TYPE STANDARD TABLE OF BAPI1077VP, "   
lv_usexnam  TYPE RCGEXITPAR-USEXNAM, "   
lt_e_comp_prop_tab  TYPE STANDARD TABLE OF BAPI1077VP, "   
lv_usexpar  TYPE BAPI1077IL-TEXT_LINE, "   
lt_e_comp_list_float_tab  TYPE STANDARD TABLE OF BAPI1077VF, "   
lt_i_ue_param_tab  TYPE STANDARD TABLE OF TCGUEEN, "   
lv_i_fb_tree_to_list  TYPE FUNCNAME. "   SPACE

  CALL FUNCTION 'BAPI_BUS1077_GET_COMP_TREE'  "EHS: Explode Specification Composition
    EXPORTING
         KEY_DATE = lv_key_date
         SUBSTANCEID = lv_substanceid
         SUBCHACAT = lv_subchacat
         USEXNAM = lv_usexnam
         USEXPAR = lv_usexpar
         I_FB_TREE_TO_LIST = lv_i_fb_tree_to_list
    IMPORTING
         RETURN = lv_return
    TABLES
         I_USAGE_TAB = lt_i_usage_tab
         E_COMP_TREE_TAB = lt_e_comp_tree_tab
         E_COMP_LIST_TAB = lt_e_comp_list_tab
         E_COMP_PROP_TAB = lt_e_comp_prop_tab
         E_COMP_LIST_FLOAT_TAB = lt_e_comp_list_float_tab
         I_UE_PARAM_TAB = lt_i_ue_param_tab
. " BAPI_BUS1077_GET_COMP_TREE




ABAP code using 7.40 inline data declarations to call FM BAPI_BUS1077_GET_COMP_TREE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single VALDAT FROM RCGADDINF INTO @DATA(ld_key_date).
DATA(ld_key_date) = SY-DATUM.
 
 
"SELECT single SUBSTANCE FROM BAPI1077RH INTO @DATA(ld_substanceid).
 
 
"SELECT single SUBCHACAT FROM BAPI1077VH INTO @DATA(ld_subchacat).
 
 
"SELECT single USEXNAM FROM RCGEXITPAR INTO @DATA(ld_usexnam).
 
 
"SELECT single TEXT_LINE FROM BAPI1077IL INTO @DATA(ld_usexpar).
 
 
 
DATA(ld_i_fb_tree_to_list) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!