<?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 Clear the list buffer created by 'WRITE' statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780103#M1678244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a Z reporting program, where at point A in the program, I am creating a report with 'WRITE' statement. And later certain point B, I want to clear the list created at point A, and want to print new report created at point B with 'WRITE' statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will appreciate if somebody can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Jun 2012 17:39:24 GMT</pubDate>
    <dc:creator>manoj_goyal2</dc:creator>
    <dc:date>2012-06-09T17:39:24Z</dc:date>
    <item>
      <title>Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780103#M1678244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a Z reporting program, where at point A in the program, I am creating a report with 'WRITE' statement. And later certain point B, I want to clear the list created at point A, and want to print new report created at point B with 'WRITE' statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will appreciate if somebody can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2012 17:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780103#M1678244</guid>
      <dc:creator>manoj_goyal2</dc:creator>
      <dc:date>2012-06-09T17:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780104#M1678245</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 think there is no direct function module or statement to clear the list buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you have several workarounds:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Either write your list inside a new screen sequence : create a dummy dynpro with SUPPRESS DIALOG in the PBO, and do your WRITEs in the PBO or PAI as you wish; then leave the screen sequence at the end of PAI (SET SCREEN 0 for instance), and call the dynpro; note: that should work in background as there is no real screen display&lt;/LI&gt;&lt;LI&gt;Or create 2 programs, with second program corresponding to the point A; call it through SUBMIT ... EXPORTING LIST TO MEMORY AND RETURN&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2012 18:30:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780104#M1678245</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2012-06-09T18:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780105#M1678246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manoj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you talking about Secondary lists?&lt;/P&gt;&lt;P&gt;When you use WRITE statement, it prints the contents to the screen.&lt;/P&gt;&lt;P&gt;The only way you can print some other content, say Point B, it will be executed when you do some other action, Button click, HOTSPOT etc. If this is the case, you don't have to do anything to handle the list output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain what is the exact requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shambu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jun 2012 04:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780105#M1678246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-10T04:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780106#M1678247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me explain the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a Z reporting program with selection screen. At point A, I am using WRITE statement to create a report (report A) .&amp;nbsp; At point B, I am creating another report (report b) with WRITE. And due to logic, I don't want to print the report created by point A. I want to display only the report created at point B. Right now both Report A and Report B are displayed on screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jun 2012 15:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780106#M1678247</guid>
      <dc:creator>manoj_goyal2</dc:creator>
      <dc:date>2012-06-10T15:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780107#M1678248</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;Again, the requirement is not clear.&lt;/P&gt;&lt;P&gt;How does the control go to point B? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: 'Report A'. " Basic list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE SELECTION.&lt;/P&gt;&lt;P&gt;WRITE : 'Report B'. " Secondary list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you are doing?&lt;/P&gt;&lt;P&gt;If you dont want to print the Report A, why are you writing this?&lt;/P&gt;&lt;P&gt;This doesn't make any sense. I am missing something. &lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/797/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shambu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jun 2012 15:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780107#M1678248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-10T15:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780108#M1678249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shambu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program : ZABC1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform WRITE_REPORT_A&amp;nbsp; (Write report and create ITAB1)&amp;nbsp;&amp;nbsp; (I have to run this. Mandetory)&lt;/P&gt;&lt;P&gt;export&amp;nbsp; ITAB1 to memoy id 'ZITAB1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if new_logic = 'X'&lt;/P&gt;&lt;P&gt;submit&amp;nbsp; ZABC2 and return.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if new_logic = 'X'&lt;/P&gt;&lt;P&gt;import ITAB2 from memory id 'ZITAB2'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(clear previous report Report A)&lt;/P&gt;&lt;P&gt;Write report using ITAB2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------&lt;/P&gt;&lt;P&gt;Program: ZABC2&lt;/P&gt;&lt;P&gt;Import ITAB1 from memory id 'ZABC1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process ITAB1 and create ITAB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;export ITAB2 to memory id 'ZITAB2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 01:59:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780108#M1678249</guid>
      <dc:creator>manoj_goyal2</dc:creator>
      <dc:date>2012-06-11T01:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780109#M1678250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manoj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is&amp;nbsp; a way to clear the List content even after writing to the screen.&lt;/P&gt;&lt;P&gt;MODIFY LINE.&lt;/P&gt;&lt;P&gt;Check a sample program I have used.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA :&amp;nbsp; lt_mara &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;mara &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;HEADER &lt;/SPAN&gt;LINE,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_mara &lt;SPAN class="L0S52"&gt;LIKE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;lt_mara,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;string,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;i,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lin &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;i.&lt;BR /&gt;&lt;BR /&gt;START-OF-SELECTION.&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;mara &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;lt_mara &lt;SPAN class="L0S52"&gt;UP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;10 &lt;/SPAN&gt;ROWS.&lt;BR /&gt;&lt;BR /&gt;END-OF-SELECTION.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;lt_mara.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE:/ lt_mara-matnr, lt_mara-mtart, lt_mara-laeda, lt_mara-ernam.&lt;BR /&gt;&amp;nbsp; ENDLOOP.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DESCRIBE &lt;/SPAN&gt;LIST &lt;SPAN class="L0S52"&gt;PAGE &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1 &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INDEX &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0 &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINES &lt;/SPAN&gt;lin.&lt;BR /&gt;&amp;nbsp; start = &lt;SPAN class="L0S32"&gt;1.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DO &lt;/SPAN&gt;lin TIMES.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;MODIFY &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE &lt;/SPAN&gt;start &lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;CURRENT &lt;SPAN class="L0S52"&gt;PAGE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;VALUE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;test.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; start = start + &lt;SPAN class="L0S32"&gt;1.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; ENDDO.&lt;/SPAN&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can try commenting the MODIFY LINE statement and see what changes this brings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shambu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 03:56:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780109#M1678250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-11T03:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780110#M1678251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manoj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I understand you requirement correct, just clear the magic sy-lsind variable...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE-SELECTION&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CLEAR &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;lsind&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'List 2'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN class="L0S52"&gt;START-OF-SELECTION&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN class="L0S52"&gt;&amp;nbsp;&amp;nbsp; WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'List 1'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;A __default_attr="173998" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://community.sap.com/"&gt;&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 08:31:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780110#M1678251</guid>
      <dc:creator>UweFetzer_se38</dc:creator>
      <dc:date>2012-06-11T08:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780111#M1678252</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 have the minimum amount of modifications, you could create ZABC0 program :&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;SUBMIT zabc1 ... EXPORTING LIST TO MEMORY... and return&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;CALL FUNCTION 'LIST_FROM_MEMORY'... -&amp;gt; itab1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;if new_logic = 'X'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp; FREE itab1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp; submit&amp;nbsp; ZABC2 and return.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp; import ITAB2 from memory id 'ZITAB2'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp; Write report using ITAB2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;else&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp; CALL FUNCTION 'WRITE_LIST' of itab1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&amp;nbsp; FREE itab1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;endif&lt;/SPAN&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 13:21:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780111#M1678252</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2012-06-11T13:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780112#M1678253</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;A possible workaround for this, if your tables ITAB1 and ITAB2 has the same structure (or at least the same output field length), is to overwrite your first list with the second one by using the statement BACK before outputting ITAB2... If ITAB2 contains less records than ITAB1, you will also have to overwrite the extra entries from ITAB1 with blank lines... Not really nice however &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/797/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question: Why not simply output the first list based on a condition as well??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if new_logic = ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp; perform WRITE_REPORT_A&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&amp;nbsp; submit&amp;nbsp; ZABC2 and return.&lt;/P&gt;&lt;P&gt;&amp;nbsp; import ITAB2 from memory id 'ZITAB2'&lt;/P&gt;&lt;P&gt;&amp;nbsp; Write report using ITAB2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;Manu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 15:23:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780112#M1678253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-11T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Clear the list buffer created by 'WRITE' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780113#M1678254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great! It worked for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Dec 2013 12:49:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-the-list-buffer-created-by-write-statement/m-p/8780113#M1678254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-12-06T12:49:21Z</dc:date>
    </item>
  </channel>
</rss>

