<?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: Doubt in code.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225905#M478345</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These files,  are they on the frontend PC, or the application server file system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should probably write all records to internal tables and then write to file form these internal tables when done processing the custom BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 May 2007 17:38:00 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-05-01T17:38:00Z</dc:date>
    <item>
      <title>Doubt in code....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225903#M478343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have following doubt. I am using a BAPI to get details regarding particular Object number. The list of object numbers are in internal table it_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call Function 'ZCUSTOM'&lt;/P&gt;&lt;P&gt;EXPROTING&lt;/P&gt;&lt;P&gt; NUMBER = IT_TAB-NUMBER&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;TAB1 = TAB1[]&lt;/P&gt;&lt;P&gt;TAB2 = TAB2[]&lt;/P&gt;&lt;P&gt;TAB3 = TAB3[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the Data from TAB1 table, TAB2 table and Tab3 table should be written in a flat file1, fil2 and file3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My doubt, is when the next number is passed to BAPI ZCUSTOM while looping, the data tables for that next number should be written in respective files but on next line (keeping the previous data intact)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data returned when NUMBER1 :- TAB1 - AAA,11; TAB2 - BBB,12; TAB3 - CCC,13&lt;/P&gt;&lt;P&gt;Data returned when Number2 :- TAB1 - YYY,10; TAB2 - ZZZ,09; TAB3 - TTT,08&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flat file1 Content should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AAA,11&lt;/P&gt;&lt;P&gt;YYY,10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flat file2 Content should be:&lt;/P&gt;&lt;P&gt;BBB,12&lt;/P&gt;&lt;P&gt;ZZZ,09&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------" /&gt;&lt;P&gt;Flat file3 Content should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CCC,13&lt;/P&gt;&lt;P&gt;TTT,08&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 17:29:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225903#M478343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T17:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in code....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225904#M478344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using OPEN DATASET, use the option FOR APPENDING. See below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET p_file FOR APPENDING IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using GUI_DOWNLOAD, then set the parameter "append      = 'X' ".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 17:37:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225904#M478344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T17:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in code....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225905#M478345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These files,  are they on the frontend PC, or the application server file system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should probably write all records to internal tables and then write to file form these internal tables when done processing the custom BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 17:38:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225905#M478345</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-01T17:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in code....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225906#M478346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;transfer the contents of internal table inside the loop itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move contents of those internal tables to another internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call Function 'ZCUSTOM'&lt;/P&gt;&lt;P&gt;EXPROTING&lt;/P&gt;&lt;P&gt;NUMBER = IT_TAB-NUMBER&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;TAB1 = TAB1[]&lt;/P&gt;&lt;P&gt;TAB2 = TAB2[]&lt;/P&gt;&lt;P&gt;TAB3 = TAB3[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move tab1 to tabA.&lt;/P&gt;&lt;P&gt;move tab2 to tabb.&lt;/P&gt;&lt;P&gt;... tab3   to tabc .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append : taba,. tabb, tabc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 17:38:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225906#M478346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T17:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in code....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225907#M478347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The flat files are on presentation server...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 18:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225907#M478347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T18:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in code....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225908#M478348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok,  so again, I would build internal tables for you files.  Then when done in the LOOP and calling the custom BAPI,  simply download the internal tables to the PC once.  see the pseudo code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop at itab.

    call function 'ZCUSTOM'
           ......

    append lines of ttab1 to itab1.
    append lines of ttab2 to itab2.
    append lines of ttab3 to itab3.
    append lines of ttab4 to itab4.

endloop.


call function 'GUI_DOWNLOAD'
            .....
         tables
               data_tab   = itab1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 18:03:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-code/m-p/2225908#M478348</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-01T18:03:40Z</dc:date>
    </item>
  </channel>
</rss>

