<?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: How to export data in export parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103110#M1184050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepika.&lt;/P&gt;&lt;P&gt;plz follow up the following steps. i have understood ur problem and now i have made it again changed according to ur need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1) Create the function. which i think u have already created and paste the code given below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION ztn_test_d.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------


    TABLES: t005t , t005.
    DATA: BEGIN OF ty_country1 OCCURS 150,
    landx LIKE t005t-landx,
    intca LIKE t005-intca,
    END OF ty_country1.
    DATA: ty_country LIKE STANDARD TABLE OF ty_country1 WITH HEADER LINE WITH KEY intca.
**data: it_countrylist TYPE SORTED TABLE OF ty_countrylist WITH UNIQUE KEY intca.

    "data: wa_countrylist TYPE ty_COUNTRY.
    DATA: wa_countrylist LIKE ty_country.
    DATA: t_ex_country LIKE STANDARD TABLE OF ty_country.

    SELECT t005t~landx t005~intca INTO CORRESPONDING FIELDS OF TABLE ty_country
    FROM t005t
    INNER JOIN t005 ON ( t005t~land1 = t005~land1 ).

*    READ TABLE ty_country INTO wa_countrylist WITH  KEY intca = wa_countrylist-intca.
*
*    APPEND wa_countrylist TO t_ex_country.

itab_out[] = ty_country[].

  ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2) Instead of writing in function export parameters write this in function " Changing " Tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In parameter Name write the "ITAB_OUT" in type parameter write " TYPE" and in Associated type write the " ZDEP_COUNTRY_TABTYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3) Now i will tell u the steps to make the table type ZDEP_COUNTRY_TABTYPE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Feb 2009 05:25:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-04T05:25:40Z</dc:date>
    <item>
      <title>How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103102#M1184042</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;I have written the below code.Now i want to export data into an export parameter which is a structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: t005t  , t005.&lt;/P&gt;&lt;P&gt;data: BEGIN OF ty_countrylist occurs 100,&lt;/P&gt;&lt;P&gt;        landx like t005t-landx,&lt;/P&gt;&lt;P&gt;        intca like t005-intca,&lt;/P&gt;&lt;P&gt;        END OF ty_countrylist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT t005t&lt;SUB&gt;landx t005&lt;/SUB&gt;intca   into CORRESPONDING FIELDS OF TABLE ty_countrylist&lt;/P&gt;&lt;P&gt;  from T005t&lt;/P&gt;&lt;P&gt;  INNER JOIN t005 on ( t005t&lt;SUB&gt;land1 = t005&lt;/SUB&gt;land1 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can some one suggest how can that be done. The export parameter is a structure with two elments.&lt;/P&gt;&lt;P&gt;T_EX_COUNTRY---1)LANDX- LANDX[CHAR(15)] and 2) ISOCODE- INTCA[CHAR(2)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried creating internal table and work areas but it didnt work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 13:11:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103102#M1184042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T13:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103103#M1184043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess T_EX_COUNTRY is a structure right? If so this is the way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: BEGIN OF t_ex_country,
landx like t005t-landx,
intca like t005-intca,
END OF t_ex_country.

t_ex_country-landx = '01'.
t_ex_country-intca = '01'.

export structure = t_ex_country to MEMORY ID 'STRUCT'.

clear t_ex_country.
write: / 'After export and clear',
       t_ex_country-landx,
       t_ex_country-intca.

import structure = t_ex_country from MEMORY ID 'STRUCT'.

write: / 'After import',
       t_ex_country-landx,
       t_ex_country-intca.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 13:22:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103103#M1184043</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-02-03T13:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103104#M1184044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the way i have implemented.Error that i am getting is : Type "ty_COUNTRY" is unknown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_COUNTRYLIST_GET.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(T_EX_COUNTRY) TYPE  ZCONTRY&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;tables: t005t  , t005.&lt;/P&gt;&lt;P&gt;data: BEGIN OF ty_COUNTRY occurs 150,&lt;/P&gt;&lt;P&gt;        landx like t005t-landx,&lt;/P&gt;&lt;P&gt;        intca like t005-intca,&lt;/P&gt;&lt;P&gt;        END OF ty_COUNTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**data: it_countrylist TYPE SORTED TABLE OF ty_countrylist WITH UNIQUE KEY intca.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_countrylist  TYPE ty_COUNTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT t005t&lt;SUB&gt;landx t005&lt;/SUB&gt;intca   into CORRESPONDING FIELDS OF TABLE ty_COUNTRY&lt;/P&gt;&lt;P&gt;  from T005t&lt;/P&gt;&lt;P&gt;  INNER JOIN t005 on ( t005t&lt;SUB&gt;land1 = t005&lt;/SUB&gt;land1 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE ty_COUNTRY INTO wa_countrylist&lt;/P&gt;&lt;P&gt;                     WITH TABLE KEY intca = wa_countrylist-intca.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND ty_countrylist TO T_EX_COUNTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 13:33:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103104#M1184044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T13:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103105#M1184045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_countrylist TYPE ty_COUNTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: wa_countrylist LIKE LINE OF ty_COUNTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is because &lt;STRONG&gt;ty_country&lt;/STRONG&gt; is an intenral table not a type. That's wy your structure must be like line of this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 13:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103105#M1184045</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-02-03T13:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103106#M1184046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi deepika.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have make changes in ur code . now it contains no error.&lt;/P&gt;&lt;P&gt;just copy and paste it in ur function editor window.&lt;/P&gt;&lt;P&gt;and then do tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION Z_COUNTRYLIST_GET.
