Idoc Overview

of 22 /22
IDOC Overview Session By Kevin Nguyen-Tu Dec 2005 IDOC through Inbound and Outbound Processing

Transcript of Idoc Overview

Page 1: Idoc Overview

IDOC Overview Session

By Kevin Nguyen-TuDec 2005

IDOC through Inbound and Outbound Processing

Page 2: Idoc Overview

Kevin T. Nguyen-Tu -


Acronyms and Abbreviations

� ALE – Application Link Enabling� XI – Exchange Infrastructure� IDoc – Intermediate Document

Page 3: Idoc Overview

Kevin T. Nguyen-Tu -


How Are…

� Basic Type, Message Type, and IDOC related? � The Message Type is the data dictionary that contains one or more

Basic Type. The IDOC is the data container outcome from data extraction through the message types. In a way, IDOC is the XML Schema with Data associated to it. IDOC has a basic type which consists of segments (ALE).

� For example, the Message Type used in HR is HRMD_A, while the Basic Type associated with it is HRMD_A01, HRMD_A02, HRMD_A03,…HRMD_A06. From there, when data is extracted against HRMD_A06, an IDOC is created using the data definition specified from

the message type.

Page 4: Idoc Overview

Kevin T. Nguyen-Tu -


Quick Ref: Transactions

� SALE – IDoc Interface / ALE IMG� This is the configuration menu node for

IDOC, similar to SPRO for normal functional configuration.

� WEDI – SAP Easy Access IDOC Menu

� This is the user menu for the IDOC version, similar to the standard SAP menu when you first enter on to SAP.

Page 5: Idoc Overview

Kevin T. Nguyen-Tu -


Quick Ref: Transactions (cont’d)

� WE02 – IDOC Listing� This transaction will list all of the IDoc

both for INBOUND and OUTBOUND process. In the IDoc list, you will find the status, segments, and data inside the IDoc

� PFAL – HR ALE Distrubtionof HR Master Data� This transaction allows you to ALE

(push) HR Master Data from one SAP system to another SAP system. Such as from HR ECC to SRM client

Page 6: Idoc Overview

Kevin T. Nguyen-Tu -


Quick Ref: Transactions (cont’d)

� BD21 – Create IDOC from Change Pointers� Extract data from change pointers

based upon Message Type. It will create the IDOC corresponding to the Message Type used and automatically populate the IDOC will the values pull out from change pointers.

� BD22 – Delete Change Pointers� Over times, as changes happen in SAP

it will be track in change pointers. Similar to an Audit Log. This will get fairly large. This program will assist you in doing some cleanup work

Page 7: Idoc Overview

Kevin T. Nguyen-Tu -


Quick Ref: Transactions (cont’d)

� WE19 – IDOC Inbound Testing Tool� This transaction allow you to use a

newly created IDOC structure, manually populate data into it and see it post to the actual table / infotype.

� BD73 – Reprocess Non Posted IDocs� If an IDoc passing failed, you could use

this transaction to reprocess that exact same IDoc with all the values already in there.

Page 8: Idoc Overview

Kevin T. Nguyen-Tu -


Quick Ref: Transactions (cont’d)

� WE60 – Documentation� Allows you to specify a message type

and it will return the documentation on the message type. It will list all the infotype or values it support and the structure.

� BD53 – IDoc Reduction Maintenance� Allows you to create a reduced

message based upon a standard message type

Page 9: Idoc Overview

Kevin T. Nguyen-Tu -


Partner ProfilesTransaction WE20 is used to setup and maintain the Partner Profile. This is where you specify based upon a message type, what system the data should ALE over thru OUTBOUND interface.

In addition to setting up the partner profile, you will need to setup the receiver port RFC using transaction SM59, define the logical system, define distribution model, define the ports, and generate the partner profile via BD82. Go to the IMG SALE and visit the configuration tables.

Inbound & Outbound Partners

Page 10: Idoc Overview

Kevin T. Nguyen-Tu -


Create Reduced Message Type

� Transaction: BD53

Page 11: Idoc Overview

Kevin T. Nguyen-Tu -


Maintain Distribution ModelFrom the SALE IMG node, you could access the Maintain / Display Distribution Model. This is where you setup filter criteria for the ALE process.

For example, during the ALE OUTBOUND process from System A to System B, you could specify to only send over a particular object type through this pipeline, such as Object Type O for Organizational Objects. The connection is based upon a particular message type, so you could have more than one rules in the distribution model

Page 12: Idoc Overview

Kevin T. Nguyen-Tu -


How To Read An IDOCIDOC Number

Status Code: 52 – Successful, 30 mean extraction done, ready for ALE process

Basic Type and Message Type. In the hierarchy world, the Message Type is the top, and then Basic Type. The IDOC is the result of the after data is populated.

System Connectivity Partner Profile Info

This goes hand in hand with the status code above. It will tell you the step by step status code, where the status code above gives you the last recorded status code.

Example: A standard Message Type would be HRMD_A, the Basic Type would be HRMD_A01, HRMD_A02, HRMD_A03, etc.

Page 13: Idoc Overview

Kevin T. Nguyen-Tu -


