<?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: Passing tables with PERFORM statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709719#M628118</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When you are passing an internal table to a subroutine you need to use the keyword STRUCTURE.Please see the example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare a structure of the type of internal table.If the structure exists in DDIC then you can use it itself e.g gst_itab.&lt;/P&gt;&lt;P&gt;perform gf_update TABLES itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form gf_update TABLES x_itab STRUCTURE gst_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Aug 2007 09:32:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-21T09:32:30Z</dc:date>
    <item>
      <title>Passing tables with PERFORM statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709714#M628113</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;There is a table returned by a function module ZCDAPO_MATNR_CHECK_FOR_QUOTA .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use the table returned by this FM  in a subroutine.&lt;/P&gt;&lt;P&gt;So i pass this table thru FORM statement.&lt;/P&gt;&lt;P&gt;within  PERFORM  and ENDFORM i want to use the data in this table &lt;/P&gt;&lt;P&gt;and do some manipulation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i am getting an error saying for typing TABLES parameter only table types should be used&lt;/P&gt;&lt;P&gt;can anyone tell me where i am going wrong or please tell me how use tables in this PERFORM statement.for reference i will paste the code below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES  : BEGIN OF x_quota     , &lt;/P&gt;&lt;P&gt;               trpid type ztrpid    ,&lt;/P&gt;&lt;P&gt;               quota TYPE decv1_3   ,  &lt;/P&gt;&lt;P&gt;               END OF x_quota       .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :  it_qheader TYPE TABLE OF zapo_trqtah,&lt;/P&gt;&lt;P&gt;             wa_it_qheader LIKE LINE OF it_qheader.&lt;/P&gt;&lt;P&gt;DATA:    it_qitem TYPE TABLE OF zapo_trqtap,&lt;/P&gt;&lt;P&gt;             wa_it_qitem LIKE LINE OF it_qitem.&lt;/P&gt;&lt;P&gt;DATA   : it_quotavalue      TYPE TABLE OF x_quota                    ,&lt;/P&gt;&lt;P&gt;              wa_it_quotavalue   LIKE LINE  OF it_quotavalue              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZCDAPO_MATNR_CHECK_FOR_QUOTA'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_matnr            = 'AATESTQUOTA2'&lt;/P&gt;&lt;P&gt;        i_werks            = '5034'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        e_quota_exist_flag = lv_flag&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        t_zapo_trqtap      = it_qitem&lt;/P&gt;&lt;P&gt;        t_zapo_trqtah      = it_qheader&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        invalid_input      = 1&lt;/P&gt;&lt;P&gt;        OTHERS             = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform f_loadquota_apo TABLES it_qitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form f_loadquota_apo tables it_qitem type zapo_trqtap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                 LOOP AT it_qitem INTO wa_it_qitem.&lt;/P&gt;&lt;P&gt;                 wa_it_quotavalue-trpid = wa_it_qitem-ztrpid.&lt;/P&gt;&lt;P&gt;                 wa_it_quotavalue-quota = wa_it_qitem-zquota / lv_sum.&lt;/P&gt;&lt;P&gt;                 append wa_it_quotavalue to it_quotavalue.&lt;/P&gt;&lt;P&gt;                 endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 09:18:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709714#M628113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T09:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Passing tables with PERFORM statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709715#M628114</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;Using TABLES is like obselete.&lt;/P&gt;&lt;P&gt;So change your code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call the Subroutine like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;perform f_loadquota_apo using it_qitem[].&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can change the Definition of Form like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;form f_loadquota_apo USING  it_qitem LIKE zapo_trqtap[].&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_qitem INTO wa_it_qitem.&lt;/P&gt;&lt;P&gt;wa_it_quotavalue-trpid = wa_it_qitem-ztrpid.&lt;/P&gt;&lt;P&gt;wa_it_quotavalue-quota = wa_it_qitem-zquota / lv_sum.&lt;/P&gt;&lt;P&gt;append wa_it_quotavalue to it_quotavalue.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if Helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 09:23:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709715#M628114</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-08-21T09:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Passing tables with PERFORM statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709716#M628115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform f_loadquota_apo TABLES it_qitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form f_loadquota_apo tables it_qitem type zapo_trqtap. =&amp;gt; your coding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;form f_loadquota_apo tables it_qitem_val. ==&amp;gt; try this one remove type don't need to declare it_qitem_val&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_qitem INTO wa_it_qitem.&lt;/P&gt;&lt;P&gt;wa_it_quotavalue-trpid = wa_it_qitem-ztrpid.&lt;/P&gt;&lt;P&gt;wa_it_quotavalue-quota = wa_it_qitem-zquota / lv_sum.&lt;/P&gt;&lt;P&gt;append wa_it_quotavalue to it_quotavalue.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Good regards,&lt;/P&gt;&lt;P&gt;vallamuthu.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 09:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709716#M628115</guid>
      <dc:creator>vallamuthu_madheswaran2</dc:creator>
      <dc:date>2007-08-21T09:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Passing tables with PERFORM statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709717#M628116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi hemavathi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Minor mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form f_loadquota_apo tables it_qitem &amp;lt;b&amp;gt;STRUCTURE&amp;lt;/b&amp;gt; zapo_trqtap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(where zapo_trqtap should be available in se11 as a table/structure definition)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 09:29:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709717#M628116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T09:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Passing tables with PERFORM statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709718#M628117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hemavathi,&lt;/P&gt;&lt;P&gt;U need to a small change to your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U've already declared &amp;lt;b&amp;gt;x_quota&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;it_qitem&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;Additionally,you declare a table type like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data:type_t_x_quota type standard table of x_quota initial size 0.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and modify your Perform and Form like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform f_loadquota_apo using it_qitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form f_loadquota_apo using r_it_qitem type type_t_x_quota.&lt;/P&gt;&lt;P&gt;......................&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it works.&lt;/P&gt;&lt;P&gt;Reward if Useful,&lt;/P&gt;&lt;P&gt;Imran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 09:31:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709718#M628117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T09:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Passing tables with PERFORM statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709719#M628118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When you are passing an internal table to a subroutine you need to use the keyword STRUCTURE.Please see the example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare a structure of the type of internal table.If the structure exists in DDIC then you can use it itself e.g gst_itab.&lt;/P&gt;&lt;P&gt;perform gf_update TABLES itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form gf_update TABLES x_itab STRUCTURE gst_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 09:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-tables-with-perform-statement/m-p/2709719#M628118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T09:32:30Z</dc:date>
    </item>
  </channel>
</rss>

