<?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: Using function parameters in subroutines in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617904#M276573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;paste ur code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Oct 2006 08:33:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-06T08:33:15Z</dc:date>
    <item>
      <title>Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617903#M276572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;how can I use parameters of a function in subroutines? &lt;/P&gt;&lt;P&gt;I keep getting error saying the fields are 'unknown'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 08:31:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617903#M276572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T08:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617904#M276573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;paste ur code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 08:33:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617904#M276573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T08:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617905#M276574</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 must use them as using  / tables - parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 08:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617905#M276574</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-10-06T08:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617906#M276575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like the problem with the data that is passed to the function module, but not with the parameters of the function module. The subroutine is not able to recognize the data that is passed to the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Pass data to subroutine using syntax &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;  perform subroutine using &amp;lt;field1&amp;gt; &amp;lt;field2&amp;gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(OR)2. Try to define the data globally that you want to pass to the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramakrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 08:41:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617906#M276575</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-10-06T08:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617907#M276576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you must use them as using / tables - parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes I am doing that. I have different table parameters (P0000, P0001, P0002).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a subroutine where I use these tables, but then I get the error that the fields are unknown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This subroutine is in an include in the same function group&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 08:43:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617907#M276576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T08:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617908#M276577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is the code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION Z_TEST. 
*"---------------------------------------------------------------------- 
*"*"Local interface: 
*"  IMPORTING 
*"     VALUE(DRUN) TYPE  DATS 
*"  TABLES 
*"      P0000 STRUCTURE  P0000 
*"      P0001 STRUCTURE  P0001 
*"      P0002 STRUCTURE  P0002 
*"      P0006 STRUCTURE  P0006 
*"      P0016 STRUCTURE  P0016 
*"      P0021 STRUCTURE  P0021 
*"      P0100 STRUCTURE  P0100 
*"      P0108 STRUCTURE  P0108 
*"      P0109 STRUCTURE  P0109 
*"      P0138 STRUCTURE  P0138 
*"---------------------------------------------------------------------- 

  PERFORM delete_future_and_sort_desc. 

ENDFUNCTION.


FORM delete_future_and_sort_desc. 
  DELETE: p0000 WHERE begda GT drun, 
          p0001 WHERE begda GT drun, 
          p0002 WHERE begda GT drun, 
          p0006 WHERE begda GT drun, 
          p0016 WHERE begda GT drun, 
          p0021 WHERE begda GT drun, 
          p0100 WHERE begda GT drun, 
          p0108 WHERE begda GT drun, 
          p0109 WHERE begda GT drun, 
          p0138 WHERE begda GT drun. 

  SORT: p0000 BY endda DESCENDING, 
        p0001 BY endda DESCENDING, 
        p0002 BY endda DESCENDING, 
        p0006 BY endda DESCENDING, 
        p0016 BY endda DESCENDING, 
        p0021 BY endda DESCENDING, 
        p0100 BY endda DESCENDING, 
        p0138 BY endda DESCENDING. 
ENDFORM.   

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 08:46:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617908#M276577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T08:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617909#M276578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Dave&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Please make the highlighted changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; this is the code:&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;gt; FUNCTION Z_TEST. 
&amp;gt; *"----------------------------------------------------
&amp;gt; ------------------ 
&amp;gt; *"*"Local interface: 
&amp;gt; *"  IMPORTING 
&amp;gt; *"     VALUE(DRUN) TYPE  DATS 
&amp;gt; *"  TABLES 
&amp;gt; *"      P0000 STRUCTURE  P0000 
&amp;gt; *"      P0001 STRUCTURE  P0001 
&amp;gt; *"      P0002 STRUCTURE  P0002 
&amp;gt; *"      P0006 STRUCTURE  P0006 
&amp;gt; *"      P0016 STRUCTURE  P0016 
&amp;gt; *"      P0021 STRUCTURE  P0021 
&amp;gt; *"      P0100 STRUCTURE  P0100 
&amp;gt; *"      P0108 STRUCTURE  P0108 
&amp;gt; *"      P0109 STRUCTURE  P0109 
&amp;gt; *"      P0138 STRUCTURE  P0138 
&amp;gt; *"----------------------------------------------------
&amp;gt; ------------------ 
&amp;gt; 
&amp;gt;   PERFORM delete_future_and_sort_desc
            &amp;lt;b&amp;gt;using drun
            tables p0000 .... to p0138.&amp;lt;/b&amp;gt; 
&amp;gt; 
&amp;gt; ENDFUNCTION.
&amp;gt; 
&amp;gt; 
&amp;gt; FORM delete_future_and_sort_desc
       &amp;lt;b&amp;gt;using drun
       tables p0000 ... p0138.&amp;lt;/b&amp;gt; 
&amp;gt;   DELETE: p0000 WHERE begda GT drun, 
&amp;gt;           p0001 WHERE begda GT drun, 
&amp;gt;           p0002 WHERE begda GT drun, 
&amp;gt;           p0006 WHERE begda GT drun, 
&amp;gt;           p0016 WHERE begda GT drun, 
&amp;gt;           p0021 WHERE begda GT drun, 
&amp;gt;           p0100 WHERE begda GT drun, 
&amp;gt;           p0108 WHERE begda GT drun, 
&amp;gt;           p0109 WHERE begda GT drun, 
&amp;gt;           p0138 WHERE begda GT drun. 
&amp;gt; 
&amp;gt;   SORT: p0000 BY endda DESCENDING, 
&amp;gt;         p0001 BY endda DESCENDING, 
&amp;gt;         p0002 BY endda DESCENDING, 
&amp;gt;         p0006 BY endda DESCENDING, 
&amp;gt;         p0016 BY endda DESCENDING, 
&amp;gt;         p0021 BY endda DESCENDING, 
&amp;gt;         p0100 BY endda DESCENDING, 
&amp;gt;         p0138 BY endda DESCENDING. 
&amp;gt; ENDFORM.   
&amp;gt; 
&amp;gt; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Hope that resolves your error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 08:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617909#M276578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T08:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617910#M276579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i'm getting an error saying 'In LOOP..WHERE.. the line of the table must be statically defined'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 09:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617910#M276579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T09:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using function parameters in subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617911#M276580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If we want to use the parameters&lt;/P&gt;&lt;P&gt;   in some FORM routine, insdie the FM,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then we need to GLOBALIZE like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In se37&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. EDIT&lt;DEL&gt;-&amp;gt;INTERFACE&lt;/DEL&gt;--&amp;gt;GLOBALIZE PARAMETERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. After this, u will be able to use in subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 10:22:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-parameters-in-subroutines/m-p/1617911#M276580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T10:22:00Z</dc:date>
    </item>
  </channel>
</rss>