How To Read An IDOC (cont’d)The IDOC segments are grouped by keys identifier. The top node is E1PLOGI, under it you have E1PITYP and E1Pxxxx.

E1PLOGI specify the PLVAR (Plan Version), OTYPE (Object Type), OBJID (Object ID), and OPERA (Operation Type)

E1PITYP will use PLVAR, OTYPE, and OBJID as the foreign keys, but add INFTY (Infotype), BEGDA (Begin Date) and ENDDA (End Date).

E1Pxxxx is the actual INFOTYPE record itself.

As you can see in the example to your right, E1PLOGI is grouped by the OTYPE and OBJID. All E1PITYP under it are associated with the corresponding infotype.

Page 14: Idoc Overview

Kevin T. Nguyen-Tu -


How To Read An IDOC (cont’d)1. 2.

3. 4.

Top E1PLOGIUnder E1PLOGI, it is group by E1PITYP

Under E1PITYP, it is group by the infotype

Top E1PLOGI of next record

Page 15: Idoc Overview

Kevin T. Nguyen-Tu -


How To Test INBOUND IDOCTo test an INBOUND IDoc load, you will need to resort to a transaction WE19. Based upon the assumption you already have the partner profile setup and in place.

You could use an Existing IDOC that was created due to another process or an OUTBOUND ALE action, repopulated that for INBOUND loading.

If an existing IDOC is not available, you could use a message type or other method for INBOUND loading. Let say in our example we do have an available existing IDOC

Page 16: Idoc Overview

Kevin T. Nguyen-Tu -


How To Test INBOUND IDOC (Cont’d)

This line specify the receiver and sending information. In such, it is the partner profile, partner type. Message Type association will also be identified here

How are you going to do your Inbound Test? Standard Inbound will use standard code and standard function module to do the load. Inbound Function Module allows you to specify the function module you want to do the load. Inbound file will do standard load against a data file, rather than data populated from this screen

Page 17: Idoc Overview

Kevin T. Nguyen-Tu -


How To Test INBOUND IDOC (Cont’d)

This is a sample IDOC tree structure

You have the standard E1PLOGI, E1PITYP, and E1Pxxx grouping you saw earlier. When double click on anyone of those line, a window with fields is available to populate values into

Once you populate the “Change Data Record” screen, it will look like this in the IDOC

Page 18: Idoc Overview

Kevin T. Nguyen-Tu -


How To Create OUTBOUND IDoc From Change Pointers

1) Use Transaction BD21 or if access from SA38/SE38, use program code RBDMIDOC

2) Enter in the message type you would like change pointers to extract from

3) Upon successful extract, you will see the ALE log as green light. This will in turn create IDoc and ALE over to the designated system from the partner profile

4) Use WE02 to validate the content of the IDoc

Page 19: Idoc Overview

Kevin T. Nguyen-Tu -


How To Create OUTBOUND IDoc w/o Change Pointers

1) Using the transaction PFAL or if accessing via SA38/SE38 the program RHALEINI

2) Populate the screen with the basic information you would like the program to create the IDoc and ALE over to the partner profile system. You could ship by a certain object type, object ID, infotype, subtype, and/or evaluation path. For example, I could ALE from the SANDBOX ECC system to SANDBOX SRM system all position object (OTYPE: S) with their infotype 1001 (relationship) and subtype 012 (the chief relationship).

3) Select the transfer mode: INSERT or UPDATE. To insert, it will delete the target system will the same information it is extraction, and re-insert the new information. The Update only send over data that had been changed to the target system.

4) This method will send by date parameters and not by object changed from change pointers.

The program “HR: ALE Distribution of HR Master Data” allows you to transfer data from one system to another system through an ALE process via the IDoc segments

Page 20: Idoc Overview

Kevin T. Nguyen-Tu -


Common HCM Related Basic / Message Types

� HRMD_A HR: Plan data and HR master data� This one contains the standard OM and PA infotypes

� HRMD_ABA HR: Basis Plan Data, Central Person (Recip. Not HR, RW/LO)� This is mainly used to interface with CRM, SRM, etc.

� HROT_NM HR: Outsourcing US� HROT_TM HR: Outsourcing - Time Wage

Types� HROT_UM HR: Outsourcing US� HROT_US HR: Outsourcing - US PayrollNote: You could view a list from table VEDI_EDMSG via transaction SM30/SM31

Page 21: Idoc Overview

Kevin T. Nguyen-Tu -


Useful Function Modules

� CHANGE_POINTERS_CREATE_DIRECT� In standard INBOUND IDoc load, change pointers does not get

updated directly. This function module will take care of that.

� RH_MASTER_IDOC_DISTRIBUTE_HRMD� When using RBDMIDOC program or transaction BD21 to extract

from change pointers, people would like some data prior process to occur prior to the final output of the IDOC. Inside this function module, you could use CUSTOMER-FUNCTION ‘001’ to place all your custom code in for extraction processing

Page 22: Idoc Overview

Kevin T. Nguyen-Tu -


Useful HTTPs� SAP R/3 ALE White Paper


� What is the differences between ALE, IDOC, & BAPI�

� SAP Developer Network�

� SAP Technical Discussion Forum�

� SAP Help Portal�

� IDoc Types / Message Types For HR Business Process