Page History
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
|
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
...
The <<SAPIDocParser>> returns an Any object having the stereotype <<SAPIDoc>>.
The following examples are demonstrating some applications of the <<SAPIDocParser>>.
Parsing a Single IDoc From String
...
to a Corresponding Class
If you are sure, that the parser input contains only one IDoc, you can get the output directly into an output object of the corresponding IDoc type (e.g. TXTRAW01).
...
After having called the parser, you can catch parsing errors as described in Catching Errors.
Parsing Multiple IDocs From String
...
to an Array of Corresponding Class
If the parser input contains multiple IDocs (of the same type), you should get the output in to an array of objects of the corresponding IDoc type (e.g. TXTRAW01).
...
The <<SAPIDocRecordParser>> returns an Any object having the stereotype <<SAPIDoc>>.
The following examples are demonstrating some applications of the <<SAPIDocRecordParser>>.
Parsing a Single IDoc From SAP Tables
...
to a Corresponding Class
If you are sure, that the parser input contains only one IDoc, you can get the output directly into an output object of the corresponding IDoc type (e.g. TXTRAW01).
...
- Parsing a single IDoc from SAP tables to an object that is corresponding to the type of the IDoc.
- The necessary input arrays are coming directly from the SAP tables via a transformation.
Parsing Multiple IDocs From SAP Tables
...
to a Corresponding Class
If the parser input contains multiple IDocs (of the same type), you should get the output in to an array of objects of the corresponding IDoc type (e.g. TXTRAW01).
...
- Parsing multiple IDocs from SAP tables to an array of objects that are corresponding to the type of the IDocs.
- The necessary input arrays are coming directly from the SAP tables via a transformation.
- The parser output is an array of IDoc objects having the IDoc type as array element.
Inspecting the Parsing Process With the Analyzer
You can inspect the parsing process of the SAP IDoc Record Parser with the Analyzer. To view the parser trace file do the following:
- Run a testcase with Full Trace option.
- Navigate to the IDoc parser action.
Select Show adapter input/output > OUTPUT from the context menu. The adapter output will be displayed in the Watches section of the Analyzer.
Right-click the displayed adapter output output and select Copy Value from the context menu.
Paste the copied content into a text editor of your choice. It displays something like:
Code Block Start parsing message: recreate_internal_structure..._965161528|_17_0_3_b2002db_1406276778049_987802_26054. Start adding IDoc. Adding IDOC number: 14468604. Start adjusting CREDAT Type: target type = String. CREDAT: DateTime converted to String: 20140526.
Parsing from XML: <<SAPXMLIDocParser>>
...
The <<SAPXMLIDocParser>> returns an Any object having stereotype <<SAPIDoc>>.
The following example is demonstrating an application of the <<SAPXMLIDocParser>>.
Parsing Multiple IDocs From XML
...
to a Corresponding Class
If you are sure, that the parser input contains only one IDoc, you can get the output directly into an output object of the corresponding IDoc type (e.g. TXTRAW01).
If the parser input contains multiple IDocs (of the same type), you should get the output in to an array of objects of the corresponding IDoc type.
...