SAP BAPI_EPM_PRODUCT_CHANGE Function Module for EPM: BAPI 'Change product data'
BAPI_EPM_PRODUCT_CHANGE is a standard bapi epm product change SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for EPM: BAPI 'Change product data' 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 epm product change FM, simply by entering the name BAPI_EPM_PRODUCT_CHANGE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SEPM_PRODUCT_BAPI
Program Name: SAPLSEPM_PRODUCT_BAPI
Main Program: SAPLSEPM_PRODUCT_BAPI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
![](https://www.se80.co.uk/training-education/wp-content/uploads/2019/07/normal-function-module.png)
Function BAPI_EPM_PRODUCT_CHANGE 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_EPM_PRODUCT_CHANGE'"EPM: BAPI 'Change product data'.
EXPORTING
PRODUCT_ID = "EPM: Product Id
* HEADERDATA = "EPM: Product header data of BOR object SEPM002
* HEADERDATAX = "EPM: Product header modif. info for BOR object 'EpmProduct'
* PERSIST_TO_DB = ABAP_TRUE "Flag: Save data to DB (yes/no)
TABLES
* CONVERSION_FACTORS = "EPM: Product conversion factor data of BOR object SEPM002
* CONVERSION_FACTORSX = "EPM: Prod. conv. fact. modif. data for BOR-Objekt EpmProduct
* RETURN = "Return Parameter
IMPORTING Parameters details for BAPI_EPM_PRODUCT_CHANGE
PRODUCT_ID - EPM: Product Id
Data type: BAPI_EPM_PRODUCT_IDOptional: No
Call by Reference: No ( called with pass by value option)
HEADERDATA - EPM: Product header data of BOR object SEPM002
Data type: BAPI_EPM_PRODUCT_HEADEROptional: Yes
Call by Reference: No ( called with pass by value option)
HEADERDATAX - EPM: Product header modif. info for BOR object 'EpmProduct'
Data type: BAPI_EPM_PRODUCT_HEADERXOptional: Yes
Call by Reference: No ( called with pass by value option)
PERSIST_TO_DB - Flag: Save data to DB (yes/no)
Data type: BAPI_EPM_BOOLEANDefault: ABAP_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_EPM_PRODUCT_CHANGE
CONVERSION_FACTORS - EPM: Product conversion factor data of BOR object SEPM002
Data type: BAPI_EPM_PRODUCT_CONV_FACTORSOptional: Yes
Call by Reference: No ( called with pass by value option)
CONVERSION_FACTORSX - EPM: Prod. conv. fact. modif. data for BOR-Objekt EpmProduct
Data type: BAPI_EPM_PRODUCT_CONV_FACTORSXOptional: Yes
Call by Reference: Yes
RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_EPM_PRODUCT_CHANGE 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_product_id | TYPE BAPI_EPM_PRODUCT_ID, " | |||
lt_conversion_factors | TYPE STANDARD TABLE OF BAPI_EPM_PRODUCT_CONV_FACTORS, " | |||
lv_headerdata | TYPE BAPI_EPM_PRODUCT_HEADER, " | |||
lt_conversion_factorsx | TYPE STANDARD TABLE OF BAPI_EPM_PRODUCT_CONV_FACTORSX, " | |||
lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
lv_headerdatax | TYPE BAPI_EPM_PRODUCT_HEADERX, " | |||
lv_persist_to_db | TYPE BAPI_EPM_BOOLEAN. " ABAP_TRUE |
  CALL FUNCTION 'BAPI_EPM_PRODUCT_CHANGE' "EPM: BAPI 'Change product data' |
EXPORTING | ||
PRODUCT_ID | = lv_product_id | |
HEADERDATA | = lv_headerdata | |
HEADERDATAX | = lv_headerdatax | |
PERSIST_TO_DB | = lv_persist_to_db | |
TABLES | ||
CONVERSION_FACTORS | = lt_conversion_factors | |
CONVERSION_FACTORSX | = lt_conversion_factorsx | |
RETURN | = lt_return | |
. " BAPI_EPM_PRODUCT_CHANGE |
ABAP code using 7.40 inline data declarations to call FM BAPI_EPM_PRODUCT_CHANGE
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.DATA(ld_persist_to_db) | = ABAP_TRUE. | |||
Search for further information about these or an SAP related objects