on 03-14-2014 11:53 AM
Hi Experts ,
we have one requirement where in the legacy system ( Sender system) is sending .xml file and PI needs to pick the file and send it to ECC Via IDOC AAE Receiver Adapter to R/3 (SAP ECC) System .
The problem is the .xml file which PI receives is in a different format which is shown below
</tns:Header>
<tns:Body>
<esa:Payload>
<esa:Header>
<PayloadName></PayloadName>
<PayloadVersion>1.0</PayloadVersion>
<PayloadCreated>2014-01-07T02:39:55.793Z</PayloadCreated>
<PayloadSize units="Bytes">432</PayloadSize>
</esa:Header>
<esa:Data>
<zcs:HUM xmlns:zcs="com.">
<Hum_Number>00393155965135748871</Hum_Number>
<Source_Storage_Location>9000</Source_Storage_Location>
<Destination_Storage_Location>0100</Destination_Storage_Location>
<Material_Number>000000000000004123</Material_Number>
<Batch_Number>321940071 </Batch_Number>
<Quantity>0000000096000</Quantity>
<Production_Version>A100</Production_Version>
<Hostname>POSPI000003</Hostname>
</zcs:HUM>
</esa:Data>
</esa:Payload>
</tns:Body>
need help to convert this .xml into PI Standard xml format ( i mean without esa,zcs, ..So that at PI the message gets passed successfully without throwing xml parser issue or xml well not formed error .) .
do i need to write any java code for this ?
Please experts needs your suggestions here .
regards,
khan ,
Hi Aziz,
How is the XML arriving to PI, via File adapter or via SOAP adapter?
If the file is arriving via SOAP adapter you can select Use No SOAP Envelope and extract the payload with an XSL in the first mapping.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have been facing the same issue.
Sample Incoming XML file is in the below mentioned Format :
<IsNotice dt:dt="ui1">1</IsNotice>
<Op dt:dt="i4">2</Op>
<WkStn dt:dt="i4">1</WkStn>
<Tran dt:dt="i4">40</Tran>
The file is coming to SAP PI via File Adapter.
What can be done in this case to convert the file to SAP PI Soap xml.
Can we use a normal message mapping here or do we need to go for XSLT only ?
Regards,
Nitin Balodhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aziz:
XSL, to get the esa:payload tag:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="./child::*/child::*">
<xsl:copy-of select="*"/>
</xsl:template>
</xsl:stylesheet>
You can notice that it's getting all the children of the children of the root tag.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Inaki,
I have configured Data Type , Message Type , SI , MM and then in OM trying to use the xsl Provided above for transformation of prefixes . But it throws error when i directly paste the .xml file in OM and trying to trigger . Error Below
"Unable to display tree view; Error when parsing an XML document (The prefix "tns" for element "tns:Body" is not bound.)"
Do i need to follow the same process or do i need to use External Definition as my source structure . in order to use the xsl at first mapping ?
please advice .
Regards,
Khan
Hi,
Use this template in an XSLT mapping to get rid of prefixes:
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@* | node()"/>
</xsl:element>
</xsl:template>
Best regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Inaki
Can you pls help me with some silly doubts
1. when the file is being sent from sender side, than always I have use file adapter, why soap here?
2. what process/steps needs to be done to make XSLT work before message mapping?
3. I know the use of NO SOAP Envelope , but in this case sine we are using XSLT mapping , what is the significance of use" NO SOAP Envelope "
Thanks
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.