cancel
Showing results for 
Search instead for 
Did you mean: 

XI and XML format

Former Member
0 Kudos

Our integrator is stating that SAP XI cannot accept inbound xml documents which contains elements containing dashes, or hyphens. Hyphens/Dashes are permitted in the xml standard.

Can someone confirm this.

Much obliged.

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi David,

this not such a big problem

Hyphens/Dashes are nor permitted in the xml standard, the XML is wellformed with that!

Only the SAP XI protokoll does not accept the hyphens/dashes, that means, you cant define them for datatypes. But (!): XML messages are not checked to their interfaces during runtime, that means, you can use a dummy with just one field for outbound-IF. The only restriction is than, that you cant use a message mapping.

There are two possibilies for you:

You work with an (additional) XSLT. There you have to map each field like:

<myNewField><xsl:value-of select="//myOld-Field"/></myNewField>

or you put a ABAP mapping in front of the real mapping:

Change the input to string (FM ECATT_CONV_XSTRING_TO_STRING) and the output to XSTRING (FM ECATT_CONV_STRING_TO_XSTRING). Inside substitute '-' to '_' with ABAP order REPLACE if it is anywhere between '<' and '>' (not the first line) to get XML of XI protocol. You can use the same ABAP mapping for all mappings!

Regards,

Udo

Answers (1)

Answers (1)

Former Member
0 Kudos

it can accept hyphens and dashes,just change the file type to Binary and/or change the encoding to ISO-8859-1

thanx

ahmad

Former Member
0 Kudos

Clarification, we have an xml element which contains a dash, i.e.

<Account-Name>. Given this we are thinking that our corresponding XI Datatype must also be named the same and contain a dash. However, the XI datatype field may not contain a dash.

Then the question for us seems to be how to map xml elements which contain hyphens into SAP XI.

Thanks.

Former Member
0 Kudos

Hey

yeah,you can't have dash(-) in the XML tag,and since the XI data tags must exactly be similar to the incoming XML,you need to change the incoming XML.

one wat around can be to do a bypass scenario,but that only works if there is no complex mapping and you are simply transferring files from one place to another.

if you can please let us know the interfaces,we should be able to help you out more

thanx

Ahmad

Former Member
0 Kudos

Thanks. What does complex mapping mean?

Most of our mapping is similar to: external system Account to SAP Business Partner 1:1 field mappings. Would this type of data transfer be a good candidate for the 'bypass' technique you mention. If so how to implement in general?

Thanks. again.

-Dave D.

Former Member
0 Kudos

yes,if you have simple 1-1 mapping then you can go for bypass scenario.

in this there is no need to create any data type or message type or message mapping at all.infact you dont do anything in Integration repository,you only need to do configurations in ID.

have a look at the following

/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository

thanx

Ahmad