<?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>Question Re: How to create empty text file on target system for empty source text file in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418175#M2020994</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;To create a adapter module you can refer to the following link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before starting you must install NWDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rinku Gangwani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Apr 2009 13:55:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-03T13:55:08Z</dc:date>
    <item>
      <title>How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaq-p/5418169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue in handling empty file in the Text (FCC) to Text (FCC) file scenario. Interface picks text file and delivers on target system as text file. I have used FCC in both sender and receiver CCs.&lt;/P&gt;&lt;P&gt;Interface is working fine if the source file is not empty. If the source text file is empty (zero Bytes), interface has to delivery an empty text file on target system.  I have setup empty file handling options correctly on both CCs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I tried with an empty file I am getting the error message 'Parsing an empty source. Root element expected!'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest me what I need to do to create an empty text file on target system from empty source text file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 22:05:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaq-p/5418169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T22:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418170#M2020989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Write a UDF to at the root of the target message type for checking null. If it is null create an empty node. You Receiver CC would create an empty file for the empty root.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 02:53:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418170#M2020989</guid>
      <dc:creator>VijayKonam</dc:creator>
      <dc:date>2009-04-03T02:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418171#M2020990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi All, &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I have an issue in handling empty file in the Text (FCC) to Text (FCC) file scenario. Interface picks text file and delivers on target system as text file. I have used FCC in both sender and receiver CCs.&lt;/P&gt;&lt;P&gt;&amp;gt; Interface is working fine if the source file is not empty. If the source text file is empty (zero Bytes), interface has to delivery an empty text file on target system.  I have setup empty file handling options correctly on both CCs. &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; But when I tried with an empty file I am getting the error message 'Parsing an empty source. Root element expected!'.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Could you please suggest me what I need to do to create an empty text file on target system from empty source text file?&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Thanks in Advance....&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards&lt;/P&gt;&lt;P&gt;&amp;gt; Sreeni&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is that when there is an empty file there is no XML for parsing available. Hence in case you are using a mapping it will fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What ideally you should do is to have a module that will check if the file is empty and if so write out an XML as you want with no values in the content/fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or the next choice would be to have a java mapping to handle this requirement. I guess that on an empty file the java mapping will go to an exception which you can handle to write out your logic/processing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 04:20:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418171#M2020990</guid>
      <dc:creator>Shabarish_Nair</dc:creator>
      <dc:date>2009-04-03T04:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418172#M2020991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sreeni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not use any message mapping rather &lt;STRONG&gt;use JAVA mapping or XSLT Mapping.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madan Agrawal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 07:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418172#M2020991</guid>
      <dc:creator>madanmohan_agrawal</dc:creator>
      <dc:date>2009-04-03T07:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418173#M2020992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way is below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you really want to process them then assign them a different name and in PI just pass them through ID (and no IR..no Mapping)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madan Agrawal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 07:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418173#M2020992</guid>
      <dc:creator>madanmohan_agrawal</dc:creator>
      <dc:date>2009-04-03T07:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418174#M2020993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you, i understand what you suggested me. I have no experience in developing and using the modules. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please expline me how to write a custom module and also provide me if you have any material or example senario.  So that i will develope a module for checking the empty file and generating the XML file as you mentioned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 13:40:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418174#M2020993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-03T13:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418175#M2020994</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;To create a adapter module you can refer to the following link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before starting you must install NWDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rinku Gangwani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 13:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418175#M2020994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-03T13:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418176#M2020995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vijay, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the example message mapping structure similar to my senario mapping , Please let me for what node do i need  to write UDF and also provide me sample code for checking the node is null and create the node for target messge. I have checked, i don't know its not worked. That's why i am asking you.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tree                                 Occurence                         Type&lt;/P&gt;&lt;P&gt;MT_MOD_FL                     1..1                                   DT_MOD_FL&lt;/P&gt;&lt;P&gt;   EMPLOYEE                   0..Unbounded                     &lt;/P&gt;&lt;P&gt;        ID                             1..1                                     String&lt;/P&gt;&lt;P&gt;        NAME                       0..1                                     String&lt;/P&gt;&lt;P&gt;        DESIGNATION           0..1                                     String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message structure is same for both source and target. If this UDF solution works, my job is easy to fix all 10 interfaces. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 14:01:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418176#M2020995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-03T14:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create empty text file on target system for empty source text file</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418177#M2020996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used conditional interface based on source file size. To Get the Source file Size use the adapter specific seting and checked the file name, file size check boxs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of empty file, i have  skipped the mapping .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 22:57:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-create-empty-text-file-on-target-system-for-empty-source-text-file/qaa-p/5418177#M2020996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-27T22:57:17Z</dc:date>
    </item>
  </channel>
</rss>

