SAP CEP_DOC_PARSE_XML_AND_SAVE Function Module for Reads original file (XML) and stores the result
CEP_DOC_PARSE_XML_AND_SAVE is a standard cep doc parse xml and save SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reads original file (XML) and stores the result 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 cep doc parse xml and save FM, simply by entering the name CEP_DOC_PARSE_XML_AND_SAVE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CE_CL
Program Name: SAPLCE_CL
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CEP_DOC_PARSE_XML_AND_SAVE 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 'CEP_DOC_PARSE_XML_AND_SAVE'"Reads original file (XML) and stores the result.
EXPORTING
PF_DOKAR = "Document type
PF_DOKNR = "Document number
PF_DOKVR = "Document version
PF_DOKTL = "Document part
* PF_CHANGENUM = "Change number
* PF_KEYDATE = "Output date for document
* PF_APP_TYPE = 'XML' "XML Application Type
* PF_ORIGINAL_NAME = 'CLASSIFICATION' "Name of the XML Originale
TABLES
* PT_CHAR_VALS = "Table to hold classification-characteristic-value data
* ERROR_MSGS = "Optional table which is used to record error messages
EXCEPTIONS
DOCUMENT_NOT_FOUND = 1
IMPORTING Parameters details for CEP_DOC_PARSE_XML_AND_SAVE
PF_DOKAR - Document type
Data type: DRAW-DOKAROptional: No
Call by Reference: Yes
PF_DOKNR - Document number
Data type: DRAW-DOKNROptional: No
Call by Reference: Yes
PF_DOKVR - Document version
Data type: DRAW-DOKVROptional: No
Call by Reference: Yes
PF_DOKTL - Document part
Data type: DRAW-DOKTLOptional: No
Call by Reference: Yes
PF_CHANGENUM - Change number
Data type: DRAW-AENNROptional: Yes
Call by Reference: Yes
PF_KEYDATE - Output date for document
Data type: DRAW-ADATUMOptional: Yes
Call by Reference: Yes
PF_APP_TYPE - XML Application Type
Data type: DRAW-DAPPLDefault: 'XML'
Optional: Yes
Call by Reference: Yes
PF_ORIGINAL_NAME - Name of the XML Originale
Data type: CVAPI_DOC_FILE-DESCRIPTIONDefault: 'CLASSIFICATION'
Optional: Yes
Call by Reference: Yes
TABLES Parameters details for CEP_DOC_PARSE_XML_AND_SAVE
PT_CHAR_VALS - Table to hold classification-characteristic-value data
Data type: CHARACTERISTIC_VALSOptional: Yes
Call by Reference: Yes
ERROR_MSGS - Optional table which is used to record error messages
Data type: MESSAGESOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
DOCUMENT_NOT_FOUND - Document Not Found in DMS
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CEP_DOC_PARSE_XML_AND_SAVE 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_pf_dokar | TYPE DRAW-DOKAR, " | |||
| lt_pt_char_vals | TYPE STANDARD TABLE OF CHARACTERISTIC_VALS, " | |||
| lv_document_not_found | TYPE CHARACTERISTIC_VALS, " | |||
| lv_pf_doknr | TYPE DRAW-DOKNR, " | |||
| lt_error_msgs | TYPE STANDARD TABLE OF MESSAGES, " | |||
| lv_pf_dokvr | TYPE DRAW-DOKVR, " | |||
| lv_pf_doktl | TYPE DRAW-DOKTL, " | |||
| lv_pf_changenum | TYPE DRAW-AENNR, " | |||
| lv_pf_keydate | TYPE DRAW-ADATUM, " | |||
| lv_pf_app_type | TYPE DRAW-DAPPL, " 'XML' | |||
| lv_pf_original_name | TYPE CVAPI_DOC_FILE-DESCRIPTION. " 'CLASSIFICATION' |
|   CALL FUNCTION 'CEP_DOC_PARSE_XML_AND_SAVE' "Reads original file (XML) and stores the result |
| EXPORTING | ||
| PF_DOKAR | = lv_pf_dokar | |
| PF_DOKNR | = lv_pf_doknr | |
| PF_DOKVR | = lv_pf_dokvr | |
| PF_DOKTL | = lv_pf_doktl | |
| PF_CHANGENUM | = lv_pf_changenum | |
| PF_KEYDATE | = lv_pf_keydate | |
| PF_APP_TYPE | = lv_pf_app_type | |
| PF_ORIGINAL_NAME | = lv_pf_original_name | |
| TABLES | ||
| PT_CHAR_VALS | = lt_pt_char_vals | |
| ERROR_MSGS | = lt_error_msgs | |
| EXCEPTIONS | ||
| DOCUMENT_NOT_FOUND = 1 | ||
| . " CEP_DOC_PARSE_XML_AND_SAVE | ||
ABAP code using 7.40 inline data declarations to call FM CEP_DOC_PARSE_XML_AND_SAVE
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 DOKAR FROM DRAW INTO @DATA(ld_pf_dokar). | ||||
| "SELECT single DOKNR FROM DRAW INTO @DATA(ld_pf_doknr). | ||||
| "SELECT single DOKVR FROM DRAW INTO @DATA(ld_pf_dokvr). | ||||
| "SELECT single DOKTL FROM DRAW INTO @DATA(ld_pf_doktl). | ||||
| "SELECT single AENNR FROM DRAW INTO @DATA(ld_pf_changenum). | ||||
| "SELECT single ADATUM FROM DRAW INTO @DATA(ld_pf_keydate). | ||||
| "SELECT single DAPPL FROM DRAW INTO @DATA(ld_pf_app_type). | ||||
| DATA(ld_pf_app_type) | = 'XML'. | |||
| "SELECT single DESCRIPTION FROM CVAPI_DOC_FILE INTO @DATA(ld_pf_original_name). | ||||
| DATA(ld_pf_original_name) | = 'CLASSIFICATION'. | |||
Search for further information about these or an SAP related objects