<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Simple Transformation - complicated XML in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-complicated-xml/m-p/11142455#M1906278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to deserialize XML from attachment using Simple Transformation and I've got many questions about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How should I handle the header:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;lt;Documents xmlns:xsi="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;" xsi:noNamespaceSchemaLocation="Invoice.xsd"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Document Version="1.0" Name="XML Invoice" Type="Invoice" DocumentReference="" ImageReference="" CertificateReference=""&amp;gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It should be inserted just like that in ST (Simple Transformation) or should it be parsed to some structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. What to do with fields having attributes instead of elements:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&amp;lt;Field Name="Waluta" Type="invoicecurrency"&amp;gt;EUR&amp;lt;/Field&amp;gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;3. Should I create structures for all levels or can I skip header and "System" and "ProcessLog" from the end of file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd be very grateful for every answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jun 2015 11:15:52 GMT</pubDate>
    <dc:creator>former_member246634</dc:creator>
    <dc:date>2015-06-29T11:15:52Z</dc:date>
    <item>
      <title>Simple Transformation - complicated XML</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-complicated-xml/m-p/11142455#M1906278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to deserialize XML from attachment using Simple Transformation and I've got many questions about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How should I handle the header:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;lt;Documents xmlns:xsi="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;" xsi:noNamespaceSchemaLocation="Invoice.xsd"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Document Version="1.0" Name="XML Invoice" Type="Invoice" DocumentReference="" ImageReference="" CertificateReference=""&amp;gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It should be inserted just like that in ST (Simple Transformation) or should it be parsed to some structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. What to do with fields having attributes instead of elements:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&amp;lt;Field Name="Waluta" Type="invoicecurrency"&amp;gt;EUR&amp;lt;/Field&amp;gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;3. Should I create structures for all levels or can I skip header and "System" and "ProcessLog" from the end of file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd be very grateful for every answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 11:15:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-complicated-xml/m-p/11142455#M1906278</guid>
      <dc:creator>former_member246634</dc:creator>
      <dc:date>2015-06-29T11:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation - complicated XML</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-complicated-xml/m-p/11142456#M1906279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your structure should for which you are gonna create the Simple transformation should be at the "documents" level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it should be something:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;STRONG&gt;ZDOCS (structure)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;... ZDOC (structure)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;... ... ZINVOICE&amp;nbsp; (structure)&lt;/P&gt;
&lt;P&gt;... ... ... ZSUPPLIER&amp;nbsp; (structure) - with all fields&lt;/P&gt;
&lt;P&gt;... ... ... ZBUYER (structure)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;... ... ... ZFIELDS (table type)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;... ... ... ... ZFIELD (structure) - with FLD_NAME and FLD_VALUE fields&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;... ... ... ZTABLES (table Type)&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To map the field name and the value of the FIELDS, you need to refer to the attributes of the ZFIELD in the transformation. Something similar to this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Fields&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tt:loop ref="FIELDS"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tt:attribute name="Name" value-ref="FLD_NAME" /&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tt:value ref="FLD_VALUE" /&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Field&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tt:loop&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Fields&amp;gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 18:56:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-complicated-xml/m-p/11142456#M1906279</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2015-06-29T18:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation - complicated XML</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-complicated-xml/m-p/11142457#M1906280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bartlomiej,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your structure can be like below.. You can handle the array table and variable fields separately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the screenshot below for table and individual fields. If this is similar to your requirement you can check the link below for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/736047" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapyard.com/lets-web-dynpro-part-zz/" title="http://www.sapyard.com/lets-web-dynpro-part-zz/"&gt;Let’s Web Dynpro. Part ZZ | SAP Yard&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 02:42:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-complicated-xml/m-p/11142457#M1906280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-30T02:42:44Z</dc:date>
    </item>
  </channel>
</rss>

