<?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: Creating XML file Using Call Transformation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230110#M1629138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thanks much for the reply. Greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have implemented the same condition checking for my date type fields but still getting empty tags like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;date/&amp;gt;. So I am still checking how to discard these empty tags from my XML file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Swarna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2011 20:41:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-04T20:41:16Z</dc:date>
    <item>
      <title>Creating XML file Using Call Transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230108#M1629136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I have searched before posting thread, couldnt find anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I am creating an XML file using Call Transformation. My internal table has 3 date fields and some other fields.  For some records I dont have values for the date fields. In that case my XML file is giving the date value as 0000-00-00 since I declared it as Date type.  This value 0000-00-00  is not accepted by the middle ware as the valid date.  I can not change it as String type as per the suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case I am advised to skip printing the date field tag if it doesnt have value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Is there any way to skip the date field if it is empty. Any Suggestions please ?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 16:45:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230108#M1629136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T16:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML file Using Call Transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230109#M1629137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had exactly the same problem before. When you call a transformation there is an option called initial_components. According to SAP if you use initial_components = 'SUPRESS' the empty fields should not being generated on the XML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, this &lt;STRONG&gt;didn't work&lt;/STRONG&gt; for me and I have seen some people with the same problem. Here is how I solved this (maybe not the best way but it worked):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First: My fields are all CHAR in my table&lt;/P&gt;&lt;P&gt;Second: In the transformation, you can use conditional transformation to not display a tag if field is empty, here a piece of my transformation (I am using simple transformations):&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
   &amp;lt;tt:root name="ROOT"/&amp;gt;
...
...
     &amp;lt;tt:cond s-check="not-initial(ref('ROOT.L1_NM')) or not-initial(ref('ROOT.L2_NM'))"&amp;gt;
          &amp;lt;TRNMTR_NM&amp;gt;
            &amp;lt;tt:cond s-check="not-initial(ref('ROOT.L1_NM'))"&amp;gt;
              &amp;lt;l1_nm&amp;gt;
                &amp;lt;tt:value ref="ROOT.L1_NM"/&amp;gt;
              &amp;lt;/l1_nm&amp;gt;
            &amp;lt;/tt:cond&amp;gt;
            &amp;lt;tt:cond s-check="not-initial(ref('ROOT.L2_NM'))"&amp;gt;
              &amp;lt;l2_nm&amp;gt;
                &amp;lt;tt:value ref="ROOT.L2_NM"/&amp;gt;
              &amp;lt;/l2_nm&amp;gt;
            &amp;lt;/tt:cond&amp;gt;
          &amp;lt;/TRNMTR_NM&amp;gt;
        &amp;lt;/tt:cond&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, I first check if the fields have values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: carlosrv on Oct 4, 2011 8:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 18:21:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230109#M1629137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T18:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML file Using Call Transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230110#M1629138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thanks much for the reply. Greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have implemented the same condition checking for my date type fields but still getting empty tags like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;date/&amp;gt;. So I am still checking how to discard these empty tags from my XML file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Swarna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 20:41:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230110#M1629138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T20:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML file Using Call Transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230111#M1629139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using conditional checks should avoid empty tags:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;tt:cond s-check="not-initial(ref('ROOT.L1_NM'))"&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can post a  portion of your definition so I can give you a hint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 20:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230111#M1629139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T20:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML file Using Call Transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230112#M1629140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Here is my data tag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;date1&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;tt:s-cond check = "not-initial(date1)"&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;tt:value ref="$ROOT1.date1"/&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/tt:s-cond&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/date1&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   It would be helpful if you could Suggest something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Swarna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 21:50:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230112#M1629140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T21:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML file Using Call Transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230113#M1629141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;lt;tt:cond s-check="not-initial(ref('$ROOT1.DATE1'))"&amp;gt;
&amp;lt;date1&amp;gt;
&amp;lt;tt:value ref="$ROOT1.date1"/&amp;gt;
&amp;lt;/date1&amp;gt;
&amp;lt;/tt:cond&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it doesn't work try removing the dollar sign from the condition: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;tt:cond s-check="not-initial(ref('ROOT1.DATE1'))"&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 21:53:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230113#M1629141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-05T21:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML file Using Call Transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230114#M1629142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SwarnaLakshmi,&lt;/P&gt;&lt;P&gt;As Carlosrv said, there is the option initial_components = 'suppress', that works for &lt;STRONG&gt;components&lt;/STRONG&gt; of ABAP structured data objects. I think people don't succeed in using it in &lt;STRONG&gt;small tests&lt;/STRONG&gt; if the initial data object attached to the root is an elementary data object. I answered more in depth here -&amp;gt; &lt;SPAN __jive_macro_name="message" id="10711600"&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Oct 2011 15:00:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230114#M1629142</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-10-08T15:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML file Using Call Transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230115#M1629143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sandra and Carlos. Now I am able  discard the Empty tags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Swarna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 23:44:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-xml-file-using-call-transformation/m-p/8230115#M1629143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-14T23:44:44Z</dc:date>
    </item>
  </channel>
</rss>

