Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

SAP XI IDOC Adapter

Presenter: Sam Raju

1
Objectives

After this session you will be able to:

Understand the basics of IDoc adapter


Be familiar with technical aspects of the IDoc
adapter

© SAP AG, IDoc Adapter, Sam Raju

2
IDOC adapter -- Basics

IDoc adapter is required to connect SAP systems (or external


systems) to the Integration Server using IDoc communication.

IDoc adapter enables you to process IDocs using the Integration


Engine. The IDoc Adapter converts the IDocs to IDoc XML format so
that they can be processed by the Integration server pipeline.

The IDoc Adapter is implemented in ABAP and reside directly on


the Integration Sever(ABAP Stack).

The IDoc adapter only evaluates the payload of a received XML


message. Additional attachments (such as trace attachments) are
ignored and not forwarded.

It is also possible to transfer XML received by the Integration


Server in IDoc format to connected systems.

© SAP AG, IDoc Adapter, Sam Raju

3
IDOC adapter – prerequisites/notes

Prerequisites for using the IDOC adapter are maintaining the


R/3 system that sends/receives the IDOCs in SLD and configure
sending/receiving of IDOCs in R/3 system.

The Logical System name for your business system that you
define in SLD must be the same name like in the corresponding
SAP system (see TA: SCC4 to check IS name ).

You cannot define a sender IDOC channel in directory due to


the fact that the IDOC adapter does not run in J2EE AF but is an
“built in” adapter.

Routing rules and sender has to be specified as for any other


channel in the directory object model.

© SAP AG, IDoc Adapter, Sam Raju

4
IDOC Adapter

Inbound IDoc XI-Pipeline


Subsystem
IDoc
tRFC
Adapter IDoc
XML

SAP System
RFC dest Integration Server

Port
FM
EDI_OUTPUT_NEW IDX1

IDX2
FM
IDocTYPE_READ_COMPLETE RFC
...
RFC dest
Metadata
Metadata

© SAP AG, IDoc Adapter, Sam Raju

5
Example : Header of IDOC in SAP system

Header of IDOC to be sent


Check within TA: WE19 for existing IDOCS

© SAP AG, IDoc Adapter, Sam Raju

6
Example : Header of Inbound IDOC in XI

© SAP AG, IDoc Adapter, Sam Raju

7
Example : Steps in XI IS system to Receive IDOCS

Create RFC-Destination in XI(TA: SM59) to SAP sender system.

This connection refers to the SAP sender system that sends the IDOCs.

You need a user with RFC authorization in this system to log on.

© SAP AG, IDoc Adapter, Sam Raju

8
Example : Steps in XI IS system to Receive IDOCS

Maintain a tRFC Port using TA:IDX1 to load IDOC metadata.

The Name of the Port usually have SAP<SID>.

Use TA:IDX2 to overview the metadata that is already loaded into IS.

© SAP AG, IDoc Adapter, Sam Raju

9
Example : Import IDOC structure into IB Repository

If a mapping between IDOC structures is needed, first you need to import


IDOC structures into IB Repository.

The etc/services file, on your J2EE host, must contain entries for
sapgw and sapms ports of the system you are importing from.

© SAP AG, IDoc Adapter, Sam Raju

10
Example : Imported IDOC structure

© SAP AG, IDoc Adapter, Sam Raju

11
Example : send IDOC to SAP system

same preparations as for sender channel (receive IDOCs) are needed

© SAP AG, IDoc Adapter, Sam Raju

12
IDoc-Adapter – Receiver Channel

© SAP AG, IDoc Adapter, Sam Raju

13
IDoc Party and XI Party

IDoc Control Record XI Message Header

DOCNUM GUID

MANDT sender party agency


SNDPOR sender party scheme
sender party name
SNDPRN sender service
SNDPRT
SNDPFC receiver party agency
receiver party scheme
RCVPRN receiver party name
RCVPRT receiver service
RCVPFC
interface namespace
MESTYP interface name
IDOCTYP
CIMTYP
...

