SAP BAPI_COSTESTIMATE_GETDETAIL Function Module for Determine Detailed Information for a Cost Estimate









BAPI_COSTESTIMATE_GETDETAIL is a standard bapi costestimate getdetail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine Detailed Information for a Cost Estimate 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 costestimate getdetail FM, simply by entering the name BAPI_COSTESTIMATE_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.

Function Group: 2044
Program Name: SAPL2044
Main Program: SAPL2044
Appliation area: K
Release date: 14-Jul-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_COSTESTIMATE_GETDETAIL 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_COSTESTIMATE_GETDETAIL'"Determine Detailed Information for a Cost Estimate
EXPORTING
REFERENCEOBJECT = "Reference Object
* CURRENCY_ORG_UNIT = "Currency (No Entry -> Company Code Currency)
COSTINGNUMBER = "Cost Estimate Number
COSTINGTYPE = "Costing Type
COSTINGDATE = "Costing Date
COSTINGVERSION = "Costing Version
VALUATIONVARIANT = "Valuation Variant
ENTEREDMANUALLY = "Entered manually
COST_COMPONENT_VIEW = "Cost Component View
* COST_COMPONENT_GROUP = "Cost Component Group

IMPORTING
COST_ESTIMATE_HEADER = "Cost Estimate Header
PARTNER = "Partner Version - Definition of Organizational Units
DIRECT_PARTNER = "Partner Version - Definition of Organizational Units
RETURN = "Confirmations

TABLES
* COST_COMPONENTS = "Cost Component Split
* DIR_PART_PLANT_CC_AS = "Value Fields for Cost Components Auxiliary Cost Comp Split Direct Partner Plant
* DIR_PART_COMPCODE_CC_AS = "Value Fields for Cost Components Aux Cost Comp Split Dir Partner Company Code
* DIR_PART_BUSINAREA_CC_AS = "Value Fields for Cost Components Aux Cost Comp Split Dir Partner Business Area
* PARTNER_COST_COMPONENTS = "Value Fields for Individual Cost Components - Partner Cost Component Split
* DIR_PART_PRFTCTR_CC = "Value Fields for Individual Cost Components Direct Partner Profit Center
* DIR_PART_PLANT_CC = "Value Fields for Individual Cost Components Direct Partner Plant
* DIR_PART_COMPCODE_CC = "Value Fields for Individual Cost Components Direct Partner Company Code
* DIR_PART_BUSINAREA_CC = "Value Fields for Individual Cost Components Direct Partner Business Area
* COST_COMPONENTS_AS = "Value Fields for Individual Cost Components in Auxiliary Cost Component Split
* PARTNER_COST_COMPONENTS_AS = "Value Fields for Individual Cost Components - Partner Cost Component Split
* DIR_PART_PRFTCTR_CC_AS = "Value Fields for Cost Components Aux Cost Comp Split Direct Partner Profit Ctr
.



IMPORTING Parameters details for BAPI_COSTESTIMATE_GETDETAIL

REFERENCEOBJECT - Reference Object

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

CURRENCY_ORG_UNIT - Currency (No Entry -> Company Code Currency)

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

COSTINGNUMBER - Cost Estimate Number

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

COSTINGTYPE - Costing Type

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

COSTINGDATE - Costing Date

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

COSTINGVERSION - Costing Version

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

VALUATIONVARIANT - Valuation Variant

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

ENTEREDMANUALLY - Entered manually

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

COST_COMPONENT_VIEW - Cost Component View

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

COST_COMPONENT_GROUP - Cost Component Group

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

EXPORTING Parameters details for BAPI_COSTESTIMATE_GETDETAIL

COST_ESTIMATE_HEADER - Cost Estimate Header

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

PARTNER - Partner Version - Definition of Organizational Units

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

DIRECT_PARTNER - Partner Version - Definition of Organizational Units

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

RETURN - Confirmations

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

TABLES Parameters details for BAPI_COSTESTIMATE_GETDETAIL

COST_COMPONENTS - Cost Component Split

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

DIR_PART_PLANT_CC_AS - Value Fields for Cost Components Auxiliary Cost Comp Split Direct Partner Plant

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

DIR_PART_COMPCODE_CC_AS - Value Fields for Cost Components Aux Cost Comp Split Dir Partner Company Code

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

DIR_PART_BUSINAREA_CC_AS - Value Fields for Cost Components Aux Cost Comp Split Dir Partner Business Area

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

PARTNER_COST_COMPONENTS - Value Fields for Individual Cost Components - Partner Cost Component Split

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

DIR_PART_PRFTCTR_CC - Value Fields for Individual Cost Components Direct Partner Profit Center

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

DIR_PART_PLANT_CC - Value Fields for Individual Cost Components Direct Partner Plant

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

DIR_PART_COMPCODE_CC - Value Fields for Individual Cost Components Direct Partner Company Code

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

DIR_PART_BUSINAREA_CC - Value Fields for Individual Cost Components Direct Partner Business Area

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

COST_COMPONENTS_AS - Value Fields for Individual Cost Components in Auxiliary Cost Component Split

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

PARTNER_COST_COMPONENTS_AS - Value Fields for Individual Cost Components - Partner Cost Component Split

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

DIR_PART_PRFTCTR_CC_AS - Value Fields for Cost Components Aux Cost Comp Split Direct Partner Profit Ctr

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