*"----------------------------------------------------------------------
""Local Interface:
*" EXPORTING
*" VALUE(T_EX_COUNTRY) TYPE ZCONTRY
*"----------------------------------------------------------------------
TABLES: t005t , t005.
DATA: BEGIN OF ty_country1 OCCURS 150,
landx LIKE t005t-landx,
intca LIKE t005-intca,
END OF ty_country1.
data: ty_country like STANDARD TABLE OF ty_country1 WITH HEADER LINE with key intca.
**data: it_countrylist TYPE SORTED TABLE OF ty_countrylist WITH UNIQUE KEY intca.

"data: wa_countrylist TYPE ty_COUNTRY.
DATA: wa_countrylist LIKE ty_country.
data: t_ex_country like STANDARD TABLE OF ty_country.

SELECT t005t~landx t005~intca INTO CORRESPONDING FIELDS OF TABLE ty_country
FROM t005t
INNER JOIN t005 ON ( t005t~land1 = t005~land1 ).

READ TABLE ty_country INTO wa_countrylist WITH  KEY intca = wa_countrylist-intca.

APPEND wa_countrylist TO t_ex_country.

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and do tell me what do u want from these two lines.&lt;/P&gt;&lt;P&gt;means after selecting data what do u want from the filled internal table and on which criteria.&lt;/P&gt;&lt;P&gt;plz tell so that i made it change according to ur need.&lt;/P&gt;&lt;P&gt;after these two lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;READ TABLE ty_country INTO wa_countrylist WITH  KEY intca = wa_countrylist-intca.

APPEND wa_countrylist TO t_ex_country.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tahir naqqash on Feb 3, 2009 6:56 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 13:50:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103106#M1184046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T13:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103107#M1184047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tahir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even this didnt work.Its giving me an error "T_EX_Country has already been declared".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My main motive is to extract country names and thier ISO codes from the table and put them in an export parameter.Now the export parameter that i have created is a &lt;STRONG&gt;structure&lt;/STRONG&gt; which has two elements.&lt;/P&gt;&lt;P&gt;One for Country names which is Char(15) and another for ISO codes which is Char(2). That is why i have written those two lines of code. That is, i am trying to put the fetched data into an internal table and then reading the internal table into a work area and finally then that work area is appended to the export parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically me requirement is to put the data that is fetced from the table into my export parameter so that i can access that data for further processing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 05:03:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103107#M1184047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-04T05:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103108#M1184048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; Hi Tahir,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Even this didnt work.Its giving me an error "T_EX_Country has already been declared".&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; My main motive is to extract country names and thier ISO codes from the table and put them in an export parameter.Now the export parameter that i have created is a &lt;STRONG&gt;structure&lt;/STRONG&gt; which has two elements.&lt;/P&gt;&lt;P&gt;&amp;gt; One for Country names which is Char(15) and another for ISO codes which is Char(2). That is why i have written those two lines of code. That is, i am trying to put the fetched data into an internal table and then reading the internal table into a work area and finally then that work area is appended to the export parameter.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Basically me requirement is to put the data that is fetced from the table into my export parameter so that i can access that data for further processing.&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the functionality of your FM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see there are no import parameters to the FM, only export.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also ZCONTRY is a structure. Then you have to create a Table Type for ZCONTRY in SE11 to use T_EX_COUNTRY as a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else declare T_EX_COUNTRY as tables parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
T_EX_COUNTRY	LIKE	T005T
FUNCTION Z_COUNTRYLIST_GET.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      T_EX_COUNTRY STRUCTURE  T005T
*"----------------------------------------------------------------------

ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you plz clarify?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Feb 4, 2009 10:41 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 05:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103108#M1184048</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-02-04T05:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103109#M1184049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My simple objective is to call the FM without any parameters and return the data that is fetched from the table to the calling function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is why i dont have import parameters only export&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 05:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103109#M1184049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-04T05:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103110#M1184050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepika.&lt;/P&gt;&lt;P&gt;plz follow up the following steps. i have understood ur problem and now i have made it again changed according to ur need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1) Create the function. which i think u have already created and paste the code given below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION ztn_test_d.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------


    TABLES: t005t , t005.
    DATA: BEGIN OF ty_country1 OCCURS 150,
    landx LIKE t005t-landx,
    intca LIKE t005-intca,
    END OF ty_country1.
    DATA: ty_country LIKE STANDARD TABLE OF ty_country1 WITH HEADER LINE WITH KEY intca.
