IDoc (Intermediate Documents) IDoc (Intermediate Document) Ganesh Padala www.ganeshsapscm.com ganesh.sap2015@gmail.com IDoc (Intermediate Document) Documents) There are mainly two directions of IDocs. Below are those 1. Outbound 2. Inbound IDoc (Intermediate Documents) 2- Inbound IDoc Inbound IDoc 3rd Party System XML/JSON Middleware System (SAP PI or SOA) IDoc SAP JSON/XML Format Sample JSON XML Inbound IDoc Status STATUS 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 DESCRIPTION IDoc added Application document not posted Application document incompletely posted Application document posted Formal application validation failed Formal application check OK Incorrect IDoc added Test IDoc: Application Validation Error IDoc duplicate from R/2 connection Not used Syntax error in IDoc (input) Further processing despite syntax error (input) Passing IDoc to Application IDoc transfer failed to the application IDoc is ready to be handed over to the application Error in ALE service IDoc waits for predecessor IDoc (serialization) Not used Error, no further processing IDoc has been edited Original of an IDoc that has been edited IDoc reloaded from archive Not used, only R/2 IDoc archived IDoc generated from test transaction IDoc is in input queue Real-Time Inbound IDoc Status Test Inbound IDoc Status Inbound IDoc – Roles of Functional Consultant • Identifying the suitable Standard IDoc type and Message Type • Preparing the Mapping File based on required fields to create respective document based on the business requirements • Conducting several meetings with Middleware and 3rd Party team to finalize all the required Fields along with required inputs • Checking the details of IDoc Type, Message type, RFC Connection, and Process Code • Maintain Inbound Parameters for the Partner Inbound IDoc Configuration-Basis Step 1 Terminology Create Logical System: A logical system is an application system in which the applications are coordinated to work in one common database. In SAP terms, a logical system corresponds to a client. IDoc Interface / Application Link Enabling (ALE) Basic Settings Logical Systems Define Logical System Assign Logical System to Client – SAP System related Logical System will be assigned to the respective clients Transaction Code SALE Inbound IDoc Configuration-ABAP Step Terminology Transaction Code 2 Create a segment : Result of dividing up a portfolio. A segment is a subset of a portfolio. A segment of a portfolio can have different attributes depending on the assigning criteria that are used. WE31 3 Create new/extend existing IDoc Type Basic Type contains all the standard fields that are necessary for carrying out a business transaction IDoc Extension – It is extension of basic type & contains additional custom IDoc segments & fields that are not available in standard basic type. WE30 4 Create Message Type Message type associate with basic IDoc type & defines the kind of data that is exchanged with the partner. One IDoc type can be associated with many message types. WE81 Inbound IDoc Configuration-ABAP/Basis Step Terminology Transaction Code 5 Create Message Type- IDoc Type-Extension: In this step, Message type is assigned to the IDOC type and extension if it is available. WE82 6 Create the RFC Destination: RFC destination will be going to contain the external system endpoint including Host, Path Prefix. Also maintain the basic authentication. In order to send the outbound IDOC to we need to maintain the RFC destination in SAP System SM59 Inbound IDoc Configuration-Basis Step 7 Terminology Create Port : The technical attributes of a communication channel (a port). IDoc interfaces include information such as the IP address of a target system (port type "Internet"), or the directory and name of the file in which the communication data should be transferred (port type "file"). • Transactional RFC (tRFC) ports used for ALE communication. • File ports used by EDI • CPI-C ports used to communicate with R/2 systems • Internet ports used to connect with Internet applications • ABAP-PI ports used to process data via the ABAP programming interface • XML ports used to process files in XML format. Transaction Code WE21 Inbound IDoc Configuration-ABAP/Functional Step 8 Terminology Create Process Code : Transaction Code WE42 Process code refers to a workflow or a function module which helps in reading or writing data from/to IDoc. Process Codes are used in both ALE and EDI framework to identify the function module or API (Application Programming Interface) to be invoked for subsequent processing. Inbound as well as outbound interfaces use process code but for different purposes. inbound process codes are stored in TEDE2. The process code specifies the process (function module or workflow) which is to be triggered when the IDoc is received (tab page Inbound Options). 9 Change Distribution Model- This step may be maintained for Material Master etc. cases. In our projects, Distribution Model is not maintained for any of the Inbound IDocs BD64 Inbound IDoc Configuration-ABAP/Functional Step 10 Terminology Partner Profile Contains parameters for inbound & outbound processing of IDocs. Sender Side ( Inbound from) : In Partner type LS name XXXXX create the Inbound Parameters, give the Message type and the Process Code • SAP inbound processing requires the upstream system to transfer an IDoc to the IDoc interface through the R/3 System port. For this reason, you do not have to specify a port in the inbound partner profiles; the IDoc interface only must recognize the upstream system as a port. A port definition, which provides a unique ID for the upstream system, must be available for the port. The technical parameters of this port definition can (and usually are) overwritten by the upstream system. • Message Code and Message Function are optional which are needed if the same message type is assigned to multiple IDoc types and need any special requirements • In the Inbound Options tab page, you can define whether the inbound IDoc is to be processed immediately. • The indicator only affects direct inbound processing. In ALE distribution scenarios for example, inbound IDocs can first be "left idle" and processed later in the background. Transaction Code WE20 Inbound IDoc Testing Reservation Creation: • Test Tool for IDoc Processing – T Code - WE19 • Display IDoc – T Code – WE05 • Display Reservation – T Code – MB23 Goods Receipt: • Test Tool for IDoc Processing – T Code - WE19 • Display IDoc – T Code – WE05 • Display Material Document– T Code – MIGO Important Links of IDoc https://wiki.scn.sap.com/wiki/display/ABAP/ALE+and+IDocs?original_fqdn=wiki.s dn.sap.com#ALEandIDocs-ALE https://wiki.scn.sap.com/wiki/display/ABAPConn/IDoc+Overview https://wiki.scn.sap.com/wiki/display/ABAP/ALE%2CIDOC IDoc (Intermediate Documents) THANK YOU LIKE – SHARE – SUBSCRIBE