Page History
Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
...
Class | e2e-refDiv |
---|
Otp | ||
---|---|---|
|
...
IDocs
...
(Interface Documents) are modeled as UML classes (cf. TXTRAW01). Such classes can be serialized into SAP IDoc tables (arrays) by the <<SAPIDocRecordComposer>>.
There are two situations in which you may want to compose an IDoc data buffer:
- You want to map an IDoc object (e.g. TXTRAW01, see figure below) to a String, keeping the structure of the data (mostly done, if you want to write the IDoc to a file).
This is done by an action having the stereotype <<SAPIDocComposer>> (see Composing to String). You want to map an IDoc object (e.g. TXTRAW01, see figure below) to a SAP tables structure (mostly done, if you want to perform an SAP RFC).
This is done by an action having the stereotype <<SAPIDocRecordComposer>> (see Composing to SAP Tables).After having composed an IDoc object, you can send it to an SAP backend using IDOC_INBOUND_ASYNCHRONOUS. The necessary interface is already part of the base components. Refer to tRFC Service for more information on how to implement the call.
Figure: UML Class Model of IDoc TXTRAW01
Image Modified
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Composing to String: <<SAPIDocComposer>>
The <<SAPIDocComposer> takes one ore more IDoc objects as input and composes a String containing the object data. The structure of the data is kept (padding).
Multiexcerpt include | ||||
---|---|---|---|---|
|
The following examples are demonstrating some applications of the <<SAPIDocComposer>>.
Composing aSingle IDoc to an IDoc String
Figure: SAPIDocParser, Single IDoc to a String
Image Modified
Composing Multiple IDocs to an IDoc String
Figure: SAPIDocComposer, Multiple IDocs to a String
Image Modified
Anchor | ||||
---|---|---|---|---|
|
Composing to SAP Tables: <<SAPIDocRecordComposer>>
The <<SAPIDocRecordComposer> takes one ore more IDoc objects as input and composes an array of structured control records and an array of structured data records (as expected for SAP tables).
Multiexcerpt include | ||||
---|---|---|---|---|
|
Composing a Single IDoc to SAP Tables
Figure: IDoc Composer with a IDoc-array to Tables
Image Modified
Composing Multiple IDocs to SAP Tables
Figure: IDoc Composer with a IDoc-array to string
Image Modified
Composing to XML: <<SAPXMLIDocComposer>>
The <<SAPXMLIDocComposer> takes one ore more IDoc objects as input and composes a Blob containing the object data. The structure of the data is kept (padding).
Multiexcerpt include | ||||
---|---|---|---|---|
|
The following example is demonstrating an application of the <<SAPXMLIDocComposer>>.
Composing Multiple IDocs to an XML Blob
Figure: SAPIDocParser, Multiple IDocs to XML
Image Modified
IDoc Composition and SAP R/3
The above examples show how to compose IDocs version of 4.x. However, SAP R/3 3.x systems use IDocs, too. These IDocs are handled similar as in version 4.x. The differences between composing version 4 and version 3 IDocs are as follows :
- IDoc3 Composer Stereotype: <<SAPIDoc3Composer>>
- IDoc3 Stereotype: <<SAPIDoc3>>, this is taken into account if the import was done in version 3 mode (see Importing SAP IDoc Meta Data).
Panel | ||
---|---|---|
| ||
|
Panel | ||
---|---|---|
| ||