Sie sind auf Seite 1von 22

IDOC Overview

Session
By Kevin Nguyen-Tu
Dec 2005

IDOC through Inbound and


Outbound Processing
Acronyms and Abbreviations
 ALE – Application Link Enabling
 XI – Exchange Infrastructure
 IDoc – Intermediate Document

Kevin T. Nguyen-Tu - 2
http://www.saphelpbykevin.com
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.

Kevin T. Nguyen-Tu - 3
http://www.saphelpbykevin.com
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.

Kevin T. Nguyen-Tu - 4
http://www.saphelpbykevin.com
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 Distrubtion


of 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

Kevin T. Nguyen-Tu - 5
http://www.saphelpbykevin.com
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

Kevin T. Nguyen-Tu - 6
http://www.saphelpbykevin.com
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.

Kevin T. Nguyen-Tu - 7
http://www.saphelpbykevin.com
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

Kevin T. Nguyen-Tu - 8
http://www.saphelpbykevin.com
Partner Profiles
Transaction 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

Kevin T. Nguyen-Tu - 9
http://www.saphelpbykevin.com
Create Reduced Message Type
 Transaction: BD53

Kevin T. Nguyen-Tu - 10
http://www.saphelpbykevin.com
Maintain Distribution Model
From 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

Kevin T. Nguyen-Tu - 11
http://www.saphelpbykevin.com
How To Read An IDOC
IDOC 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

Example: A standard Message


Type would be HRMD_A, the Basic
Type would be HRMD_A01,
HRMD_A02, HRMD_A03, etc.

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.

Kevin T. Nguyen-Tu - 12
http://www.saphelpbykevin.com
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.

Kevin T. Nguyen-Tu - 13
http://www.saphelpbykevin.com
How To Read An IDOC (cont’d)
1. 2.
Under
Top E1PLOGI E1PLOGI, it is
group by
E1PITYP

3. 4.
Under Top E1PLOGI
E1PITYP, it is
of next record
group by the
infotype

Kevin T. Nguyen-Tu - 14
http://www.saphelpbykevin.com
How To Test INBOUND IDOC
To 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

Kevin T. Nguyen-Tu - 15
http://www.saphelpbykevin.com
How To Test INBOUND IDOC
(Cont’d)
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

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

Kevin T. Nguyen-Tu - 16
http://www.saphelpbykevin.com
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

Kevin T. Nguyen-Tu - 17
http://www.saphelpbykevin.com
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

Kevin T. Nguyen-Tu - 18
http://www.saphelpbykevin.com
How To Create OUTBOUND
IDoc w/o 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

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.

Kevin T. Nguyen-Tu - 19
http://www.saphelpbykevin.com
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
 Note: You could view a list from table HR: Outsourcing
VEDI_EDMSG - US Payroll
via transaction SM30/SM31

Kevin T. Nguyen-Tu - 20
http://www.saphelpbykevin.com
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

Kevin T. Nguyen-Tu - 21
http://www.saphelpbykevin.com
Useful HTTPs
 SAP R/3 ALE White Paper
 http://www.sapgenie.com/ale/whitepaper.htm
 What is the differences between ALE, IDOC, & BAPI
 http://www.sap-img.com/abap/ale-bapi.htm
 SAP Developer Network
 http://www.sdn.sap.com
 SAP Technical Discussion Forum
 https://www.sdn.sap.com/irj/sdn/collaboration
 SAP Help Portal
 http://help.sap.com/
 IDoc Types / Message Types For HR Business Process
 http://www.sapgenie.com/sapedi/message_types_bp_hr.htm

Kevin T. Nguyen-Tu - 22
http://www.saphelpbykevin.com

Das könnte Ihnen auch gefallen