**data: it_countrylist TYPE SORTED TABLE OF ty_countrylist WITH UNIQUE KEY intca.

    "data: wa_countrylist TYPE ty_COUNTRY.
    DATA: wa_countrylist LIKE ty_country.
    DATA: t_ex_country LIKE STANDARD TABLE OF ty_country.

    SELECT t005t~landx t005~intca INTO CORRESPONDING FIELDS OF TABLE ty_country
    FROM t005t
    INNER JOIN t005 ON ( t005t~land1 = t005~land1 ).

*    READ TABLE ty_country INTO wa_countrylist WITH  KEY intca = wa_countrylist-intca.
*
*    APPEND wa_countrylist TO t_ex_country.

itab_out[] = ty_country[].

  ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2) Instead of writing in function export parameters write this in function " Changing " Tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In parameter Name write the "ITAB_OUT" in type parameter write " TYPE" and in Associated type write the " ZDEP_COUNTRY_TABTYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3) Now i will tell u the steps to make the table type ZDEP_COUNTRY_TABTYPE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 05:25:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103110#M1184050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-04T05:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103111#M1184051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Deepika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the simple solution goes some thing like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION z_countrylist_get.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      T_EX_COUNTRY STRUCTURE  ZTEST_STRUC
*"----------------------------------------------------------------------

  SELECT t005t~landx t005~intca INTO TABLE t_ex_country
  FROM   t005t INNER JOIN t005 ON t005t~land1 = t005~land1.

  IF sy-subrc = 0.
    SORT t_ex_country BY landx.
  ENDIF.

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you need a FM to write a SELECT stmt? Any specific reason?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Tahir: Do you need a separate table for this purpose ??? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Feb 4, 2009 11:00 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 05:30:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103111#M1184051</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-02-04T05:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103112#M1184052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To Make table type ist u have to make the structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step1) Goto SE 11. Choose DATA TYPE radio button. Write in it ZDEP_COUNTRY_STRUCTURE and then press create button. And now choose the structure radio button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step2) Now give the both two data elements as u told that country name and it's ISO code  and their CHAR Types with length as u mentiond. Activate it. It will show u warnings and then will become active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3) Goto Se11 Again) Choose DATA TYPE radio button. Write in it ZDEP_COUNTRY_TABTYPE which we have to passed in CHANGING Parameter of function. Then press Create And now choose the " TABLE TYPE".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STep 4) Give short Text and in Line Type Give the name of structure which u have made in ist step . ANd activate it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now when u call ur function in test program. it will return u the country names with theiir iso codes in table itab_out[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry Suhas. I missed to remove extra lines of code.&lt;/P&gt;&lt;P&gt;Now Mr. Deepika Just made it As&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: t005t , t005.
    DATA: BEGIN OF ty_country OCCURS 150,
    landx LIKE t005t-landx,
    intca LIKE t005-intca,
    END OF ty_country.

    SELECT t005t~landx t005~intca INTO CORRESPONDING FIELDS OF TABLE ty_country
    FROM t005t
    INNER JOIN t005 ON ( t005t~land1 = t005~land1 ).


itab_out[] = ty_country[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tahir naqqash on Feb 4, 2009 10:37 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tahir naqqash on Feb 4, 2009 10:39 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 05:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103112#M1184052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-04T05:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103113#M1184053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And in your main program call function just like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztn_test.

data: itab type zdep_country_tabtype WITH HEADER LINE.


CALL FUNCTION 'FUNCTION U CREATED'
  CHANGING
    itab_out       = itab[].
          .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and now itab contain the country names with their iso codes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 05:49:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103113#M1184053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-04T05:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103114#M1184054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not calling this FM from another FM. I am calling it from a java program in web dynpro aaplication.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 06:40:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103114#M1184054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-04T06:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data in export parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103115#M1184055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oops!!!!!!!!!!&lt;/P&gt;&lt;P&gt;i have made this function to call it main program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 06:48:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-export-data-in-export-parameter/m-p/5103115#M1184055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-04T06:48:26Z</dc:date>
    </item>
  </channel>
</rss>

