<?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: Functional module /table vs changing parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906799#M1482261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I did try to pass content of internal table by adding square brackets  after internal table name , but error ( short dump ) remains same .&lt;/P&gt;&lt;P&gt;I am suprised because  internal table is declared after the same DB table like FM parameter. &lt;/P&gt;&lt;P&gt;I declared changing parameter instead table parameter because  TABLE parameter is obsolete and not any more accepted. &lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is error description &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An exception occurred that is explained in detail below. &lt;/P&gt;&lt;P&gt;The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', &lt;/P&gt;&lt;P&gt;not caught and &lt;/P&gt;&lt;P&gt;therefore caused a runtime error. &lt;/P&gt;&lt;P&gt;The reason for the exception is: &lt;/P&gt;&lt;P&gt;The call to the function module "Z_WM_UPD_ZDTS_GR" is incorrect: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module interface allows you to specify only &lt;/P&gt;&lt;P&gt;fields of a particular type under "CARTSCAN". &lt;/P&gt;&lt;P&gt;The field "GT_CARTSCAN[]" specified here is a different &lt;/P&gt;&lt;P&gt;field type &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 May 2010 12:21:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-17T12:21:53Z</dc:date>
    <item>
      <title>Functional module /table vs changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906796#M1482258</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 am working in release 6.0 . &lt;/P&gt;&lt;P&gt;In program i have internal table and i have to pass it's content to FM. In FM  I tried to declare TABLE parameter but it was not accepted because table parameter is obsolete. I declare Change parameter.  like it was suggested in error message dialog.The parameter is declared after same table like internal table from program . &lt;/P&gt;&lt;P&gt;When I run program I saw that only one record is passed to FM parameter. Question is how to pass whole body content of IT to FM parameter . &lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source code / &lt;/P&gt;&lt;P&gt;- gt_cartscan &amp;amp; cartscan are created after the same DB table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at scantbl. &lt;/P&gt;&lt;P&gt;  gt_cartscan-zzcartag = scantbl-zzcartag. &lt;/P&gt;&lt;P&gt;  append gt_cartscan. &lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'Z_WM_UPD_ZDTS_GR' &lt;/P&gt;&lt;P&gt;  changing &lt;/P&gt;&lt;P&gt;    cartscan       = gt_cartscan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 11:53:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906796#M1482258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-17T11:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Functional module /table vs changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906797#M1482259</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;You probably defined gt_cartscan with header line, so pass that table as gt_cartscan[]. Probably you have to change the type of the changing parameter into a table type as well...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Gerd Rother&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 12:05:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906797#M1482259</guid>
      <dc:creator>gerd_rother</dc:creator>
      <dc:date>2010-05-17T12:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Functional module /table vs changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906798#M1482260</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;See the below example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:begin of ty_employee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pernr type pa0002-pernr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;begda type pa0002-begda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endda type pa0002-endda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vorna type pa0002-vorna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nachn type pa0002-nachn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of ty_employee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Declate a types for employee data table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:tt_employee  type  standard  table  of  ty_employee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*//Declate a workarea  to hold the Employee data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gf_employee     type  ty_employee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Declate a table  to hold the Employee data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gt_employee     type  tt_employee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Letz say the gt_employee has 5 records when it is populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you have all the records of gt_employee when called through below perform in the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;perform shuffle_records changing gt_employee.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  SHUFFLE_RECORDS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_GT_EMPLOYEE[]  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form shuffle_records  changing p_gt_employee type tt_employee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " SHUFFLE_RECORDS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 12:16:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906798#M1482260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-17T12:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Functional module /table vs changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906799#M1482261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I did try to pass content of internal table by adding square brackets  after internal table name , but error ( short dump ) remains same .&lt;/P&gt;&lt;P&gt;I am suprised because  internal table is declared after the same DB table like FM parameter. &lt;/P&gt;&lt;P&gt;I declared changing parameter instead table parameter because  TABLE parameter is obsolete and not any more accepted. &lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is error description &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An exception occurred that is explained in detail below. &lt;/P&gt;&lt;P&gt;The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', &lt;/P&gt;&lt;P&gt;not caught and &lt;/P&gt;&lt;P&gt;therefore caused a runtime error. &lt;/P&gt;&lt;P&gt;The reason for the exception is: &lt;/P&gt;&lt;P&gt;The call to the function module "Z_WM_UPD_ZDTS_GR" is incorrect: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module interface allows you to specify only &lt;/P&gt;&lt;P&gt;fields of a particular type under "CARTSCAN". &lt;/P&gt;&lt;P&gt;The field "GT_CARTSCAN[]" specified here is a different &lt;/P&gt;&lt;P&gt;field type &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 12:21:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906799#M1482261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-17T12:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Functional module /table vs changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906800#M1482262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is because you have the parameter typed as &lt;EM&gt;line of DB table&lt;/EM&gt; not a &lt;EM&gt;type table&lt;/EM&gt; . I.e &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"Interface of FM
FUNCTION '....'
    CHANGING
        ct_spfli       TYPE    sflight    "here you need to pass a strcutre which is like line of DB table SFLIGHT
        ct2_spfli     TYPE    FLIGHTTAB    "here the parameter is typed as a table of type SFLIGHT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So in fact all you need is to change the typing to be &lt;STRONG&gt;table type&lt;/STRONG&gt; not a &lt;STRONG&gt;table line&lt;/STRONG&gt; . For this you might have to create new type in DDIC (if there is no such yet defined), then use this type for this parameter. After that pass the content of internal table to this FM as mentioned by Gerd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to declare TABLE parameter but it was not accepted because table parameter is obsolete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I believe you will be able to use that, although not recommended. All obsolete statements are still supported by SAP in order to assure downward compatibility. Anyhow the above (about typings) still applies, not matter whether it's &lt;EM&gt;changing&lt;/EM&gt; or &lt;EM&gt;tables&lt;/EM&gt; parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcin Pciak on May 17, 2010 2:34 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 12:33:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906800#M1482262</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-05-17T12:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Functional module /table vs changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906801#M1482263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a table type for your structure in se11 and use the same table type in changing parameter. May be you have declared your table in Changing parameters using a flat structure.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 12:35:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module-table-vs-changing-parameter/m-p/6906801#M1482263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-17T12:35:36Z</dc:date>
    </item>
  </channel>
</rss>

