Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

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)

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:

File Sender Communication Channel:

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

 

Receiver determination: 

Interface determination:

No mapping in this interface.

Receiver Agreement:

EDISeparator Receiver communication channel:

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

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.

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

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.

EDI Separator Sender Communication Channel:

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

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

Receiver determination:

Interface determination:

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

Receiver Agreement:

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

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.

Execution:

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 !!

40 Comments
Former Member
0 Kudos

Great work Rahul ! Very insightful blog.

Former Member
0 Kudos

Thanks Ashish !!

Former Member
0 Kudos

Good work Rahul.

 

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

Former Member
0 Kudos

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

piyush_gakhar
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

Hi Piyush,

 

thank you - it's works now !

 

Regards,

Ivan.

0 Kudos

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

Former Member
0 Kudos

Hi Gaurav,

Yes scenario will work in same way.

 

Regards

Rahul

0 Kudos

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

0 Kudos

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..

Former Member
0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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..

Dimitri
Active Contributor
0 Kudos

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

0 Kudos

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...

Dimitri
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Nice Blog Rahul

former_member193466
Participant
0 Kudos

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.

Dimitri
Active Contributor
0 Kudos

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

former_member193466
Participant
0 Kudos

Thanks for the clarification Damitri.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

ruchir_sinha
Participant
0 Kudos

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

Former Member
0 Kudos

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.

ruchir_sinha
Participant
0 Kudos

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

ruchir_sinha
Participant
0 Kudos

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

saurabhkumbhare
Active Participant
0 Kudos

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.709InformationMessage is encrypted with 1.3.14.3.2.7 algorithm
09.06.2014 17:52:18.778InformationAS2 Message is signed with SHA1 (1.3.14.3.2.26) algorithm
09.06.2014 17:52:18.779InformationAS2 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.784InformationAS2 document size is 350 Bytes
09.06.2014 17:52:18.784InformationPayload charset converted from ISO-8859-15 to ISO-8859-15
09.06.2014 17:52:18.785InformationB2B EdifactConverterModule : EDI format detected as EANCOM
09.06.2014 17:52:18.785InformationB2B EdifactConverterModule: Message will be read as ISO-8859-1.
09.06.2014 17:52:18.785InformationMP: processing local module localejbs/EdifactConverterModule
09.06.2014 17:52:18.785Information0}: The module-paramteter "eancom.subversion.prefix" is not set. Using default value "false"
09.06.2014 17:52:18.786Information0}: The module-paramteter "eancom..audit" is not set. Using default value "false"
09.06.2014 17:52:18.791InformationMP: processing local module localejbs/CallSapAdapter
09.06.2014 17:52:18.791InformationApplication attempting to send an XI message asynchronously using connection AS2_http://sap.com/xi/XI/AS2
09.06.2014 17:52:18.792InformationTrying to put the message into the send queue
09.06.2014 17:52:18.831InformationMessage successfully put into the queue
09.06.2014 17:52:18.831InformationThe application sent the message asynchronously using connection AS2_http://sap.com/xi/XI/AS2. Returning to application
09.06.2014 17:52:18.836InformationMIC (DeJYUIusqQj6aaYRASdHhAo+4J0=) is calculated using SHA1 algorithm.
09.06.2014 17:52:18.838InformationThe message was successfully retrieved from the send queue
09.06.2014 17:52:18.843InformationMessage status set to DLNG
09.06.2014 17:52:18.845InformationMDN is succcessfully signed with SHA1 (1.3.14.3.2.26) algorithm
09.06.2014 17:52:18.859InformationTrying to put the message into the send queue
09.06.2014 17:52:18.912InformationMessage successfully put into the queue
09.06.2014 17:52:18.913InformationThe message was successfully retrieved from the send queue
09.06.2014 17:52:18.918InformationMessage status set to DLNG
09.06.2014 17:52:18.961InformationTrying to put the message into the send queue
09.06.2014 17:52:19.001InformationMessage successfully put into the queue
09.06.2014 17:52:19.001InformationThe message was successfully retrieved from the send queue
09.06.2014 17:52:19.006ErrorMP: exception caught with message No configuration / default adapter specified for EDISeparator
09.06.2014 17:52:19.006InformationDelivering to channel: B2BSE00002_O2C_ORDERS_VANS_PO_WRITE_EDISeparator
09.06.2014 17:52:19.006InformationMessage status set to DLNG
09.06.2014 17:52:19.009ErrorException caught by adapter framework: No configuration / default adapter specified for EDISeparator
09.06.2014 17:52:19.010ErrorTransmitting 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.015InformationThe asynchronous message was successfully scheduled to be delivered at Mon Jun 09 17:57:19 CEST 2014
09.06.2014 17:52:19.015InformationMessage status set to WAIT
Dimitri
Active Contributor
0 Kudos

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

saurabhkumbhare
Active Participant
0 Kudos

Hi Dimitri,

 

Moved it to another forum.

 

Thanks

Saurabh.

0 Kudos

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.

Former Member
0 Kudos

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..

0 Kudos

Really a good blog, thanks

former_member183249
Active Participant
0 Kudos

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

otto_frost4
Participant
0 Kudos

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

former_member183249
Active Participant
0 Kudos

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

former_member197830
Participant
0 Kudos
Hi tapan.singh,

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
former_member499364
Participant
0 Kudos
Hi Experts,

 

We have similar requirement, any pointers in this direction will be helpful.
former_member499364
Participant
0 Kudos
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
Labels in this area