<?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: error in passing internal table as returning parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-passing-internal-table-as-returning-parameter/m-p/7742377#M1581884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have mentioned KNA1 as the TYPE for returing parameter (in RETURNING part of method defintiion), method can only pass a single record.  If you want to return an internal table from the method, define the type as LB_T_BIL_KNA1 (Table type for KNA1).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Mar 2011 03:19:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-30T03:19:59Z</dc:date>
    <item>
      <title>error in passing internal table as returning parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-passing-internal-table-as-returning-parameter/m-p/7742376#M1581883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Im new to ABAP OO.&lt;/P&gt;&lt;P&gt;I declared a parameter ret_kna1 Returning Type KNA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the method, I am retrieving data from table KNA1 into internal table and then I want return the interal table value.&lt;/P&gt;&lt;P&gt;But Im not able to assing the internal table for eg : code &lt;/P&gt;&lt;P&gt;method READ_CUSTOMER_LIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: lt_kna1 type TABLE OF kna1,
      wa_kna1 LIKE LINE OF lt_kna1.

data: lv_kunnr type kna1-kunnr,
      lv_land1 type kna1-LAND1.
SELECT * FROM kna1
INTO TABLE lt_kna1
WHERE land1 eq lv_land1.
insert LINES OF lt_kna1 INTO TABLE ret_kna1.
endmethod.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I try to activate the error says 'ret_kna1 is not an internal table  "OCCURS n" specification is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I can not declare the internal table 'ret_kna1' once again in the code, as it already defined in the parameter as type KNA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me how to assign internal table values to the returing structur.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 02:00:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-passing-internal-table-as-returning-parameter/m-p/7742376#M1581883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T02:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: error in passing internal table as returning parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-passing-internal-table-as-returning-parameter/m-p/7742377#M1581884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have mentioned KNA1 as the TYPE for returing parameter (in RETURNING part of method defintiion), method can only pass a single record.  If you want to return an internal table from the method, define the type as LB_T_BIL_KNA1 (Table type for KNA1).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 03:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-passing-internal-table-as-returning-parameter/m-p/7742377#M1581884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T03:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: error in passing internal table as returning parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-passing-internal-table-as-returning-parameter/m-p/7742378#M1581885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you passing it as an EXPORT parameter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use and define it in the TABLES section of your function module as so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*"  IMPORTING
*"     VALUE(INCLUDE_X_LEVELS) TYPE  CHAR1 OPTIONAL
*"  TABLES
*"      I_SELECTED_OU STRUCTURE  HRROOTOB
*"      I_SELECTED_EE STRUCTURE  OBJEC
*"      E_VIP_EPM_DISTR STRUCTURE  ZHR_VIP_EPM_DISTR
*"      E_RETURN STRUCTURE  BAPIRET1
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That way you can pass value in the table (if needed) and then pass the table with your values based on your own logic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 18:31:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-passing-internal-table-as-returning-parameter/m-p/7742378#M1581885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T18:31:32Z</dc:date>
    </item>
  </channel>
</rss>