© SAP AG, IDoc Adapter, Sam Raju

14
Relation Sender System to XI Party-less service

The sender system identifies itself with the fields


SNDPOR(sender port) and Client of the IDoc control record.

The sender system must fill the field sender port:


• R/3 System => sender port := SAP + ‚SYSID‘
• other => sender port := ‚logical system‘

Identification := ‚SYSID‘_Client‘ or ‚logical system‘

obligatory

service name (XI partyless service)

© SAP AG, IDoc Adapter, Sam Raju

15
Relation Sender System to XI Party-less Service

© SAP AG, IDoc Adapter, Sam Raju

16
IDoc-Adapter – How to Fill Control Record from External?

! = mandatory Interface:
!IDOCTYP: WMTCID02
ZIMTYP: für Kundenerweiterung
Technical fields:
!MESTYP: WMTOCO
!MANDT: Client
MESCODE:
!DOCREL: MESFUNC:
SNDPOR: WCU !SNDPRT: LS
!DIRECT: 1 !SNDPRN: WMUNIT

!TABNAM: EDI_DC40 SNDPFC: optional Partner Function


!RCVPRT: LS
!DOCNUM:
0000000000000001 !RCVPRN: SP4CLNT800
RCVPFC: Optional
TEST: optional
SERIAL: optional
(valid for structure: edi_dc40)

© SAP AG, IDoc Adapter, Sam Raju

17
Relation IDoc Party to XI Party

One business party, i.e. TravelAgency,


as IDoc party in different systems

system client IDoc party name party type party function


BCE 123 4711 LI -
BCE 123 8004711 DE LF
ALR 456 Meyer LI -

party name := IDoc party name


party scheme := ALE#‚party type‘[#‚party function‘]
party agency := service
optional

party name := ‚business party‘


party scheme := XIParty not visible

party agency := http://sap.com/xi/XI/Systems


in Directory

© SAP AG, IDoc Adapter, Sam Raju

18
Relation IDoc Party to XI Party

system client IDoc party name party type party function


BCE 123 4711 LI -
BCE 123 8004711 DE LF
ALR 456 Meyer LI -

Configuration of relations in Integration Directory

© SAP AG, IDoc Adapter, Sam Raju

19
Overview: IDoc Control Record

The IDoc-Adapter sends out IDocs with a Control record,


overview how to configure the control record fields

routing mapping channel IDoc


pipeline service definition / outbound
identification adapter

party payload party role build


& modification & IDoc control
interface technical record
determination routing

fields of IDoc * MESTYP * RCVPOR SNDPOR


control record IDOCTYP * SNDPRN * MANDT
CIMTYP * SNDPRT * DIRECT
* SNDPFC * CREDATE
RCVPRN CRETIME
RCVPRT TABNAM
RCVPFC STATUS
OUTMOD
DOCREL
ARCKEY

Fields are set by the system runtime, no configuration possible


Fields are configured by the administrator, IDoc key fields are marked with an asterix (*)

© SAP AG, IDoc Adapter, Sam Raju

20
Partner Numbers without change on XI

Use case: 3000 vendors are already


maintained in the IDoc-Sender System; the
vendor-number is transferred to XI in the
partner-number field of the control record
EDI_DC40; the IDoc-receiver system expects
exactly the same 3000 vendor numbers

Solution: - do not maintain party


- use „*“ in the routing definitions
for the party field
- no additional alternative identifiers
or header mapping necessary

© SAP AG, IDoc Adapter, Sam Raju

21
IDoc Adapter: Acknowledgements/ALEAUDIT

© SAP AG, IDoc Adapter, Sam Raju

22
IDoc-Adapter – Supports EOIO

Application System Partner Directory: Communication


Profile Channel

© SAP AG, IDoc Adapter, Sam Raju

23
Summary

Now you should be able to:

Understand the basics of IDoc adapter

Be familiar with technical aspects of the IDoc adapter

© SAP AG, IDoc Adapter, Sam Raju

24

You might also like