You are on page 1of 2

IDoc Views

Use
IDoc types can be used for more than one message, that is, for more than one business process. As a result, the IDoc types usually contain more segments than necessary for the individual application cases. To improve performance when generating IDocs, you can use views to ensure that only the segments relevant to the current business process are filled with data. Views are therefore only important for IDoc outbound processing.

Integration
The application must support this function: The program which writes the application data in the IDocs must carry out the following tasks: Determine from the partner profiles whether a view exists. To determine this, the function module EDI_PARTNER_READ_OUTGOING is called. Query, which segments belong to the view. The function module EDI_VIEW_READ is called once, which returns the segments in a table. Query, whether the current segment should be maintained in the current view. The table returned by EDI_VIEW_READ is used.

The standard delivery system contains views for the IDoc types DELVRY01 and INVOIC01.

Prerequisites
You must have IDoc development authorization (authorization object S_IDOCDEFT, for example in the role SAP_BC_SRV_EDI_DEVELOPER_AG) before you can define a view.

Activities
1. In the Initial Node of the IDoc Interface choose Development IDoc view to define a view.
Enter a name for the view and select . 2. When the next screen appears, assign a message type (logical message) and a basic type to the view (the assignment of an extension to the view is optional). This assignment is checked in the partner profiles. 3. Position the cursor on a segment, which is to be included in the view. Choose . The following segments must be included in the view: a. Qualified segments b. Mandatory segments 4. Save your entries. 5. In the partner profiles ( General outbound processing), enter the view for the corresponding combination of partner and message.

IDoc Interface
Purpose
IDoc (Intermediate Document) is a standard SAP document format. IDocs enable the connection of different application systems using a message-based interface. The use of IDocs has three main aims:

1. Structured exchange and automatic posting of application documents. 2. Reduction of the varying complex structures of different application systems to one simple structure. For example, the structure of an SAP application document and the structure of the corresponding EDI message according to the UN/EDIFACT standard. 3. Detailed error handling before the data is posted in the application.
IDocs can be regarded and defined on two levels: On a technical level and on an application level. The technical level enables the support of cross-application functions such as routing and technical error handling. Technical view This view is defined by three different types of structure that are generated by the IDoc interface:

1. Control record 2. Data record 3. Status record


Application view This view is defined by the segments of an IDoc. Segments are structures that are used for the interpretation of the field SDATA in the data record. An IDoc type is defined by the corresponding:

1. Segments 2. Attributes of these segments (for example, maximum number, hierarchical sequence, segment status)

You might also like