Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 22.1
Div
Classe2e-refDiv

Otp
Floatingfalse

Rp

Multiexcerpt include
MultiExcerptNamesapnw
nopaneltrue
PageWithExcerptComposing IDocs
There are two situations in which you may want to parse an IDoc data buffer:

...

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).

...

  1. Parsing a single IDoc from SAP tables to an object that is corresponding to the type of the IDoc.
  2. 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).

...

  1. Parsing multiple IDocs from SAP tables to an array of objects that are corresponding to the type of the IDocs.
  2. The necessary input arrays are coming directly from the SAP tables via a transformation.
  3. 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:

  1. Run a testcase with Full Trace option.
  2. Navigate to the IDoc parser action.
  3. Select Show adapter input/output > OUTPUT from the context menu. The adapter output will be displayed in the Watches section of the Analyzer.

    Image Added

  4. Right-click the displayed adapter output output and select Copy Value from the context menu.

    Image Added

  5. 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.

...