<?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 when creating FM. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488722#M838851</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error is very descriptive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lt_data is already declared in your exports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just change the name of the lt_data table, that's it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 15:15:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-29T15:15:21Z</dc:date>
    <item>
      <title>Error when creating FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488721#M838850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to create a FM which will concatenate all Text from a column and give me back as Text String. I want to give the FM a table as Import parameter and export LT_DATA which is a string of text.&lt;/P&gt;&lt;P&gt;This is what I have done:&lt;/P&gt;&lt;P&gt;IMPORT Parameter has the following definiation:&lt;/P&gt;&lt;P&gt;T_LINES TYPE ANY TABLE.&lt;/P&gt;&lt;P&gt;EXPORT Parameter has the following definition:&lt;/P&gt;&lt;P&gt;LT_DATA TYPE STRING.&lt;/P&gt;&lt;P&gt;This is how my code looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*"----------------------------------------------------------------------
"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(T_LINES) TYPE  ANY TABLE
*"  EXPORTING
*"     VALUE(LT_DATA) TYPE  STRING
*"  EXCEPTIONS
*"      NO_DATA
*"----------------------------------------------------------------------

  FIELD-SYMBOLS: &amp;lt;fs_im_tab&amp;gt; TYPE ANY,
                 &amp;lt;fs_comp&amp;gt;   TYPE ANY.

  DATA: lt_data TYPE TABLE OF string.
  DATA: ls_data TYPE string.

  LOOP AT T_LINES ASSIGNING &amp;lt;fs_im_tab&amp;gt; .
    DO.
      ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;fs_im_tab&amp;gt; TO &amp;lt;fs_comp&amp;gt;.
      IF sy-subrc &amp;lt;&amp;gt; 0.
        EXIT.
      ENDIF.
      IF sy-index = 1.
        ls_data = &amp;lt;fs_comp&amp;gt;.
      ELSE.
        CONCATENATE ls_data &amp;lt;fs_comp&amp;gt; INTO ls_data.
      ENDIF.
    ENDDO.
    APPEND ls_data TO lt_data.
  ENDLOOP.
ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I want to activate it , I have the following error:&lt;/P&gt;&lt;P&gt;lt_data is already been defined. Can any body help me to solve this? &lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Nadin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 29, 2008 10:23 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 15:10:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488721#M838850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T15:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error when creating FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488722#M838851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error is very descriptive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lt_data is already declared in your exports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just change the name of the lt_data table, that's it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 15:15:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488722#M838851</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T15:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error when creating FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488723#M838852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. I have changed the lt_data to lw_data and I don't receive any errors but I don't also receive any result. What am I doing wrong from my code. my lt_lines have data in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 15:23:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488723#M838852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T15:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error when creating FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488724#M838853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should change the type of the EXPORTING parameter LT_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create a TABLE TYPE on SE11 and assign it to your parameter...Or you can use an existing one...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example &lt;STRONG&gt;WRB_STRING_TABLE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your code should be like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*"----------------------------------------------------------------------
"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(T_LINES) TYPE  ANY TABLE
*"  EXPORTING
*"     VALUE(LT_DATA) TYPE  WRB_STRING_TABLE
*"  EXCEPTIONS
*"      NO_DATA
*"----------------------------------------------------------------------
 
  FIELD-SYMBOLS: &amp;lt;fs_im_tab&amp;gt; TYPE ANY,
                 &amp;lt;fs_comp&amp;gt;   TYPE ANY.
 
  DATA: ls_data TYPE string.
 
  LOOP AT T_LINES ASSIGNING &amp;lt;fs_im_tab&amp;gt; .
    DO.
      ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;fs_im_tab&amp;gt; TO &amp;lt;fs_comp&amp;gt;.
      IF sy-subrc  0.
        EXIT.
      ENDIF.
      IF sy-index = 1.
        ls_data = &amp;lt;fs_comp&amp;gt;.
      ELSE.
        CONCATENATE ls_data &amp;lt;fs_comp&amp;gt; INTO ls_data.
      ENDIF.
    ENDDO.
    APPEND ls_data TO lt_data.
  ENDLOOP.
ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetigns,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 15:29:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488724#M838853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T15:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error when creating FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488725#M838854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you just move lt_data to tables?&lt;/P&gt;&lt;P&gt;That way just don't declare it in your function module and do whatever you want with it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 15:31:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-creating-fm/m-p/3488725#M838854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T15:31:32Z</dc:date>
    </item>
  </channel>
</rss>

