<?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: Regarding appending data in table type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499421#M564623</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;For the same PO entry multiple GRs in same record is not possible. But you can have multiple GR entries in your internal table with same PO details. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg. If you have one PO with 4 GRs then you will have 4 lines in internal table that belong to same PO but different GRs. In this case PO details would be redundant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To read these values into internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. You can read the GR details into corresponding columns of internal table and then update the PO columns for these records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The other bit diffcult way could be to read all PO details into internal table. Then loop at internal table for each PO find out the no. of GRs. If it has N no of GRs then add (N-1) rows with same PO details and different GR details and update the N the GR detail into the existing row of the internal table. If it has only 1 GR then update the existing line. If PO has no GR then delete the table line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for all the useful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jul 2007 17:38:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-18T17:38:55Z</dc:date>
    <item>
      <title>Regarding appending data in table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499417#M564619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I have one structure and in that I am using one table type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. in the main structure, fields are as follows,&lt;/P&gt;&lt;P&gt;  po_number   po_line_item_no  gr_details&lt;/P&gt;&lt;P&gt;here gr_details is table type having following fields.&lt;/P&gt;&lt;P&gt;  gr_number gr_qty gr_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As we all know that one po can have multiple GR,&lt;/P&gt;&lt;P&gt;I want to append entries in the above structure in such a way that for one po entry , in the same record , multiple Gr entries should come.&lt;/P&gt;&lt;P&gt;I am doing one program , in it is mendatory.&lt;/P&gt;&lt;P&gt;can anyone please revert back on the same with High Priority ( Coding in Program to append values as per explained above ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rashmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 14:36:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499417#M564619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T14:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding appending data in table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499418#M564620</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;Use Select statement along with FOR ALL ENTRIES and get the data required for all the PO-NUMBERS into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Loop at the Main table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT PO_MAIN INTO WA_PO.&lt;/P&gt;&lt;P&gt;DATA: temp_tab like PO_DETAILS.&lt;/P&gt;&lt;P&gt;LOOP AT PO_DETAILS INTO WA_DETAILS WHERE PO_NUMBER = WA_PO-PO_NUMBER.&lt;/P&gt;&lt;P&gt;APPEND WA_DETAILS to TEMP_TAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;WA_PO-GR_DETAILS = temp_tab.&lt;/P&gt;&lt;P&gt;clear temp_tab.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 14:41:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499418#M564620</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-07-18T14:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding appending data in table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499419#M564621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;field-symbols :  &amp;lt;tab&amp;gt; type table,&lt;/P&gt;&lt;P&gt;                 &amp;lt;wa&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa like line of str-tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign str-tab[] to &amp;lt;tab&amp;gt;.&lt;/P&gt;&lt;P&gt;assign wa to &amp;lt;wa&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append &amp;lt;wa&amp;gt; to &amp;lt;tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will work..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prax&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 14:47:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499419#M564621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T14:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding appending data in table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499420#M564622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this program code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZPRAX5.

type-pools: TRUXS.

data: begin of itab,
        fld1(10) type c,
        fld2(10) type c,
        tab type TRUXS_T_TEXT_DATA,
      end of itab.

data: wa like line of itab-tab.

append '786765876' to itab-tab.
append '678977876' to itab-tab.

itab-fld1 = '4786'.
itab-fld2 = '4989786'.

loop at itab-tab into wa.
write:/ wa.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Prax&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 15:00:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499420#M564622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T15:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding appending data in table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499421#M564623</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;For the same PO entry multiple GRs in same record is not possible. But you can have multiple GR entries in your internal table with same PO details. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg. If you have one PO with 4 GRs then you will have 4 lines in internal table that belong to same PO but different GRs. In this case PO details would be redundant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To read these values into internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. You can read the GR details into corresponding columns of internal table and then update the PO columns for these records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The other bit diffcult way could be to read all PO details into internal table. Then loop at internal table for each PO find out the no. of GRs. If it has N no of GRs then add (N-1) rows with same PO details and different GR details and update the N the GR detail into the existing row of the internal table. If it has only 1 GR then update the existing line. If PO has no GR then delete the table line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for all the useful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 17:38:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-appending-data-in-table-type/m-p/2499421#M564623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T17:38:55Z</dc:date>
    </item>
  </channel>
</rss>

