Skip to Content
Author's profile photo Former Member

B2B- EDI Inbound -Step by Step Configuration

I believe readers of this blog aware of new B2B Add-on for SAP PI through available content on B2B integration space. Those who are not aware, it’s new offering by SAP for B2B integration in SAP PI space.

In this blog I’ll discuss step by step configuration in inbound EDI (EDI from Partner) scenario.

Scenario: Inbound EDI (EDI from Partner)

/wp-content/uploads/2012/09/scenario1_141296.png

In this example scenario I have configured file sender to pick EDI Message, instead of AS2 Sender or some other technical adapter. Receiver side, instead of IDoc receiver I am storing IDoc in XML format in file system.

Incoming EDI message comprises of following EDI message of ANSI X12 Message format.

810: Invoice                                                          850: Orders

Message format: ANSI X12                                  Message format: ANSI X12

Version: 4010                                                       Version: 4010

ESR Objects:

To maintain the focus on Configuration using new B2B adapters, I am not going into details of ESR objects here.

Integration Directory:

Message Flow:

Step 1. EDI message comprising multiple business transactions received in SAP PI by available technical adapters.

Step 2. Receiver EDI Separator Adapter split received message into individual business transaction message.

Step 3. Individual messages then mapped to target messages in SAP PI.

Step 4. Acknowledgement generated and sent back to sender of EDI message [Only available in case of ANSI X12 messages now].

Step 5. Transformed message then sent to receiver using available technical adapters.

To configure this scenario we have to configure two types of Interfaces.

Interface 1: From EDI Sender to EDI separator adapter [Step 1 and 2 above]

  • Deliver the incoming EDI message [Comprises multiple business transaction] to EDI separator adapter. 
  • Split EDI message [Comprises multiple business transaction] into individual business transaction message.
  • No need to create any service interface in ESR. Use dummy interface.
  • No EDI to EDI XML conversion in this interface.
  • No mapping.

Interface 2: From EDI Receiver to backend system [Steps 3 and 5 above]

  • Process individual messages separated in interface 1.
  • Interface needs to be configured for each individual message and for each pair of sender and receiver.
  • EDI message converted in EDI XML format.
  • EDI XML message transformed to target message.

Interface 1 Configuration:

Sender Agreement:

/wp-content/uploads/2012/09/senderagree_141300.png

File Sender Communication Channel:

/wp-content/uploads/2012/09/2_141301.png

I’ll describe the reason to keep file name as ‘*ANSI*.*’ later in the blog.

 

Receiver determination: 

/wp-content/uploads/2012/09/3_141305.png

Interface determination:

No mapping in this interface.

/wp-content/uploads/2012/09/4_141306.png

Receiver Agreement:

/wp-content/uploads/2012/09/5_141307.png

EDISeparator Receiver communication channel:

Message Protocol is ANSI X12, since in example inbound EDI message contains ANSI X12 messages.

/wp-content/uploads/2012/09/6_141308.png

After processed through Separator interface EDI message split into individual EDI message. Here in our example incoming EDI message splitting into two messages – 810 and 850.

/wp-content/uploads/2012/09/7_141309.png/wp-content/uploads/2012/09/8_141310.png

Once message separated, adapter start searching sender communication channel for the particular business transaction and partners. In our example it will search for following sender communication channels

  • Transaction 810, Version 4010, Sender ID 1111, Receiver Id 2222
  • Transaction 850, Version 4010, Sender ID 3333, Receiver Id 4444

/wp-content/uploads/2012/09/9_141311.png

It is required to configure two interfaces to process these messages.

Interface 2 Configuration:

Here I have configured interface only for Transaction 810, Version 4010, Sender ID 1111, and Receiver Id 2222. Similarly it can be configured for other message.

Sender Agreement:

In ESR configure service interface using XSD of transaction 810 and Version 4010.

/wp-content/uploads/2012/09/10_141312.png

EDI Separator Sender Communication Channel:

