Quantcast
Viewing latest article 15
Browse Latest Browse All 100

EDI Separator XML: Xpath Queries for EDI Separator Sender Channels

Usually I face edifact, eancom, ansi x.12 messages in my edi integration projects. XML message interfaces like OpenTrans appear from time to time. However, these XML message interfaces were always used in a direct integration omitting the SAP b2b addon.

EDI Separator Adapter is able to handle XML messages – and it is able to use Xpath queries, too. Image may be NSFW.
Clik here to view.

In this blog I will show you some examples, how to use the edi separator adapter for routing xml messages without large receiver determinations or receiver splits.

 

 

Image may be NSFW.
Clik here to view.

 

Example

 

Let's say for example you have the following substructure in our xml message...

 

<Partner>

     <Partnertype>Buyer</Partnertype>

     <Partner_Id>0000020518</Partner_Id>

</Partner>

<Partner>

     <Partnertype>ShipTo</Partnertype>

     <Partner_Id>0000020519</Partner_Id>

</Partner>

 

and you would like to route the xml messages according to the specific buyers Partner_Id. An expression like

 

(/MyXML/Main/Header/Delivery/Partner/Partner_Id = '0000020518') AND (/MyXML/Main/Header/Delivery/Partner/Partnertype = 'Buyer')

 

will not work for you. You need to use

 

/MyXML/Main/Header/Delivery/Partner[(PartnerType = 'Buyer' and Partner_Id = '0000020518')] EX

 

In the swing tool environment, it looks like this:

Image may be NSFW.
Clik here to view.

 

In cases you would like to send all messages for this partner - not just one type like delivery messages, but invoices, order responses also, within one listening edi separator sender channel, you can use the following expression:

 

*/Partner[(PartnerType = 'Buyer' and Partner_Id = '0000020518')] EX

 

Image may be NSFW.
Clik here to view.

 

Other xpath expressions widely used in SAP PI/PO will work, too.

 

Prerequisites

The edi separator receiver channel needs an active check box 'Enable XML'

Image may be NSFW.
Clik here to view.

 

and secondly, if you have an UTF-8 encoding within your XML files:

 

Set the following parameters in the Advanced Mode:

 

edi.recv.input.encoding     UTF-8

 

Image may be NSFW.
Clik here to view.

This is important to keep your codepage as UTF-8.

 

Limitations

 

Image may be NSFW.
Clik here to view.

For large XML files the edi separator sender channels will take quite long for fetching their messages. E.g. in my projects 10 MB large XML files took 3 to  5 seconds to route. A 50 MB large XML file took 20 seconds. It seems that the processing time will grow exponentially depending on size of the XML message and the number of the XML sender channels within the SAP PO system.


Viewing latest article 15
Browse Latest Browse All 100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>