Recently I had to implement the EDI message handlings using seeburger adatper in PI ,I was searching in SDN and reading the documents of the seeburger,but my knowledge didnt help me to understand fully with the existing documents,so I thought of sharing the same as it may help the people like me,who are new to seeburger EDI implementations.
I will take the scenario of File to IDoc i.e need to pick the EDI ANSI X12 850 message from File system and convert the same to IDoc.
In IR need to create the below objects.
1. Import the XSD of the 850 message,997 messages(edi and xml formats) provided by the seeburger under external definitions. (check with your admin for path where Seeburger XSDs are located)
2.Import the IDoc metadata of orders idoc using the import option at SWC level.
3.Need to create three message interfaces one for 850 of type outbound and two for 997( inbound and outbound).
We will have the below in Interface Objects.
4.create the mappings between
- 850 and ordersidoc .
- 997 -From Seeburger propertiary format to 997 EDI-XML format.
5.create the interface mappings for the above created message mappings.
We will have the below in Mapping Objects of IR.
Now in ID need to create the below
1. Create the two business systems/services for scenario.(sender and receiver)
2. Create the four communication channels
Two – Sender adapter channels (dont get confused here as why we need two sender adapters,as one is sufficient for fetching the data,another sender adapter is a vitrual sender adapter ,..go through entire scenario for clarification and better understanding)
Two – Receiver adapter channels
one for picking the data (i.e file sender adapter )
- second one for sending the idoc data to target system(Idoc receiver adapter )
- Third one for handling EDI payload data sent (850),adapter type should be Split 997,which is needed for initating the payload as separate XI message.
- Final one for sending the Ack file to File system or different target system(normally will be sent to the partner ,in the current scenario file system is used)
3. Important thing is the creation of sender agreement.Need the below sender agreements for the current scenario.
Need two sender agreements one for 997-Ack data and other for 850 (payload data)
Here goes the tricky during handling of edi messages . In normal scenarios sender interface name will be payload(message interface) name as it will get passed in the main document of XI message, but for edi its reverse ,i.e acknowledge gets generated in main document and payload will generated as attachment,so we need to provide the 997 message interface name as sender interface name and need to associate the actual sender adapter to it.
As our payload will get generated as attachment,in order to get process we need to generate it as separate XI message which will be done with the help of SPLIT997 (virtual) adapter.
if your EDI file contains multiple messages (i.e 850 and 860 in a single file) then need to create three sender agreements. (one for ack,one for 850 and other one for 860 and two split 997 adapters one for 850 and other for 860)
4. Create two receiver determinations,two interface determinations and two receiver agreements ,we will have the below in ID.
We will be using the below three modules for any basic scenario of EDI message
1. Classifer : for identifying the EDI message type(ANSIX12,EDIFACT,ODDETTE..)
2. CallBicXIRaBean : In short bic module (business integration converter) responsible for the generation of acknowledgement message,separation of multiple edi messages of same and different type(e.g. 850,860 of ANSIX12) into attachments.
3. MessageSplitter : Generates the each attachment as separate XI message.
Now here goes the configuration of the modules in file sender adapter,As integration engine expects the XML message format,we need to convert the received edi message to XML before passing to IE ,which is taken care by seeburger modules configured in sender file adapter.
Need to provide the below parameters of Classifer
attID classifierAtt (fileName)
Parameter attID of classifier module will read the document received and generates the type of edi message received(e.g ANSI,EDIFACT,..) in the file name (classifierAtt) provided in the parameter value ,which can be seen in the XI message (through SXMB_MONI)
In order to get generated the ack file and to convert the payload from edi to xml format ,need to configure the bic module and it requires the EDI message type details of the payload,which will read from the ClassifierattID file of classifier module.
1. classifierAttID : parameter value of this parameter should be the same as the one provided in the classfier module,for identifying the edi message type received.
Once the bic module reads the message type from the file , based on the message type Parent mapping of the specific message will be called for conversion from EDI to XML. (Seeburgers mapping),so for that need to set the 4.mappingName parameter valueto AUTO (this is needed if we need ack)
e.g if message type is EDIFACT then See_Edifact mapping of seeburger ,if it is AnsiX12 then See_AnsiX12 respectively will be called, which generates the functional ack plus in turn calls the child mapping based on the edi message type and version, (e.g here edi message is 850 and version V4010 then mapping called will be (See_E2X_ANSIX12_850_V4010).
2,3 Parameters destSourceMsg and destTargetMsg : reads the message for conversion based on source parameters(i.e either received main payload or attachment document) and generates the converted message in the specified destination parameter
5.Split paramters specifies to generate the output of mapping message as separate attachments.
After successful execution of mapping in bic module,It will generate the main document(contains Functional Ack) and attachment(contains XML form of the sent EDI message i.e 850 XML format).
Splitter module generates the attachments of bic module as a separate XI message by taking the below configuration data of seeburger message splitter.
we need to configure the partner details in seeburger workbench message splitter tab. Go to http://host:port/seeburger page and select message splitter and configure the below
Sender is Partner ID of EDI message . Mapping name is based on the message type and version.(default mapping starts with See prefix..)
Need to associate the sender agreement of virtual channel created in ID.
we are done with configuration and creation of all necessary objects ,now activate all the objects and supply the file in source directory with needed EDI sender ID.
Go to Communication Channel monitoring you can see the below logs of modules
For generating the XI message need sender,sender interface name and sender interface namespace , Bic module generates the attachment name as senderID|childmappingName|state which is key for splitter and splitter looks for the same key in the seeburger workbench configuration data if it gets matches then respective details will be taken for generating the XI message.
Here Key is 0123456789|See_E2X_ANSIX12_850_V4010|Accepted and details like BS_Edi_Sender … will be taken from this configuratin data and generates the XI message for Payload.
We will have two messages generated in SXMB_MONI one for 850 (payload) and other for 997 (Ack) seebelow.
Expand the 997 XI message we can see the below attachments at Inbound Message .
i.e 1. Main Document – Contains Seeburger propertiary format for ACknowledgement
2. ClassifierAtt – Which provides the info of edi message recieved (refer above filename is the one provided in the attID parameter value of classifier)
3. Finally Attachment with name as SenderEDI|MappingName|status which contains edi payload.
If your mapping is fine then you can see an idoc trigger to target system and also XML format of Ack gets stored in File system.
I hope moderators will excuse if I have consumed more space in this blog..
Hope you enjoyed the blog.