EDISeparator sender Communication channel configured for Transaction 810, Version 4010, Sender ID 1111, and Receiver Id 2222.

/wp-content/uploads/2012/09/11_141313.png

Module X12ConverterModule configured in Module parameter of communication channel to convert EDI into EDI XML.

/wp-content/uploads/2012/09/12_141317.png

Receiver determination:

/wp-content/uploads/2012/09/13_141318.png

Interface determination:

In ESR mapping has to be developed to map EDI XML to Invoice IDoc.

/wp-content/uploads/2012/09/14_141319.png

Receiver Agreement:

/wp-content/uploads/2012/09/15_141323.png

I have not configured IDoc receiver channel, instead I am using file receiver channel to store invoice xml in file system.

/wp-content/uploads/2012/09/16_141324.png

In similar way interface can be configured for other separated message. Please find below the screenshot of the EDISeparator communication channel which I have configured in this scenario.

/wp-content/uploads/2012/09/17_141325.png

Execution:

/wp-content/uploads/2012/09/19_141330.png

You can see in the above screenshot, first message belong to the interface which split the messages and other two messages belongs to the 810 and 850 message processing.

Scenario 2:

In real-time scenarios it may possible that same EDI partner sends different formats of messages, say ANSI and EDIFACT. In that case we have to configure separate EDISeprator receiver communication channel in Interface 1 for EDIFACT message Foramt. Route the message based on content [message format] to the different receiver [EDIFACT or ANSI].

Since in interface1 EDI to EDI XML conversion not occurred, so inbound payload remains in raw EDI format [not in EDI XML], so it is not possible to add condition using XPATH in receiver determination. Possible solution from the discussion raised in SDN:

1) Use different communication channels on sender side. They may point to same input folder where you can provide different file names for EDIFACT and ANSI bulk messages respectively.

I have opted this solution in this example for simplicity and to maintain focus on the main objective.

2) Wait for new support package for B2B where SAP planning to provide this enhancement.

I believe from the planned enhancement there will be no need to configure message format in EDISeparator receiver.

3) Workaround:

a) Write a custom adapter module (to be used on sender side) which can read incoming message and create an XML message with root tag describing the message type (say EDIFACT or something) based on received bulk message. You need to add these XML tags after reading the headers of the incoming EDI messages. Add this custom module to your sender channel.

b) Add two different receivers to the same scenario. And provide condition based on value of XMl Tags you have added during your module development.

c) Now your message is routed in the right manner to the respective EDI Seperator receiver channel. Write another module (or enhance the same adapter module) which can remove these XML tags and convert the payload  back to plain EDI bulk message (which you received initially) and use this module in EDI Separator receiver channels.

Thanks for reading !!

