on 10-10-2008 1:52 PM
For now I have:
<?xml version="1.0" encoding="UTF-8"?>
<EPERSON filename="20081010142234">
<CONTEXTPERSON>
...
</CONTEXTPERSON>
<CONTEXTPERSON>
...
</CONTEXTPERSON>
</EPERSON>
and I need (requisite for the external system):
<?xml version="1.0" encoding="UTF-8"?>
<EPERSON filename="20081010142234" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage">
<CONTEXTPERSON>
...
</CONTEXTPERSON>
<CONTEXTPERSON>
...
</CONTEXTPERSON>
</EPERSON>
This has been done using a ExternalDefinition and importing the XSD the external application provides.
Previously I reached to have:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:EPERSON filename="20081010142234" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance">
<CONTEXTPERSON>
...
</CONTEXTPERSON>
<CONTEXTPERSON>
...
</CONTEXTPERSON>
</ns0:EPERSON>
Any suggestions ? Hard coding the "xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage"" in the mapping would also be ok for me if you have any advise in that direction.
cheers,
greg
Hi Gregorio,
very easy would be a XSL mapping. You just type in the static part and add the dynamic attribut filename:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<EPERSON xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage">
<xsl:attribute name="filename"><xsl:value-of select="//EPERSON/@filename"/></xsl:attribute>
</EPERSON>
</xsl:template>
</xsl:stylesheet>
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are several tools for XSLT mapping :
http://www.altova.com/videos.asp?type=0&video=xmlmapping
Here you will get the trial version of Stylus Studio.
http://www.stylusstudio.com/xml_download.html
Check the Link:
As I know already which fields in the IDOC I need for every field in my target, maybe it would be easier to do it by hand, here is an example of target file:
<?xml version="1.0" encoding="iso-8859-1" ?>
<EPERSON filename="contextperson_000002.xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage">
<CONTEXTPERSON>
<PERSON action="update">
<TITLE>M</TITLE>
<FIRSTNAME>John</FIRSTNAME>
<NAME>Smith</NAME>
<BIRTHDATE>06.02.1973</BIRTHDATE>
<ADDRESS1>rue du stade</ADDRESS1>
<ADDRESS2>c/o Jean-pierre</ADDRESS2>
<POSTALCODE>CH-1234</POSTALCODE>
<CITY>Geneve</CITY>
<COUNTRYID>CH</COUNTRYID>
<CATEGORY>Standard</CATEGORY>
<CREATIONDATE>01.01.2000 09:00:00</CREATIONDATE>
</PERSON>
<MISCFIELD>
<MISCFIELDTYPE>PERSN</MISCFIELDTYPE>
<MISCFIELDVALUE>01000123</MISCFIELDVALUE>
</MISCFIELD>
<CONTACT>
<CONTACTTYPE>E-mail</CONTACTTYPE>
<CONTACTVALUE>john.smith_AT_example.com</CONTACTVALUE>
</CONTACT>
</CONTEXTPERSON>
</EPERSON>
I have to create a CONTEXTPERSON for every E1PLOGI that is in the HRMD_A07 IDOC.
Any tip for starting ? like how to get the HRMD_A07->E1PLOGI->E1PITYP->E1P0002-NACHN for the Name field ? The rest would be most like that one
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.