cancel
Showing results for 
Search instead for 
Did you mean: 

XI - Receiver Determination Condition not working

Former Member
0 Kudos

I created a Condition on my Receiver Determination to stop some messages from being sent based on a field in our message.

It works when using some test tools (workbench, SOAPUI, etc) but not when coming from our MDM system. The beginning of the input message looks like what is listed at the bottom of this message(and it works).

But when coming from MDM the one node looks like this - there is no colon ( after the xmlns.

<YMDMB_CREMDM xmlns='http://intel.com/MDM/BUPA/Vendor'

without the colon ( the condition does not work; with the colon it does work.

the sending system is not able to add the colon.

Does anyone know why the colon matters and what we can do to get around it in XI ??

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Receiver Grouping -->

<YMDMB_CREMDM xmlns:='http://intel.com/MDM/BUPA/Vendor' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>

<IDOC BEGIN='1.0' xmlns=''>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Stefan - thanks for the info

one question - does this line need to be included somewhere ?

ns='http://intel.com/MDM/BUPA/Vendor'

if not, how does it know what ns is equal to ?

thanks

former_member206604
Active Contributor
0 Kudos

Hi,

When you define the condition in the condition editor you would go and select the field to generate the XPATH. You can find something called "p1: ". Please substitute with what Stefan has given.

Thanks,

Prakash

stefan_grube
Active Contributor
0 Kudos

Yes. Beyond the XPATh line there is space for entering namespaces.

http://help.sap.com/saphelp_nw04/helpdata/en/67/49767669963545a071a190b77a9a23/frameset.htm

"Lower screen area

If the element in the message that you want to access is qualified by a namespace, you must give the namespace a prefix. The prefix is then used as an abbreviation of the namespace in XPath expressions. ... "

Answers (5)

Answers (5)

Former Member
0 Kudos

Prakash & Stefan :

thanks - I think this might have solved it - I need to do some more testing tomorrow. once I verify everything is working I will give you more points and marked this SOLVED.

thanks

stefan_grube
Active Contributor
0 Kudos

When you put a colon to the declaration without a prefix, this is not defined in:

http://www.w3.org/TR/xml-names/

So it works accidentally.

Regards

Stefan

Former Member
0 Kudos

below is the beginning of the XSD from the IDOC (it is custom but based on a SAP one - just added a few fields)

I also put the start of the input message below that.

also to make sure I was clear, if all we do is change this node of the input message by adding a colon after the xmlns everything works.

<YMDMB_CREMDM xmlns='http://intel.com/MDM/BUPA/Vendor'

thanks

begging of XSD from IDOC

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="YMDMB_CREMDM">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="IDOC" type="YCREMDM.YMDMB_CREMDM" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:complexType name="YMDMB_CREMDM.E1BPADTTX">

here is beginning of input message

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Receiver Grouping -->

<YMDMB_CREMDM xmlns='http://intel.com/MDM/BUPA/Vendor' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>

<IDOC BEGIN='1.0' xmlns=''>

Former Member
0 Kudos

Prakash:

Thanks for replying -

we don't have a colon in the condition - here is what we have (it works if the colon is added to the input msg)

(/YMDMB_CREMDM/IDOC/E1LFA1M/Z1BLOCKDATES/PURCHASING_BLOCK_DATE = '00000000')

I am not sure what you mean by

source structure XSD and correct it without Colon

our input message is based on an IDOC - there is no colon in the schema.

thanks

former_member206604
Active Contributor
0 Kudos

Try creating a context object and see if that works. Also please validate the XML against schema which can be found in the IR. It seems to be a custom IDOC can you please post at least the first few lines of the XSD of the imported IDOC.

Thanks,

Prakash

stefan_grube
Active Contributor
0 Kudos

> /YMDMB_CREMDM/IDOC/E1LFA1M/Z1BLOCKDATES/PURCHASING_BLOCK_DATE = '00000000'

The condition should be:

/ns:YMDMB_CREMDM/IDOC/E1LFA1M/Z1BLOCKDATES/PURCHASING_BLOCK_DATE = '00000000'

ns='http://intel.com/MDM/BUPA/Vendor'

A namespace is part of the node name and cannot be omitted. It is no difference whether a prefix is part of the namespace declaration or not.

Regards

Stefan

former_member206604
Active Contributor
0 Kudos

Hi,

While creating the condition please do not use Colon ":". Also check the source structure XSD and correct it without Colon ":".

Thanks,

Prakash