<?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: Function Module IMPORT structures not recognized in form subroutines in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272360#M150641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I do believe my question's been answered.  I've learned a lot.  Points awarded for everyone -- thanks guys!  I'm about to post one more issue I'm having, so please take a look at my new thread if you can and see if you can assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Apr 2006 13:50:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-13T13:50:51Z</dc:date>
    <item>
      <title>Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272352#M150633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did some searching on SDN and didn't find the answer, so I apologize if this has been covered before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just finished my first Function Module.  It's a remote-enabled (RFC) function that will be called by XI to do some processing.  I have two components declared on the IMPORT tab, which we'll call "A" and "B".  Both "A" and "B" are defined with a user type, each of which is a simple structure of 4-5 fields each.  My Function Module also has two tables, and these are defined on the TABLES tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my problem:  When I do a syntax check, I get an error telling me that "A" and "B" are unknown.  However, I only get this error where I reference "A" or "B" in the FORM subroutines I have declared at the end of my function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my other data declarations defined globally in the "LZ...TOP" Include for my Function Module, so those don't pose a problem.  But these are my Function Module parameters, so I can't go "declare" those as I already have them defined on the appropriate tabs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way for me to get around this error and have them recognized globally, or do I have to resort to moving the values to some globally-declared "hold" field?  I'm hesitant to have to add them as parameters passed into the FORM routines because I pretty much reference each of the fields within the structures for "A" and "B".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks everyone.  Points definitely awarded for helpful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:28:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272352#M150633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272353#M150634</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;&lt;/P&gt;&lt;P&gt;You need to do this way....with using and Tables parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM FORMNAME USING PARAMETERS.

FORM FORMNAME USING PARAMETERS.
"here you can access the parameters
"Coding

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:33:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272353#M150634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272354#M150635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The parameters are visible only in the main program of the function module. So, if the subroutines are directly in the main function, they you should not have a issue. But if you subroutines in an include and you are calling them in the main function, then the paramters are not visible in the subroutines. In that case you will have to hold the values in a globally declared tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you will have to pass them as parameters to Sub routines as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;note : please mark the helpful answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravikumar Allampallam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:33:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272354#M150635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272355#M150636</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;    U need to pass these IMPORT parameters as actual&lt;/P&gt;&lt;P&gt;    parameters and in the FORM subroutines use as &lt;/P&gt;&lt;P&gt;    formal parameters.&lt;/P&gt;&lt;P&gt;    U cannot use them directly in the FORM subroutines&lt;/P&gt;&lt;P&gt;    as the scope of these Parameters are limited for&lt;/P&gt;&lt;P&gt;    the FM only.&lt;/P&gt;&lt;P&gt;    The FORM subroutines exist independently and cannot&lt;/P&gt;&lt;P&gt;    recognize the parameters of the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;GSR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:40:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272355#M150636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272356#M150637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ravikumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's weird, because my subroutines ARE in the main function.  I mean, it's like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION ABC.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;perform myform1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;perform myform2.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM myform1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM myform2.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have them in any include.  So you're saying I shouldn't be having an issue trying to reference the parameters set up for my Function Module "ABC" in FORM myform1 or FORM myform2?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:42:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272356#M150637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272357#M150638</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;  write the coding as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION ABC.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;perform myform1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;perform myform2.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM myform1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM myform2.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&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;GSR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:44:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272357#M150638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272358#M150639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you have already close ENDFUNCTION, you cannot access them, you will have to declare them globally and use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you cannot write the subroutine before the ENDFUNCTIOn as ABAP does not support nesting of subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravikumar Allampallam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:45:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272358#M150639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272359#M150640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srinivas, I originally tried that, but I get an error on the last FORM statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Incorrect nesting: Before the statement 'FORM', the structure introduced by 'FUNCTION' must be concluded by 'ENDFUNCTION'."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it wants the ENDFUNCTION placed at the end.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272359#M150640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module IMPORT structures not recognized in form subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272360#M150641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I do believe my question's been answered.  I've learned a lot.  Points awarded for everyone -- thanks guys!  I'm about to post one more issue I'm having, so please take a look at my new thread if you can and see if you can assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2006 13:50:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-import-structures-not-recognized-in-form-subroutines/m-p/1272360#M150641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-13T13:50:51Z</dc:date>
    </item>
  </channel>
</rss>

