<?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 Re: Optional XML fields in Simple transformations (ST) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/optional-xml-fields-in-simple-transformations-st/m-p/7074288#M1505058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack, please find some sample coding below that will solve your issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;tt:cond check="not-initial(ref('E1EDL20.INCO1'))"&amp;gt;
  &amp;lt;INCO1 tt:value-ref="E1EDL20.INCO1"/&amp;gt;
&amp;lt;/tt:cond&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the simple transformation tt cond statment you can make an XML tag optional. In below example during deserialisation xml tag &amp;lt;INCO1&amp;gt; will be skipped when not availabke in the xml and SAP data E1EDL20.INCO1 will not be filled by the transformation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards. Please give points when usefull !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jul 2010 11:21:42 GMT</pubDate>
    <dc:creator>JackGraus</dc:creator>
    <dc:date>2010-07-22T11:21:42Z</dc:date>
    <item>
      <title>Optional XML fields in Simple transformations (ST)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optional-xml-fields-in-simple-transformations-st/m-p/7074287#M1505057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am using Simple Transformation (ST) to convert an XML file into ABAP data. In my XML file some XML tags are optional: sometimes they are available in the file, sometimes they are not. I can not find out how to define a ST for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either the XML fields are in the ST definition and then these field should also be in the XML file or &lt;/P&gt;&lt;P&gt;the XML fields are not in the ST definition and then these fields are not allowed in the XML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 15:57:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optional-xml-fields-in-simple-transformations-st/m-p/7074287#M1505057</guid>
      <dc:creator>JackGraus</dc:creator>
      <dc:date>2010-07-12T15:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Optional XML fields in Simple transformations (ST)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optional-xml-fields-in-simple-transformations-st/m-p/7074288#M1505058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack, please find some sample coding below that will solve your issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;tt:cond check="not-initial(ref('E1EDL20.INCO1'))"&amp;gt;
  &amp;lt;INCO1 tt:value-ref="E1EDL20.INCO1"/&amp;gt;
&amp;lt;/tt:cond&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the simple transformation tt cond statment you can make an XML tag optional. In below example during deserialisation xml tag &amp;lt;INCO1&amp;gt; will be skipped when not availabke in the xml and SAP data E1EDL20.INCO1 will not be filled by the transformation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards. Please give points when usefull !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 11:21:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optional-xml-fields-in-simple-transformations-st/m-p/7074288#M1505058</guid>
      <dc:creator>JackGraus</dc:creator>
      <dc:date>2010-07-22T11:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Optional XML fields in Simple transformations (ST)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optional-xml-fields-in-simple-transformations-st/m-p/7074289#M1505059</link>
      <description>&lt;P&gt;Hi J. Graus,&lt;/P&gt;&lt;P&gt;i have similar requirement (using multiple XML's) to update deep structures in abap.&lt;/P&gt;&lt;P&gt;ST logic would be as below:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1821859-tag1-st.png" /&gt;&lt;/P&gt;&lt;P&gt;i tried above given code but no luck.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1821858-tag-st.png" /&gt;&lt;/P&gt;&lt;P&gt;please advise. &lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Buddha&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jun 2020 10:03:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optional-xml-fields-in-simple-transformations-st/m-p/7074289#M1505059</guid>
      <dc:creator>former_member658995</dc:creator>
      <dc:date>2020-06-27T10:03:10Z</dc:date>
    </item>
  </channel>
</rss>

