Sunteți pe pagina 1din 21

ALE/IDocs

Outbound Process
DDatabase
Outbound Program Master IDoc
Master Idoc is an Internal Table to maintain the data records for all the segments according to the physical sequence of segments of IDoc ALE Distribution Model ( BD64) -----------------------------------------Sendor Recever MsgTyp S1 R1 DEBMAS S1 R2 DEBMAS

ALE Service Layer IDoc1 IIDoc2 IDoc3

Communication Layer R1 R2 R3

Outbound Partner Profile ---------------------------------Receiver MODE R1 Immediate R2 Collect

Inbound Process

Custom IDocs
Create Custom Idoc Type in Source System:
Create Segments ( WE31) Create Idoc Type( WE30 )

Custom Idocs Outbound Config


Create New Message Type ( WE81 ) Link Message Type + Idoc Type ( WE82 ) Maintain Distribution Model ( BD64 ) Outbound Partner Profile ( WE20 ) Outbound Program

Create New Message Type (WE81)

Link Message Type + Idoc Type (WE82)

Maintain Distribution Model ( BD64 )

Outbound Partner Profile ( WE20 )

Outbound Partner Profile ( WE20 )

Custom Idocs Outbound Program


Fetch the data from the DDic tables Fill the control record structure of type EDIDC
Specify message type, Basic IDoc type, tRFC Port, Partner number and Partner type of the receiver

Fill the data records


Define structures like the IDoc segments Fill the structures with fetched data Pass the segment name and the above structure to the appropriate fields of EDIDD type structure Append the EDIDD structure to the EDIDD type internal table

Custom Idocs Outbound Program


Now, call the function module MASTER_IDOC_DISTRIBUTE and pass the IDoc control record structure and data record table Commit work if return code is zero Function module returns a table of type EDIDC to provide the details about generated IDoc Display appropriate log

Inbound Program
Copy standard Inbound Fuction Module IDOC_INPUT_DEBITOR to custom FM ZIDOC_INPUT_CUSTOM. Delete the existing functionality. Add Include MBDCONWF. This include contains predefined ALE constants. Activate it and use it for configuration.

Inbound Configuration
Create custom Idoc Type in the receiver system Create New Message Type in the receiver system( WE81 ) Link Message Type + Idoc Type ( WE82 ) Link Message Type + Idoc Type + Function Module ( WE57 ) Define the attributes of the FM ( BD51 )

Inbound Configuration
Create and link the process code to Function Module ( WE42 ). Maintain the inbound partner profile ( WE20 )

Link Message Type + Idoc Type + Function Module ( WE57 )

Define the attributes of the FM (BD51)

Create and link the process code to Function Module ( WE42 ).

Maintain the inbound partner profile (WE20)

Inbound Function Module


Loop at EDIDC table Check if the message type is ZRZORDER. Otherwise raise WRONG_FUNCTION_CALLED exception Loop at EDIDD table
Append data from the segments to appropriate internal tables For example: append data from ZRZSEG1 segment to the internal table of type ZCUSTOMERS

Update the DDic tables from internal tables

Inbound Function Module


Depending on the result of the update, fill the IDoc status record (type BDIDOCSTAT) and append it to the corresponding table.
Status 53 => Success Status 51 => Error

S-ar putea să vă placă și