<?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: Issue with WRITE statement from Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218377#M767495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try it like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: Begin of itab,&lt;/P&gt;&lt;P&gt;       lifnr type lfa1-lifnr,&lt;/P&gt;&lt;P&gt;       name1 type lfa1-name1,&lt;/P&gt;&lt;P&gt;       land1 type lfa1-land1,&lt;/P&gt;&lt;P&gt;      End of itab,&lt;/P&gt;&lt;P&gt;      it_lfa1 like table of itab with header line,&lt;/P&gt;&lt;P&gt;      lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;      name1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;      land1 like lfa1-land1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lifnr name1 land1 into (lifnr, name1, land1)&lt;/P&gt;&lt;P&gt;       from lfa1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_lfa1-lifnr = lifnr.&lt;/P&gt;&lt;P&gt;it_lfa1-name1 = name1.&lt;/P&gt;&lt;P&gt;it_lfa1-land1 = land1.&lt;/P&gt;&lt;P&gt;append it_lfa1.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_lfa1.&lt;/P&gt;&lt;P&gt; write:/ it_lfa1-lifnr, it_lfa1-name1, it_lfa1-land1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: &lt;/P&gt;&lt;P&gt;In place of the above select you insert your join select statement. It is working for me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have declared your internal table wrongly. In the internal table instead of TYPE use LIKE, it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jan 2008 08:53:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-10T08:53:26Z</dc:date>
    <item>
      <title>Issue with WRITE statement from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218372#M767490</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 written the below code in a infoset query, the syntax check is ok &amp;amp; when i run the query in debugging mode, i find the internal table being filled with the values &amp;amp; the write statement outputing the values as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is when i execute the query the output does not show all the lines, instead just displays the last record . What could be the mistake?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it because i have defined Y_EBELN, Y_EBELP &amp;amp; Y_OPENQTY as nodes in the Extras Tab of the infoset &amp;amp; have chosen this for display in my query? How to display the output from my internal table in my query output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope my problem is clear, await clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  types: &lt;/P&gt;&lt;P&gt;    Begin of itab,&lt;/P&gt;&lt;P&gt;      wl_ebeln   type eket-ebeln,&lt;/P&gt;&lt;P&gt;      wl_ebelp   type eket-ebelp,&lt;/P&gt;&lt;P&gt;      wl_openqty type eket-menge,&lt;/P&gt;&lt;P&gt;    End of itab.&lt;/P&gt;&lt;P&gt;Data: il_po type table of itab with header line.&lt;/P&gt;&lt;P&gt;*Display open PO for materials&lt;/P&gt;&lt;P&gt;  SELECT EKET&lt;SUB&gt;EBELN EKET&lt;/SUB&gt;EBELP EKET&lt;SUB&gt;MENGE EKET&lt;/SUB&gt;WEMNG EKET~EINDT&lt;/P&gt;&lt;P&gt;  	INTO (Y_EBELN, Y_EBELP, WL_MENGE, WL_WEMNG, Y_EINDT)&lt;/P&gt;&lt;P&gt;    FROM EKET&lt;/P&gt;&lt;P&gt;      INNER JOIN EKPO&lt;/P&gt;&lt;P&gt;    	ON EKET&lt;SUB&gt;EBELN     = EKPO&lt;/SUB&gt;EBELN&lt;/P&gt;&lt;P&gt;          AND EKET&lt;SUB&gt;EBELP = EKPO&lt;/SUB&gt;EBELP&lt;/P&gt;&lt;P&gt;      INNER JOIN MARD&lt;/P&gt;&lt;P&gt;    	ON EKPO&lt;SUB&gt;MATNR     = MARD&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;          AND EKPO&lt;SUB&gt;WERKS = MARD&lt;/SUB&gt;WERKS&lt;/P&gt;&lt;P&gt;          AND EKPO&lt;SUB&gt;LGORT = MARD&lt;/SUB&gt;LGORT&lt;/P&gt;&lt;P&gt;    WHERE EKPO~MATNR = MARD-MATNR&lt;/P&gt;&lt;P&gt;      AND EKPO~WERKS = MARD-WERKS&lt;/P&gt;&lt;P&gt;      AND EKPO~LGORT = MARD-LGORT&lt;/P&gt;&lt;P&gt;      AND EKPO~LOEKZ = SPACE&lt;/P&gt;&lt;P&gt;      AND EKPO~ELIKZ = SPACE.&lt;/P&gt;&lt;P&gt;*Display only still open qty per schedule line&lt;/P&gt;&lt;P&gt;  Y_OPENQTY = WL_MENGE - WL_WEMNG.&lt;/P&gt;&lt;P&gt;  il_po-wl_ebeln = Y_EBELN.&lt;/P&gt;&lt;P&gt;  il_po-wl_ebelp = Y_EBELP.&lt;/P&gt;&lt;P&gt;  il_po-wl_openqty = Y_OPENQTY.&lt;/P&gt;&lt;P&gt;    append il_po.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Loop at il_po.&lt;/P&gt;&lt;P&gt;  write:/ il_po-wl_ebeln, il_po-wl_ebelp, il_po-wl_openqty.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 08:17:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218372#M767490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T08:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with WRITE statement from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218373#M767491</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;after append use clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append il_po.&lt;/P&gt;&lt;P&gt;clear il_po.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 08:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218373#M767491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T08:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with WRITE statement from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218374#M767492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In START-OF -SELECTON  event in infotype you will get the final internal table Yes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create all your internal table fields into extras.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move all these fields into your field group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to record processing event and &lt;/P&gt;&lt;P&gt;READ TABLE internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move values to fields which are in extras like internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN tcode sq01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change mode select all your extras fields by selecting check boxes in order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;activate and execute the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 08:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218374#M767492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T08:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with WRITE statement from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218375#M767493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mr. Chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the inputs, but it does not solve my problem. Any way how i can resolve this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 08:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218375#M767493</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T08:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with WRITE statement from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218376#M767494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the internal table is not well define.&lt;/P&gt;&lt;P&gt;The logic seems good.&lt;/P&gt;&lt;P&gt;The program treat it like a structure and, so, you just have 1 record ( which is the last as previous were overwritten ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check your internal table declaration !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Erwan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 08:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218376#M767494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T08:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with WRITE statement from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218377#M767495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try it like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: Begin of itab,&lt;/P&gt;&lt;P&gt;       lifnr type lfa1-lifnr,&lt;/P&gt;&lt;P&gt;       name1 type lfa1-name1,&lt;/P&gt;&lt;P&gt;       land1 type lfa1-land1,&lt;/P&gt;&lt;P&gt;      End of itab,&lt;/P&gt;&lt;P&gt;      it_lfa1 like table of itab with header line,&lt;/P&gt;&lt;P&gt;      lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;      name1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;      land1 like lfa1-land1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lifnr name1 land1 into (lifnr, name1, land1)&lt;/P&gt;&lt;P&gt;       from lfa1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_lfa1-lifnr = lifnr.&lt;/P&gt;&lt;P&gt;it_lfa1-name1 = name1.&lt;/P&gt;&lt;P&gt;it_lfa1-land1 = land1.&lt;/P&gt;&lt;P&gt;append it_lfa1.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_lfa1.&lt;/P&gt;&lt;P&gt; write:/ it_lfa1-lifnr, it_lfa1-name1, it_lfa1-land1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: &lt;/P&gt;&lt;P&gt;In place of the above select you insert your join select statement. It is working for me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have declared your internal table wrongly. In the internal table instead of TYPE use LIKE, it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 08:53:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218377#M767495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T08:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with WRITE statement from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218378#M767496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mr. Muralikrishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your inputs. I will test the code as per your suggestion, i think it should work. Will post back after my test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note for Erwan&lt;/STRONG&gt; Thanks for the inputs will check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note for Harita&lt;/STRONG&gt; I dont think the issue is with the declaration part, but it is only with the display part. As i am writing a infoset query, as Mr. Murali suggests, i think i should pass the values to the nodes &amp;amp; then it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But thanks none the less for your valuable inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vivek on Jan 10, 2008 5:00 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 08:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218378#M767496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T08:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with WRITE statement from Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218379#M767497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute below progarm, i hope it is useful for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; tables: EKET, EKPO,MARD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab like eket occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT EKET&lt;SUB&gt;EBELN EKET&lt;/SUB&gt;EBELP EKET&lt;SUB&gt;MENGE       "EKET&lt;/SUB&gt;WEMNG EKET~EINDT&lt;/P&gt;&lt;P&gt;FROM EKET&lt;/P&gt;&lt;P&gt;INNER JOIN EKPO&lt;/P&gt;&lt;P&gt;ON EKET&lt;SUB&gt;EBELN = EKPO&lt;/SUB&gt;EBELN&lt;/P&gt;&lt;P&gt;AND EKET&lt;SUB&gt;EBELP = EKPO&lt;/SUB&gt;EBELP&lt;/P&gt;&lt;P&gt;INNER JOIN MARD&lt;/P&gt;&lt;P&gt;ON EKPO&lt;SUB&gt;MATNR = MARD&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;AND EKPO&lt;SUB&gt;WERKS = MARD&lt;/SUB&gt;WERKS&lt;/P&gt;&lt;P&gt;AND EKPO&lt;SUB&gt;LGORT = MARD&lt;/SUB&gt;LGORT&lt;/P&gt;&lt;P&gt;into corresponding fields of  itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/(40) itab-ebeln, (40) itab-ebelp, (10) itab-menge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward me if it is useful for u&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 09:05:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-write-statement-from-internal-table/m-p/3218379#M767497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T09:05:31Z</dc:date>
    </item>
  </channel>
</rss>