Copy and paste ABAP code example for BAPI_COSTESTIMATE_GETDETAIL 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:
lt_cost_components  TYPE STANDARD TABLE OF BAPISPLITT, "   
lv_referenceobject  TYPE BAPICOSTRE-REF_OBJECT, "   
lv_cost_estimate_header  TYPE BAPIHEADER, "   
lv_currency_org_unit  TYPE BAPICOSTES-CURRENCY, "   
lt_dir_part_plant_cc_as  TYPE STANDARD TABLE OF BAPIDIR_PART_PLANT_CC, "   
lt_dir_part_compcode_cc_as  TYPE STANDARD TABLE OF BAPIDIR_PART_COMPCODE_CC, "   
lt_dir_part_businarea_cc_as  TYPE STANDARD TABLE OF BAPIDIR_PART_BUSINAREA_CC, "   
lv_partner  TYPE BAPIPARTNER, "   
lv_costingnumber  TYPE BAPICOSTRE-CSTG_NUM, "   
lt_partner_cost_components  TYPE STANDARD TABLE OF BAPIPARTNER_COST_COMPONENTS, "   
lv_costingtype  TYPE BAPICOSTRE-CSTG_TYPE, "   
lv_direct_partner  TYPE BAPIDIRECT_PARTNER, "   
lt_dir_part_prftctr_cc  TYPE STANDARD TABLE OF BAPIDIR_PART_PRFTCTR_CC, "   
lv_return  TYPE BAPIRETURN, "   
lv_costingdate  TYPE BAPICOSTRE-CSTG_DATE, "   
lt_dir_part_plant_cc  TYPE STANDARD TABLE OF BAPIDIR_PART_PLANT_CC, "   
lv_costingversion  TYPE BAPICOSTRE-VERSION, "   
lt_dir_part_compcode_cc  TYPE STANDARD TABLE OF BAPIDIR_PART_COMPCODE_CC, "   
lv_valuationvariant  TYPE BAPICOSTRE-VLTN_VRNT, "   
lt_dir_part_businarea_cc  TYPE STANDARD TABLE OF BAPIDIR_PART_BUSINAREA_CC, "   
lv_enteredmanually  TYPE BAPICOSTRE-ENTER_MAN, "   
lt_cost_components_as  TYPE STANDARD TABLE OF BAPISPLITT, "   
lv_cost_component_view  TYPE BAPICOSTES-VIEW, "   
lt_partner_cost_components_as  TYPE STANDARD TABLE OF BAPIPARTNER_COST_COMPONENTS, "   
lv_cost_component_group  TYPE BAPICOSTES-CCOMPGROUP, "   
lt_dir_part_prftctr_cc_as  TYPE STANDARD TABLE OF BAPIDIR_PART_PRFTCTR_CC. "   

  CALL FUNCTION 'BAPI_COSTESTIMATE_GETDETAIL'  "Determine Detailed Information for a Cost Estimate
    EXPORTING
         REFERENCEOBJECT = lv_referenceobject
         CURRENCY_ORG_UNIT = lv_currency_org_unit
         COSTINGNUMBER = lv_costingnumber
         COSTINGTYPE = lv_costingtype
         COSTINGDATE = lv_costingdate
         COSTINGVERSION = lv_costingversion
         VALUATIONVARIANT = lv_valuationvariant
         ENTEREDMANUALLY = lv_enteredmanually
         COST_COMPONENT_VIEW = lv_cost_component_view
         COST_COMPONENT_GROUP = lv_cost_component_group
    IMPORTING
         COST_ESTIMATE_HEADER = lv_cost_estimate_header
         PARTNER = lv_partner
         DIRECT_PARTNER = lv_direct_partner
         RETURN = lv_return
    TABLES
         COST_COMPONENTS = lt_cost_components
         DIR_PART_PLANT_CC_AS = lt_dir_part_plant_cc_as
         DIR_PART_COMPCODE_CC_AS = lt_dir_part_compcode_cc_as
         DIR_PART_BUSINAREA_CC_AS = lt_dir_part_businarea_cc_as
         PARTNER_COST_COMPONENTS = lt_partner_cost_components
         DIR_PART_PRFTCTR_CC = lt_dir_part_prftctr_cc
         DIR_PART_PLANT_CC = lt_dir_part_plant_cc
         DIR_PART_COMPCODE_CC = lt_dir_part_compcode_cc
         DIR_PART_BUSINAREA_CC = lt_dir_part_businarea_cc
         COST_COMPONENTS_AS = lt_cost_components_as
         PARTNER_COST_COMPONENTS_AS = lt_partner_cost_components_as
         DIR_PART_PRFTCTR_CC_AS = lt_dir_part_prftctr_cc_as
. " BAPI_COSTESTIMATE_GETDETAIL




ABAP code using 7.40 inline data declarations to call FM BAPI_COSTESTIMATE_GETDETAIL

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 REF_OBJECT FROM BAPICOSTRE INTO @DATA(ld_referenceobject).
 
 
"SELECT single CURRENCY FROM BAPICOSTES INTO @DATA(ld_currency_org_unit).
 
 
 
 
 
"SELECT single CSTG_NUM FROM BAPICOSTRE INTO @DATA(ld_costingnumber).
 
 
"SELECT single CSTG_TYPE FROM BAPICOSTRE INTO @DATA(ld_costingtype).
 
 
 
 
"SELECT single CSTG_DATE FROM BAPICOSTRE INTO @DATA(ld_costingdate).
 
 
"SELECT single VERSION FROM BAPICOSTRE INTO @DATA(ld_costingversion).
 
 
"SELECT single VLTN_VRNT FROM BAPICOSTRE INTO @DATA(ld_valuationvariant).
 
 
"SELECT single ENTER_MAN FROM BAPICOSTRE INTO @DATA(ld_enteredmanually).
 
 
"SELECT single VIEW FROM BAPICOSTES INTO @DATA(ld_cost_component_view).
 
 
"SELECT single CCOMPGROUP FROM BAPICOSTES INTO @DATA(ld_cost_component_group).
 
 


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!