<?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: Exporting internal table in a oops in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974526#M949310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is with the output parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might be I'll give you the background and then explain you the problem. This may help.&lt;/P&gt;&lt;P&gt;In the older release of ABAP there used to be Tables as one of the tabs where one could import/export tables to/from the FM. The problem was that it would difficult to identify what table are being imported and what are bein exported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So with later releases of ABAP this tab was removed and currently there are Exporting/Importing/Changing tabs. You can use changing in your case if you are passing the table to modify the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem.&lt;/P&gt;&lt;P&gt;As stated above the OUTPUT is a line type (means structure) while IT is a internal table with header lines. So the record in the wa of this table is only transferred to OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What needs to be done.&lt;/P&gt;&lt;P&gt;You need to change the type of the OUTPUT to table type. I am not sure if you know about table type.&lt;/P&gt;&lt;P&gt;You can create a Table Type is se11 under Data Type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2008 05:35:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-18T05:35:41Z</dc:date>
    <item>
      <title>Exporting internal table in a oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974520#M949304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to pass internal table to a method and export that internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when i am passing this internal table i am getting the last value of the table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am enclosing code here please go through and modify me regarding this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT  ZTEST_ABAP_PROXY.
DATA PRXY TYPE REF TO ZCO_MI_PROXY_OUTBOUND.

DATA: BEGIN OF I_MARA OCCURS 0,
  MATNR LIKE MARA-MATNR,
  ERNAM LIKE MARA-ERNAM,

  END OF I_MARA.



CREATE OBJECT PRXY.
DATA IT TYPE  ZMT_PROXY_OUTBOUND OCCURS 0 WITH HEADER LINE.


TRY.

    SELECT MATNR ERNAM INTO TABLE I_MARA FROM MARA UP TO 10 ROWS.

    LOOP AT I_MARA.

      IT-MT_PROXY_OUTBOUND-MATNR = I_MARA-MATNR.
      IT-MT_PROXY_OUTBOUND-ERNAM = I_MARA-ERNAM.
      APPEND IT.

    ENDLOOP.

    CALL METHOD PRXY-&amp;gt;EXECUTE_ASYNCHRONOUS
      EXPORTING
        OUTPUT = IT.
    COMMIT WORK.


    
  CATCH CX_AI_SYSTEM_FAULT .
    DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .
    CREATE OBJECT FAULT.
    WRITE :/ FAULT-&amp;gt;ERRORTEXT.
ENDTRY.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to pass all the values of internal table to output at once..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:36:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974520#M949304</guid>
      <dc:creator>vijay_kumar133</dc:creator>
      <dc:date>2008-06-17T08:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting internal table in a oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974521#M949305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that just reading the code, you're not sure whether you're dealing with &lt;STRONG&gt;IT&lt;/STRONG&gt; the table, or &lt;STRONG&gt;IT&lt;/STRONG&gt; the header line.  If you didn't use tables with header lines you wouldn't have made this mistake - it wouldn't have been possible.  An excellent example of why you should get into the habit of NOT using header lines!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    CALL METHOD PRXY-&amp;gt;EXECUTE_ASYNCHRONOUS
      EXPORTING
        OUTPUT = IT[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:42:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974521#M949305</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-06-17T08:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting internal table in a oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974522#M949306</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;now i am getting this error &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"IT" is not type-compatible with formal parameter "OUTPUT".		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to change any thing in method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the method look like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

METHOD EXECUTE_ASYNCHRONOUS.
SET EXTENDED CHECK OFF.
INCLUDE SPROXY_MACROS.
OUTBOUND_HANDLER_INIT_1
'EXECUTE_ASYNCHRONOUS'
'MI_Proxy_Outbound'
.
OUTBOUND_HANDLER_ADD_PARAM
'OUTPUT'
OUTPUT
'0'
'ZMT_PROXY_OUTBOUND'
'MT_Proxy_Outbound'
'http://relianceada.com/test/Proxy'
'MT_Proxy_Outbound'
'http://relianceada.com/test/Proxy'
.
OUTBOUND_HANDLER_EXECUTE.
SET EXTENDED CHECK ON.
ENDMETHOD.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think we need to do some modifications in method also..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 09:43:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974522#M949306</guid>
      <dc:creator>vijay_kumar133</dc:creator>
      <dc:date>2008-06-17T09:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting internal table in a oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974523#M949307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the type of IT.  Look at the type of the parameter "OUTPUT" in METHOD EXECUTE_ASYNCHRONOUS.  They're not the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is the structure ZMT_PROXY_OUTBOUND defined?  How is the structure of type OUTPUT defined?  Look at them, and think carefully about how to get your data into the correct data structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 09:58:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974523#M949307</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-06-17T09:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting internal table in a oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974524#M949308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;pass the internal table as IT[]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 10:43:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974524#M949308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T10:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting internal table in a oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974525#M949309</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;ZCO_MI_PROXY_OUTBOUND (Proxy class)&lt;/P&gt;&lt;P&gt;ZMT_PROXY_OUTBOUND(structure)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i have writen a code in abap report to pass data to output parameter..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but output parameter is of line type not a table type...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it is taking onley one value but not entire internal table to output parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTPUT is a Parameter of associated type ZMT_PROXY_OUTBOUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and ZMT_PROXY_OUTBOUND has a component  MT_PROXY_OUTBOUND of type DT_PROXY_OUTBOUND and DT_PROXY_OUTBOUND has components MATNR and ERNAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now plase say me how to modify my internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnaks and Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 11:19:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974525#M949309</guid>
      <dc:creator>vijay_kumar133</dc:creator>
      <dc:date>2008-06-17T11:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting internal table in a oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974526#M949310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is with the output parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might be I'll give you the background and then explain you the problem. This may help.&lt;/P&gt;&lt;P&gt;In the older release of ABAP there used to be Tables as one of the tabs where one could import/export tables to/from the FM. The problem was that it would difficult to identify what table are being imported and what are bein exported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So with later releases of ABAP this tab was removed and currently there are Exporting/Importing/Changing tabs. You can use changing in your case if you are passing the table to modify the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem.&lt;/P&gt;&lt;P&gt;As stated above the OUTPUT is a line type (means structure) while IT is a internal table with header lines. So the record in the wa of this table is only transferred to OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What needs to be done.&lt;/P&gt;&lt;P&gt;You need to change the type of the OUTPUT to table type. I am not sure if you know about table type.&lt;/P&gt;&lt;P&gt;You can create a Table Type is se11 under Data Type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 05:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974526#M949310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T05:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting internal table in a oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974527#M949311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;go to class builder and define method's parameter like &lt;EM&gt;changing&lt;/EM&gt;, not like &lt;EM&gt;exporting&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 06:14:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-in-a-oops/m-p/3974527#M949311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T06:14:28Z</dc:date>
    </item>
  </channel>
</rss>