Assigned Tags

      40 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Great work Rahul ! Very insightful blog.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks Ashish !!

      Author's profile photo Venkata Nageswara Rao Bandaru
      Venkata Nageswara Rao Bandaru

      Hi Rahul,

       

      Would request you to send ESR and ID part step by step please send us step by step documents edi to idoc/ifle.

       

      Thanks,

      Venkat.

      Author's profile photo Former Member
      Former Member

      Good work Rahul.

       

      Do we have separate converter modules for each stream like EDIFACT..etc as like as X12?

      Author's profile photo Former Member
      Former Member

      Hi,

       

      yes for EDIFACT exists the same localejbs/EDIFACTConverterModule - but i have an error

      when try to implement the same scenario:

      Error during processing local bean: localejbs/EDIFACTConverterModule

      while trying to invoke the method java.lang.String.equalsIgnoreCase(java.lang.String) of an object loaded from local variable 'status

      Author's profile photo Piyush Gakhar
      Piyush Gakhar

      Hi Ivan,

       

      Yes. It is known issue for wrt documentation and is already fixed. EDIFACT is not in caps letter. You have to use "localejbs/EdifactConverterModule"

       

      Regards,

      Piyush

      Author's profile photo Former Member
      Former Member

      Hi Piyush,

       

      thank you - it's works now !

       

      Regards,

      Ivan.

      Author's profile photo Gaurav Nautiyal
      Gaurav Nautiyal

      Hi Rahul,

      Just a quick question will it work the same way if file contains two 850 (Inbound purchase orders) for either same or diffrent partner .

       

      Thanks,

      Gaurav

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Gaurav,

      Yes scenario will work in same way.

       

      Regards

      Rahul

      Author's profile photo Gaurav Nautiyal
      Gaurav Nautiyal

      Hi Rahul,

      I tried to implement the same way for EDIFACT messages but my Sender EDI separator channel is failing with reason no Message type found or couldnot find messaeg type.

      Any idea or example for EDIFACT inbound processing or what values i need to fill under Filter or Sender Communication channel for EDI separator.

       

      Also any idea how to setup outbound messages from SAP to PI to point to two diffrent interfaces setup for 2 diffrent partners.

      Thansk,

      Gaurav

      Author's profile photo Gaurav Nautiyal
      Gaurav Nautiyal

      I did something and now able to see some progress in RWB , but now I am getting error

      "Message could not be forwarded to the JCA adapter. Reason: com.sap.aii.adapter.ediseparator.ra.integration.DispatchException: No senderchannel matches the Message type ORDERS, Message version number D, Message release number 96A, Interchange sender identification 1234, Interchange sender identification code qualifier , Interchange recipient identification 4321, Interchange recipient identification code qualifier"

       

      I am usinng below EDI header

      UNB+UNOA:2+1234+4321+100302:0402+1342++++1+EANCOM'

      UNH+1+ORDERS:D:96A:UN'

      BGM+220+P8218007+9'

      DTM+137:20100802:102'

       

      And have setup this in Sender EDI separator channel .

       

      Any idea , Please Help..

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Gaurav,

      It's look like you have not configured Sender EDI Separator channel correct. Provide parameters values, which you have configured in sender edi separator channel.

       

      - Rahul

      Author's profile photo Gaurav Nautiyal
      Gaurav Nautiyal

      Hi Rahul,I have setup Sender EDI separator channle with details as Message Type - ORDER, D, 96A, sender ID- 1234, Code Qual- All, Reciever ID- 4321, COde Qualf - ALL.

       

      Am I mising any PI seeting needed for EDI separator , I read in document some EDIFACT tables are there do I need to do anything with that.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      I believe you are referring to EDIXML to EDI convertor module. That is required to convert Business document in EDIXML format to EDI and vice versa.

      Please refer following blog and upload EDIFACT's tables.

      Author's profile photo Gaurav Nautiyal
      Gaurav Nautiyal

      Hi Rahul,

      I have setupped EDIFACT inbound scenario similar to yours , but after my EDI message is processed through EDI separator (which I see processed in MONI) my another receiver channel for EDI separator where I mention sender ID/Qualf , Receiver ID/Qualf is failing giving message " No communication channel is found for sender ID/Qul etc.." this error I can see in communication channel monitoring.

       

      Please suggest if you have tested EDIFACT inbound and its working, or if you have any idea of issue I am facing.

      Thanks..

      Author's profile photo Dimitri Sannen
      Dimitri Sannen

      Hi Gaurav,

       

      I'm also struggling with the inbound EDI scenario and I'm stuck in my B2B Integration Cockpit.

       

      I'm trying to load EDI and XML message into it, but without any success.

      In the meantime, I opened a thread: http://scn.sap.com/thread/3309007

      But no response yet. Looks all (too) new to me and no one really tested it.

       

      Kind regards,

      Dimitri

      Author's profile photo Gaurav Nautiyal
      Gaurav Nautiyal

      Hi Dimitri,

      Sorry I didn't updated thread but I have actually successfully resolved this.

      I have sucessfully implemented both EDIFACT and X12  (five inbound message types : ORDERS/ORDCHG/REQOTE/INVRPT/SLSRPT) messages.

       

      Let me know if you need any info and share yours email ID I can send you screenshots as how I have enabled also If I could be of any help, But I have based my implementation more or less on  Rahul's thread only with few tweaks..

      Take it easy..Thanks Gaurav...

      Author's profile photo Dimitri Sannen
      Dimitri Sannen

      Hi Gaurav,

       

      Can you send me screenshots of you B2B Integration Cockpit? Did you use it?

       

      You can send it to dimitri.sannen@thevaluechain.be

       

      Thanks a lot.

      Dimitri

      Author's profile photo Former Member
      Former Member

      Nice Blog Rahul

      Author's profile photo Ven A
      Ven A

      Hi Rahul,

       

      Thanks for the Blog, it is really helpful.

      I would like to understand what is the source structure that we are going to use to map with the idoc(target message).

      I am not really sure of this B2B, but if seeburger adapters are installed there will be pre loaded standard structures available on behalf of EDI ctsructure.

      Can you please let me know.

       

      Thanks.

      Author's profile photo Dimitri Sannen
      Dimitri Sannen

      Hi,

       

      Take the EDI content manager (within the B2B Integration Cockpit) and generate an XSD. Export it and use it into your ESR as source message.

       

      Kind regards,

      Dimitri

      Author's profile photo Ven A
      Ven A

      Thanks for the clarification Damitri.

      Author's profile photo Former Member
      Former Member

      Hi Experts,

       

      Am trying a other way scenario i.e EDI Outbound: Orders Response IDOC to ORDRSP96A Edifact file. in the EDI Separator Receiver channel from scenario - ORDERS05 IDOC to EDI Separator receiver channel am getting an error -

      Message could not be forwarded to the JCA adapter. Reason: Channel configuration error: Value with name rcv.handleplain not available.

       

      I have as well raised a thread -

      http://scn.sap.com/thread/3448809 detailing the issue.

      Wanted to check in this forum if any one have encountered such issue.

      I understand my question is not related to above thread but wanted to ask this here.

      Apologies for the inconvenience.

       

      Regards,

      Vish.

      Author's profile photo Former Member
      Former Member

      Hi,

      Nice blog, helped me in configuring Inbound EDI interface.

      We have a requirement to send 997 back.

      Please help me how to go about it.

       

      Thanks,

      Amol

      Author's profile photo Former Member
      Former Member

      Hi Rahul,

      Thanks so much for this blog. Very detailed and easy to follow.

      I tried creating the inbound EDI to IDoc scenario just like you described here.In the sender EDISeparator channel I added the X12ConverterModule. I m getting the error saying the configuration is missing for sender service EDI_Separator. But I have the integrated configuration activated for the same. 1 thing I noticed is if I take out the converter module from the sender ediseparator channel, this error is gone, and the message reaches the mapping, but fails in mapping since the XML conversion did not happen. Any ideas on why this is happening? Are we missing something in the B2B Addon install?

       

      Thanks a lot in advance!

      Anjana.

      Author's profile photo Ruchir .
      Ruchir .

      Hi Anjana,

       

      You need to associate the integrated scenario to control key. For this first you have to import the X12 B2B content. This can be done from the integration cockpit http://<host>:<port>/b2bic

      After the import is successful you need to go to the Control Key Scenario Association UI and associate the run time scenario with the control key.

       

      Add the module as before and execute the scenario.

       

       

      Thanks & regards,

      Ruchir

      Author's profile photo Former Member
      Former Member

      Hi Ruchir,

      Thanks for your help.

      I did the control key scenario association to the scenario, but still getting the same error. Not sure if I m missing something else.

      Thanks,

      Anjana.

      Author's profile photo Ruchir .
      Ruchir .

      Hi Anjana,

       

      If all the configurations are done and you are still getting the error then I need to see the error trace in order to tell the exact problem. Also, I would like to check the input payload which you are trying to send. If you don't want to put the payload on SCN then you can send it to me via mail (ruchir.sinha@sap.com).

       

      Regards,

      Ruchir

      Author's profile photo Ruchir .
      Ruchir .

      Hi Anjana,

       

      Could you check with the BASIS colleagues whether the B2B files for X12 are imported properly or not? If not please ask them to import and then define the scenario association.

       

      Regards,

      Ruchir

      Author's profile photo Saurabh Kumbhare
      Saurabh Kumbhare

      Hello Experts,

       

      I am configuring the scenario ( AS2 to EDISeparator and EDISeparator to IDOC ).

       

      Can you please help me with the error below which is from the either the EDISeparator Receiver channel or the EDISeparator Sender channle.

       

      09.06.2014 17:52:18.709 Information Message is encrypted with 1.3.14.3.2.7 algorithm
      09.06.2014 17:52:18.778 Information AS2 Message is signed with SHA1 (1.3.14.3.2.26) algorithm
      09.06.2014 17:52:18.779 Information AS2 Message message signature is validated, signer ID is X509CertSelector: [ Serial Number: 1624063516 Issuer: CN=Mendelson AS2 TEST,OU=Integration,O=Mendelson,L=Berlin,ST=Unknown,C=GE matchAllSubjectAltNames flag: true ]
      09.06.2014 17:52:18.784 Information AS2 document size is 350 Bytes
      09.06.2014 17:52:18.784 Information Payload charset converted from ISO-8859-15 to ISO-8859-15
      09.06.2014 17:52:18.785 Information B2B EdifactConverterModule : EDI format detected as EANCOM
      09.06.2014 17:52:18.785 Information B2B EdifactConverterModule: Message will be read as ISO-8859-1.
      09.06.2014 17:52:18.785 Information MP: processing local module localejbs/EdifactConverterModule
      09.06.2014 17:52:18.785 Information 0}: The module-paramteter "eancom.subversion.prefix" is not set. Using default value "false"
      09.06.2014 17:52:18.786 Information 0}: The module-paramteter "eancom..audit" is not set. Using default value "false"
      09.06.2014 17:52:18.791 Information MP: processing local module localejbs/CallSapAdapter
      09.06.2014 17:52:18.791 Information Application attempting to send an XI message asynchronously using connection AS2_http://sap.com/xi/XI/AS2
      09.06.2014 17:52:18.792 Information Trying to put the message into the send queue
      09.06.2014 17:52:18.831 Information Message successfully put into the queue
      09.06.2014 17:52:18.831 Information The application sent the message asynchronously using connection AS2_http://sap.com/xi/XI/AS2. Returning to application
      09.06.2014 17:52:18.836 Information MIC (DeJYUIusqQj6aaYRASdHhAo+4J0=) is calculated using SHA1 algorithm.
      09.06.2014 17:52:18.838 Information The message was successfully retrieved from the send queue
      09.06.2014 17:52:18.843 Information Message status set to DLNG
      09.06.2014 17:52:18.845 Information MDN is succcessfully signed with SHA1 (1.3.14.3.2.26) algorithm
      09.06.2014 17:52:18.859 Information Trying to put the message into the send queue
      09.06.2014 17:52:18.912 Information Message successfully put into the queue
      09.06.2014 17:52:18.913 Information The message was successfully retrieved from the send queue
      09.06.2014 17:52:18.918 Information Message status set to DLNG
      09.06.2014 17:52:18.961 Information Trying to put the message into the send queue
      09.06.2014 17:52:19.001 Information Message successfully put into the queue
      09.06.2014 17:52:19.001 Information The message was successfully retrieved from the send queue
      09.06.2014 17:52:19.006 Error MP: exception caught with message No configuration / default adapter specified for EDISeparator
      09.06.2014 17:52:19.006 Information Delivering to channel: B2BSE00002_O2C_ORDERS_VANS_PO_WRITE_EDISeparator
      09.06.2014 17:52:19.006 Information Message status set to DLNG
      09.06.2014 17:52:19.009 Error Exception caught by adapter framework: No configuration / default adapter specified for EDISeparator
      09.06.2014 17:52:19.010 Error Transmitting the message to endpoint <local> using connection AS2_http://sap.com/xi/XI/AS2 failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.Exception: No configuration / default adapter specified for EDISeparator
      09.06.2014 17:52:19.015 Information The asynchronous message was successfully scheduled to be delivered at Mon Jun 09 17:57:19 CEST 2014
      09.06.2014 17:52:19.015 Information Message status set to WAIT
      Author's profile photo Dimitri Sannen
      Dimitri Sannen

      Dear,

       

      Please open a separate thread with your question. The space here is getting too narrow.

      Also, other people facing the same issue can find back the answer easily.

       

      Thank you.

      Dimitri

      Author's profile photo Saurabh Kumbhare
      Saurabh Kumbhare

      Hi Dimitri,

       

      Moved it to another forum.

       

      Thanks

      Saurabh.

      Author's profile photo Former Member
      Former Member

      Hi Rahul,,

      having a quick question since we are not doing EDI to XML conversion in Adapter, so how we translate the data to Idoc, do we do using PI graphical mapping(if yes how?) or and other add-on mapping?

      Thanks,

      Sud..

      Author's profile photo Rahul Yadav
      Rahul Yadav

      Hi Sudeep,

       

      In B2B Mapping Toolkit, some standard mappings are available for idoc to EDI and vice-versa. If it is not available for you then export the EDI format as xsd and import as External Definition in ESR for mapping to target/ Sender Idoc.

       

      Regards,

      Rahul

      Author's profile photo Pradeep Bawlia
      Pradeep Bawlia

      Really a good blog, thanks

      Author's profile photo Otto Frost
      Otto Frost

      Thanks for a great blog Rahul.

       

      I think I miss something obvious?

       

      When converting EDI2XML or XML2EDI how does the adapter modules know which "Control Key" in the "B2B Integration Cockpit" - "EDI Content Manager" to use?

       

      I have had to copy some messages and add some extra segments. My copied message has ControlKey=TEST while standard from sap has ControlKey=SAP.

       

      I don't want TPM.

       

      Regards
      /Otto

      Author's profile photo Rahul Yadav
      Rahul Yadav

      Hi Otto,

       

      You can fill the entries in B2B_CTRL_IF table or Control Key Scenario Association under Editor, to identify your interface.

      Below is the screenshot.

       

       

      Below are the entries that you can fill for your interface.

      1. Sender Party

      2. Sender Service

      3. Receiver Party

      4. Receiver Service

      5. Interface Name (For your interface Receiver/Sender) where you are doing conversion)

      6. Interface Namespace (For your interface Receiver/Sender) where you are doing conversion)

       

      This will pick the corresponding control key once the parameter matches else uses default control key with .*.

       

      Regards,

      Rahul

      Author's profile photo NARSAIAH THOTTEMPUDI
      NARSAIAH THOTTEMPUDI

      Hi Former Member,

      I have a small question like if Incoming EDI message comprises of only one message(In my case  I got only 823 message) then can we use same EDISeperator adapter or can use file adapter with FCC parameters.

      Can any one help me how to achieve in case of single EDI message and I got EDI 823 message as a file.

      Thank you,

      Narasaiah T

      Author's profile photo Taranpreet Kaur
      Taranpreet Kaur

      Hi Experts,

       

      We have similar requirement, any pointers in this direction will be helpful.

      Author's profile photo Taranpreet Kaur
      Taranpreet Kaur

      HI Experts,

       

      My scenario is inbound processing required for EDI 823 files sent by vendor.... Do I simply need to create SFTP sender and IDOC receiver or I must create EDISeparator Sender and EDISeparator Receiver first

      Please suggest