SAP PARSE_IDOC Function Module for NOTRANSL: Erstellen von Anwendungsbelegen oder -stammdaten aus IDOC's
PARSE_IDOC is a standard parse idoc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Erstellen von Anwendungsbelegen oder -stammdaten aus IDOC's 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 parse idoc FM, simply by entering the name PARSE_IDOC into the relevant SAP transaction such as SE37 or SE38.
Function Group: WPPA
Program Name: SAPLWPPA
Main Program: SAPLWPPA
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PARSE_IDOC 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 'PARSE_IDOC'"NOTRANSL: Erstellen von Anwendungsbelegen oder -stammdaten aus IDOC's.
EXPORTING
IDOC_CONTRL = "IDoc control segment
* DOCUMENT_SPLIT = 0 "Maximum no. of items per document
* POST_WITH_GAPS = 'X' "currently not used
PARSER_RULES = "Application rules for parser
* MAX_NUMBER_OF_DOCUMENTS = 0 "
* AUTOMATIC_RETRY = ' ' "
IMPORTING
NUMBER_OF_ERRORS = "Number of errors that occurred
IDOC_STATUS = "Status of IDocs after processing
TABLES
IDOC_DATA = "Table with IDoc segments
IMPORTING Parameters details for PARSE_IDOC
IDOC_CONTRL - IDoc control segment
Data type: EDIDCOptional: No
Call by Reference: No ( called with pass by value option)
DOCUMENT_SPLIT - Maximum no. of items per document
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
POST_WITH_GAPS - currently not used
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PARSER_RULES - Application rules for parser
Data type: WPPAR_PARSER_RULESOptional: No
Call by Reference: No ( called with pass by value option)
MAX_NUMBER_OF_DOCUMENTS -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
AUTOMATIC_RETRY -
Data type: CDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PARSE_IDOC
NUMBER_OF_ERRORS - Number of errors that occurred
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
IDOC_STATUS - Status of IDocs after processing
Data type: BDIDOCSTATOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for PARSE_IDOC
IDOC_DATA - Table with IDoc segments
Data type: EDIDDOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PARSE_IDOC 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_idoc_data | TYPE STANDARD TABLE OF EDIDD, " | |||
| lv_idoc_contrl | TYPE EDIDC, " | |||
| lv_number_of_errors | TYPE I, " | |||
| lv_idoc_status | TYPE BDIDOCSTAT, " | |||
| lv_document_split | TYPE I, " 0 | |||
| lv_post_with_gaps | TYPE C, " 'X' | |||
| lv_parser_rules | TYPE WPPAR_PARSER_RULES, " | |||
| lv_max_number_of_documents | TYPE I, " 0 | |||
| lv_automatic_retry | TYPE C. " ' ' |
|   CALL FUNCTION 'PARSE_IDOC' "NOTRANSL: Erstellen von Anwendungsbelegen oder -stammdaten aus IDOC's |
| EXPORTING | ||
| IDOC_CONTRL | = lv_idoc_contrl | |
| DOCUMENT_SPLIT | = lv_document_split | |
| POST_WITH_GAPS | = lv_post_with_gaps | |
| PARSER_RULES | = lv_parser_rules | |
| MAX_NUMBER_OF_DOCUMENTS | = lv_max_number_of_documents | |
| AUTOMATIC_RETRY | = lv_automatic_retry | |
| IMPORTING | ||
| NUMBER_OF_ERRORS | = lv_number_of_errors | |
| IDOC_STATUS | = lv_idoc_status | |
| TABLES | ||
| IDOC_DATA | = lt_idoc_data | |
| . " PARSE_IDOC | ||
ABAP code using 7.40 inline data declarations to call FM PARSE_IDOC
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_post_with_gaps) | = 'X'. | |||
| DATA(ld_automatic_retry) | = ' '. | |||
Search for further information about these or an SAP related objects