IDOC
IDOC
IDOC
January 5, 2009 jiteshdua SALE IMG ALE Configuration root WE20 Manually maintain partner profiles BD64 Maintain customer distribution model BD71 Distribute customer distribution model SM59 Create RFC Destinations BDM5 Consistency check (Transaction scenarios) BD82 Generate Partner Profiles BD61 Activate Change Pointers Globally BD50 Activate Change Pointer for Msg Type BD52 Activate change pointer per change.doc object BD59 Allocation object type -> IDOC type BD56 Maintain IDOC Segment Filters BD53 Reduction of Message Types BD21 Select Change Pointer BD87 Status Monitor for ALE Messages BDM5 Consistency check (Transaction scenarios) BD62 Define rules BD79 Maintain rules BD55 Defining settings for IDoc conversion WEDI ALE IDoc Administration WE21 Ports in Idoc processing WE60 IDoc documentation SARA IDoc archiving (Object type IDOC) WE47 IDoc status maintenance WE07 IDoc statistics BALE ALE Distribution Administration WE05 IDoc overview BD87 Inbound IDoc reprocessing BD88 Outbound IDoc reprocessing BDM2 IDoc Trace BDM7 IDoc Audit Analysis BD21 Create IDocs from change pointers SM58 Schedule RFC Failures Basic config for Distributed data: BD64: Maintain a Distributed Model BD82: Generate Partner Profile BD64: Distribute the distribution Model
Programs: RBDMIDOC Creating IDoc Type from Change Pointers RSEOUT00 Process all selected IDocs (EDI) RBDAPP01 Inbound Processing of IDocs Ready for Transfer RSARFCEX Execute Calls Not Yet Executed RBDMOIND Status Conversion with Successful tRFC Execution RBDMANIN Start error handling for non-posted IDocs RBDSTATE Send Audit Confirmations For testing you can use WE19 Posted in 1.3 SD Transaction Codes, IDOC, EDI and ALE. 3 Comments
IDOC / BAPIs
December 28, 2007 jiteshdua There are many differences between IDOCs and BAPIs. BAPIs in 3.1 are synchronous; in 4.+ they can be asynchronous (and I believe they then drive certain ALE/IDOCs). BAPIs are called from the outside-in. That is, an external program invokes a BAPI that gets data from SAP to display or updates data in
SAP. The BAPI concept does not include an event concept you cannot tell SAP that when certain events happen to a business object, to fire a message or a file to an external system. BAPIs are invokable from Java or C/C++ or Visual Basic (and I think some people are using Delphi). In 3.1x there are very few BAPIs to use. In 4.+ SAP has added a large number. BAPIs are not totally immune to upgrades but if they are to be retired you supposedly will have them supported for two releases. Whether those are point or letter releases, I dont know. I believe that IDOCs may be more changable from release to release. BAPIs are reasonably well documented and there is a common place to look to see what is available. IDOCs I have heard are poorly documented in terms of finding them, and IDOCs were done differently by different groups in SAP. BTW, you can also use Java, C/C++, Visual Basic, to invoke RFCs in SAP and get or update data. Thats how the BAPIs work since they utimately are sets of RFC calls (written to a design spec for BAPIs). Posted in ABAP, IDOC, EDI and ALE. Tags: BAPI, IDOC. 2 Comments
ALE comes with application distribution/integration scenarios as well as a set of tools, programs, data definitions, and methodologies that you can easily configure to get an interface up and running. BAPI BAPIs provide a stable, standardized method for third-party applications and components to integrate into the Business Framework. These interfaces are being specified as part of SAPs initiative with customers, partners and leading standards organizations. Also, SAP has implemented the emerging Object Application Group (OAG) specifications with BAPIs. BAPI AND CALL TRANSACTION BAPI One of the big plusses for BAPIs is that the interface and function are not supposed to change. This is a big plus when you do upgrades or hot packs because the transaction can change (format, required inputs etc) which means you then need to update the call transaction. Some of the BAPIs are better documented and easier to use than others. You usually need to perform the BAPI that actually does the COMMIT after you call your BAPI. The Program coding for calling a BAPI is usually cleaner than setting up the screen flow etc for the Call Transaction. You dont need to worry about special data circumstances interrupting the normal data flow of the screens and causing errors because of that. BAPIs probably have better performance since they dont do the screen flow processing. In general if the BAPI exists for the transaction you want to perform and you can figure out how to use it the BAPI is probably the best way to go. This is just from my experience working with both BAPI and Call Transaction. I have had some very good successes with BAPIs, but very occasionally found that I could not get the BAPI to perform the update I needed. The interface concept of the classic R/3 is based on two different strategies: Remote Function Calls (RFC) and data exchange through IDoc message documents. RFC makes direct and synchronous calls of a program in the remote system. If the caller is an external program it will call an RFC-enabled function in R/3 and if the calling program is the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3 program through a gateway-proxy (usually rfcexec.exe). BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps. While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario. The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data. The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order. Posted in ABAP, IDOC, EDI and ALE. Tags: ALE, BAPI, IDOC. 3 Comments
EDI has two process 1. Outbound process 2. Inbound process OP: 1.Application document is created. 2.IDOC is generated 3.IDoc is transferred from SAP to Operating system layer 4.Idoc is converted into EDI standards 5.Edi document is transmitted to the business partner 6.The Edi Subsystem report status to SAP IP: 1.EDI transmission received 2.EDI document is converted into an IDOC 3.IDOC is transferred to the SAP layer 4.The application document is created 5.The application document can be viewed. IDOC: IDOC is a container that can be used to exchange data between any two process. Each iDoc is assigned a unique number for tracking and future reference. iDoc Consist of several segments,and segments contain several fields. iDoc contains the following three type of records 1.One Control Record. 2.One or many Data Record 3.One or many Status record. PORT: Port is used in the outbound process to determine the name of the EDI subsystem program,the directory path where the idoc file will be created at the operating system level,the idoc file names and the rfc desinations. RFC Destination: Used to define the characteristics of communication links to a remote system on which a functions needs to be executed. Partner Profile: Partner profile specified the various componets used in an outbound process ( Partner number,IDoc type,message type,Port,Process code),the mode in which it communicates with the subsystem(batch or immediate) and the person to be notified in case of errors. Message Control Used in pricing,account determination,material determination,and output determination.The message control component enables you to encapsulate business rules with out having to write abap programs.
Process: Setup RFC destinations SM59 Port Destinations WE21 Partner Profile WE20 Message control NACE Purchase Order ME21 Check IDOCs WE02,WE05 Explain to me about Idoc? IDoc (for intermediate document) is a standard data structure for electronic data interchange (EDI) between application programs written for the popular SAP business system or between an SAP application and an external program. IDocs serve as the vehicle for data transfer in SAPs Application Link Enabling (ALE) system. IDocs are used for asynchronous transactions: Each IDoc generated exists as a self-contained text file that can then be transmitted to the requesting workstation without connecting to the central database. Another SAP mechanism, the Business Application Programming Interface (BAPI) is used for synchronous transactions. A large enterprises networked computing environment is likely to connect many geographically distributed computers to the main database. These computers are likely to use different hardware and/or operating system platforms. An IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another. IDoc types define different categories of data, such as purchase orders or invoices, which may then be broken down into more specific categories called message types. Greater specificity means that an IDoc type is capable of storing only the data required for a particular transaction, which increases efficiency and decreases resource demands. An IDoc can be generated at any point in a transaction process. For example, during a shipping transaction process, an IDoc may be generated that includes the data fields required to print a shipping manifest. After a user performs an SAP transaction, one or more IDocs are generated in the sending database and passed to the ALE communication layer. The communication layer performs a Remote Function Call (RFC), using the port definition and RFC destination specified by the customer model. The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some external system. Posted in IDOC, EDI and ALE. Tags: EDI, IDOC. 2 Comments
IDOC
December 2, 2007 jiteshdua
What is IDOC IDOC = Intermediate Document IDOC is simply a data container used to exchange information between any two processes that can understand the syntax and semantics of the data. When we execute an outbound ALE or EDI Process, an IDOC is created In an inbound ALE or EDI process, an IDOC serves as input to create an application document. In the SAP System, IDOCs are stored in database. Every IDOC has an unique number(within a client). IDOCs are independent of the sending and receiving systems.(SAP-to-SAP as well as Non-SAP) IDOCs are based on EDI standards, ANSI ASC X12 and EDIFACT. In case of any conflict in data size, it adopts one with greater length IDOCs are independent of the direction of data exchange e.g. ORDERS01: Purchasing module : Inbound and Outbound IDOCs can be viewed in a text editor. Data is stored in character format instead of binary format. IDOC Components Basic IDOC Type (we30) Basic IDOC Type defines the structure and format of the business document that is to be exchanged. IDOC Type has a specific name list of permitted segments hierarchy of segments mandatory/optional segments minimum/maximum range of each segment. Segments
Segment defines the format and structure of a data record. Segments are reusable components. For each segment SAP creates Segment Type (version independent) Segment Definition (version dependent) Segment Documentation The last 3 characters is the version of the segment Definitions keep changing as per the version but the segment type remains the same IDOC Run-Time Components An IDOC is an instance of an IDOC Type At run time the following events occur A unique IDOC no. is allocated by SAP One control record is attached to the IDOC Segments translate into data records Status records are attached Syntax rules are checked. Each IDOC has 3 parts Control Record Data Record Status Record We02 or We05 Control Record All control record data is stored in EDIDC table. The key to this table is the IDOC Number It contains information like IDOC number, sender, recipient information, channel it is using, which port it is using etc.
Data Record Data record contains application data like employee header info, weekly details, client details etc All data record data is stored in EDI_DD40 table and EDI_DD Status Record Status record are attached to an IDOC at every milestone or when it encounter errors. All status record data is stored in EDID8 table. Where and How IDOC is created Where and How an IDOC is created? Lets take an example to understand this: Whenever a Purchase Order (PO) is created we want to send the IDOC to a vendor. The PO is sent in the form of an IDOC to the vendor (partner). That partner has to be EDI enabled in that system.. SAP should realize that it could send doc to this vendor electronically. (Creating a vendor is not sufficient). Partner Profile should be EDI enabled i.e. A partner profile should exist in the sap system. Quotation, RFQ, PO, SO, Invoice, delivery challan etc are some of the commonly exchanged documents through IDOCs We create only one profile for both inbound and outbound IDOCs. Partner profile should contain message typeto be able to exchange the IDOC. We define partner type, partner function and message type (it distinguish if an IDOC is being sent to same person in same function for different reason e.g. SO) Process Code Creating Outbound Process Code (WE41) What is Process Code? Process of filling the IDOC with application data is done by Function Module. But, function module is not assigned to a Partner. It is encapsulated by a Process Code and this Process Code is assigned to a Partner in Partner Profile. Assigning Function Module to Process Code - Go to Transaction WE41.
- Switch to Change Mode and click New Entries. - Enter Process Code Name and assign the Function Module created. Partner Profile Creating Partner Profile (WE20) What is Partner Profile? We must maintain the business partners with whom we communicate via IDocs, in Partner Profiles. Steps to create Partner Profile - Goto Transaction WE20. - Click on Create Button. - Enter the Number of Vendor Created in Partner No. and LI in Partner Type fields. - Save the Data. - For Outbound Partner Profile we have to create Outbound Parameters - Specify Partner Function, Message type created, Port (create a port in WE21),Basic Type and Output Mode. - Goto Message Control Tab and link the Message Type and Process Code created. - Save. Change Application Data to be transmitted Change Purchase Order Created using transaction ME22n for the Vendor to which partner profile has been created. Go to Messages , add the new Message Type to the list and Save the Purchase Order. An IDOC will be created for the purchase order and will be dispatched to PORT mentioned. Check the status of IDOC (WE02) The IDOC status can be checked using transaction WE02 If the status is 03, it implies that IDOC is passed to Port. Summary: IDOC Workflow
The sequence: 1. Checks whether Partner profile exists or not 2. Whether that PP has a outbound parameter 3. Whether NEU message type is there or not (message control) 4. Checks the process code (gives the name of Function module) 5. Checks immediate transfer or batch transfer 6. Based on that it checks the receiver port 7. Then it will trigger the RFC destination 8. Then it triggers the event on subsystem/customer system 9. Transfer the IDOC to a port and transfer the Idoc in terms of file and it triggers the customer system 10. Customer knows from where it should pick up the file .it picks up the file. Extending an Existing IDOC Type Used in cases where some additional information is required in addition to that supplied by the Standard IDOC Type. In Transaction WE30 we create the IDOC as an Extension and specify the basic type for which it is an extension. We add the segments needed as children to existing ones. None of the Reference Segments can be deleted or changed. Extension Child Segs Basic Type (ORDERS01) F1 F2 F3 F4 F5
Cannot be modified IDOC Views An IDOC type can be used for more than one message type, which results in IDOCs containing more fields than required for a particular message type. IDOC views are used to improve performance in generating IDOCs to ensure only the relevant segments are filled with data. IDOC Views are important only for Outbound Processing. IDOC Type F1 F2 F3 F4 F5 Processing Logic The processing logic associated with the IDOC is the function module that is written to handle the inbound/outbound IDOC. Its written just like any function module but has to follow a standard interface (i.e. Import, Export, Changing & Tables) parameters and it is should be RFC enabled. In this function module we are effectively building up a table of type EDID4 (IDOC Data table) and change the control record.
Posted in IDOC, EDI and ALE. Tags: IDOC. 2 Comments Blog at WordPress.com. Theme: Garland by Stefan Nagtegaal and Steven Wittens.
Blog Stats
o
671,487 hits
Karthik-elk1155@gmai on Remote Support Raj on Remote Support venkat on Questions?? Agrim Consulting on Remote Support
adm
o o o o o
Register Log in Entries RSS Comments RSS WordPress.com Follow us on twitter IT Toolbox SAP SD SAP E-books SAP Education SAP IS-Retail SAP MM Forum SAP SD help SAP Service Marketplace SAP T Codes Worth check Pricing Quiz Test Your SD skills About Us Freelancers Interview help Projects Q&A Questions?? Referrals Remote Support SAP MM SAP SD Training Training Videos Web Dynpro Training
Quick Links
o o o o o o o o o o
Quiz
o o
Pages
o o o o o o o o o o o o
. create Segments in we31. ( Even you can take already existing Idocs like cremas, orders01,matmas) 2.Create Idoc in WE30 ( Either Basic or Extension ) , attach these segments to Idoc. 3. Create a message type in WE81. 4. Create a process code ( if inbound ) we42, ( outbound ) we41. 5 Give the function module, which you have created for populating Idoc segments,( or use existing Process code depending upon requirement like me10 for purchase order). 6. now attach your message type, idoc in we82 And save it. Don't forget to give the relase. 7. Create a port in we21. And Partner function in we20 ( required only for EDI not for ALE, in ALE automatically, port will be created)
688 Views
1 Logical System 2 Assign Logical system 3 RFC 4 Port 5 Customer distribution model 6 Partner profile 7 CDM distribution
Tcode : SALE First 2 steps not necessary ( Basis work already done ) Two logical system created Ls110 -Sender Ls800 - Receiver
Ports We21 define ports TRFC ale File Edi CPI_C - R2 connections
In the port we need to define Port name and RFC destinations And version
Partner profile we20 , BD62 Partner may be customer, vendor, logical system
In BD62 define the partner system (LS800) One more additional entry SYNC for synchronization
With message control Which program need to run for generating the idoc With out message control For some of the programs have inbuilt idoc generation for that case no need to mention program name Process code
Distribute CDM Receiving System: Partner profile is going to control all the thing BD64 - > edit - > model view - > distribute BD67 Function module assigned to the process code
One master idoc multiple communication idoc One communication idoc generated We02 idoc satus
o o
1. create Segments in we31. ( Even you can take already existing Idocs like cremas, orders01,matmas) 2.Create Idoc in WE30 ( Either Basic or Extension ) , attach these segments to Idoc. 3. Create a message type in WE81. 4. Create a process code ( if inbound ) we42, ( outbound ) we41. 5 Give the function module, which you have created for populating Idoc segments,( or use existing Process code depending upon requirement like me10 for purchase order). 6. now attach your message type, idoc in we82 And save it. Don't forget to give the relase. 7. Create a port in we21. And Partner function in we20 ( required only for EDI not for ALE, in ALE automatically, port will be created)