SAP CPE_ERP_MD_EXPORT_TO_MEMORY Function Module for CPE in ERP: Export all data to memory
CPE_ERP_MD_EXPORT_TO_MEMORY is a standard cpe erp md export to memory SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for CPE in ERP: Export all data to memory 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 cpe erp md export to memory FM, simply by entering the name CPE_ERP_MD_EXPORT_TO_MEMORY into the relevant SAP transaction such as SE37 or SE38.
Function Group: CPE_ERP_MD_INT_API
Program Name: SAPLCPE_ERP_MD_INT_API
Main Program: SAPLCPE_ERP_MD_INT_API
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CPE_ERP_MD_EXPORT_TO_MEMORY 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 'CPE_ERP_MD_EXPORT_TO_MEMORY'"CPE in ERP: Export all data to memory.
EXPORTING
* IV_APPLICATION = 'M' "Application
* IV_USAGE = 'A' "Usage of the Condition Table
IMPORTING
ES_CPEDOC_COM_OUT = "CPE - Work Structure with All Output Data
ET_KNUMHTOGUID_WRK = "CPE Caller - Table Type Work Str. for Map. ERP Cond. to GUID
EXCEPTIONS
ERROR_EXPORT_TO_MEMORY = 1 ERROR_READ_FORMULA_FROM_OB = 2 ERROR_KNUMHTOGUID_READ_FROM_OB = 3
IMPORTING Parameters details for CPE_ERP_MD_EXPORT_TO_MEMORY
IV_APPLICATION - Application
Data type: KAPPLDefault: 'M'
Optional: No
Call by Reference: Yes
IV_USAGE - Usage of the Condition Table
Data type: KVEWEDefault: 'A'
Optional: No
Call by Reference: Yes
EXPORTING Parameters details for CPE_ERP_MD_EXPORT_TO_MEMORY
ES_CPEDOC_COM_OUT - CPE - Work Structure with All Output Data
Data type: CPET_CPEDOC_COM_OUTOptional: No
Call by Reference: Yes
ET_KNUMHTOGUID_WRK - CPE Caller - Table Type Work Str. for Map. ERP Cond. to GUID
Data type: CPET_KNUMHTOGUID_WRK_TABOptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR_EXPORT_TO_MEMORY - Error during export to memory
Data type:Optional: No
Call by Reference: Yes
ERROR_READ_FORMULA_FROM_OB - Error during reading the object buffer for formula tables
Data type:Optional: No
Call by Reference: Yes
ERROR_KNUMHTOGUID_READ_FROM_OB - Error during reading the object buffer for KNUMHTOGUID
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CPE_ERP_MD_EXPORT_TO_MEMORY 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_iv_application | TYPE KAPPL, " 'M' | |||
| lv_es_cpedoc_com_out | TYPE CPET_CPEDOC_COM_OUT, " | |||
| lv_error_export_to_memory | TYPE CPET_CPEDOC_COM_OUT, " | |||
| lv_iv_usage | TYPE KVEWE, " 'A' | |||
| lv_et_knumhtoguid_wrk | TYPE CPET_KNUMHTOGUID_WRK_TAB, " | |||
| lv_error_read_formula_from_ob | TYPE CPET_KNUMHTOGUID_WRK_TAB, " | |||
| lv_error_knumhtoguid_read_from_ob | TYPE CPET_KNUMHTOGUID_WRK_TAB. " |
|   CALL FUNCTION 'CPE_ERP_MD_EXPORT_TO_MEMORY' "CPE in ERP: Export all data to memory |
| EXPORTING | ||
| IV_APPLICATION | = lv_iv_application | |
| IV_USAGE | = lv_iv_usage | |
| IMPORTING | ||
| ES_CPEDOC_COM_OUT | = lv_es_cpedoc_com_out | |
| ET_KNUMHTOGUID_WRK | = lv_et_knumhtoguid_wrk | |
| EXCEPTIONS | ||
| ERROR_EXPORT_TO_MEMORY = 1 | ||
| ERROR_READ_FORMULA_FROM_OB = 2 | ||
| ERROR_KNUMHTOGUID_READ_FROM_OB = 3 | ||
| . " CPE_ERP_MD_EXPORT_TO_MEMORY | ||
ABAP code using 7.40 inline data declarations to call FM CPE_ERP_MD_EXPORT_TO_MEMORY
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_iv_application) | = 'M'. | |||
| DATA(ld_iv_usage) | = 'A'. | |||
Search for further information about these or an SAP related objects