<?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: reg : Function module. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817103#M349731</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 can specify the types of interface parameters in function modules in the same way as the parameter interfaces of subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt; Import parameters:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; These must be supplied with data when you call the function module,&lt;/P&gt;&lt;P&gt;unless they are flagged as optional. You cannot change them in the function module.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt; Export parameters:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; These pass data from the function module back to the calling program.&lt;/P&gt;&lt;P&gt;Export parameters are always optional. You do not have to receive them in your program.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Changing parameters:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; These must be supplied with data when you call the function module,&lt;/P&gt;&lt;P&gt;unless they are flagged as optional. They can be changed in the function module. The changed values are then returned to the calling program.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Tables parameters:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; You use these to pass internal tables. They are treated like CHANGING&lt;/P&gt;&lt;P&gt;parameters. However, you can also pass internal tables with other parameters if you specify the parameter type appropriately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can specify the types of the interface parameters, either by referring to ABAP&lt;/P&gt;&lt;P&gt;Dictionary types or elementary ABAP types. When you call a function module, you must&lt;/P&gt;&lt;P&gt;ensure that the actual parameter and the interface parameters are compatible.&lt;/P&gt;&lt;P&gt;Interface parameters are, by default, passed by value. However, they can also be&lt;/P&gt;&lt;P&gt;passed by reference. Tables parameters can only be passed by reference. You can&lt;/P&gt;&lt;P&gt;assign default values to optional importing and changing parameters. If an optional&lt;/P&gt;&lt;P&gt;parameter is not passed in a function module call, it either has an initial value, or is set to&lt;/P&gt;&lt;P&gt;the default value.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Exceptions&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; are used to handle errors that occur in function modules. The calling&lt;/P&gt;&lt;P&gt;program checks whether any errors have occurred and then takes action accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at below links.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801f02454211d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801f02454211d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Jan 2007 12:16:42 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2007-01-27T12:16:42Z</dc:date>
    <item>
      <title>reg : Function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817102#M349730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends..&lt;/P&gt;&lt;P&gt;i want to know ,&lt;/P&gt;&lt;P&gt;what is the purpose of import, export,changing, tables parameters ?&lt;/P&gt;&lt;P&gt;how we handle exception in functional module?&lt;/P&gt;&lt;P&gt;explain with some eg?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 12:11:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817102#M349730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-27T12:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: reg : Function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817103#M349731</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 can specify the types of interface parameters in function modules in the same way as the parameter interfaces of subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt; Import parameters:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; These must be supplied with data when you call the function module,&lt;/P&gt;&lt;P&gt;unless they are flagged as optional. You cannot change them in the function module.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt; Export parameters:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; These pass data from the function module back to the calling program.&lt;/P&gt;&lt;P&gt;Export parameters are always optional. You do not have to receive them in your program.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Changing parameters:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; These must be supplied with data when you call the function module,&lt;/P&gt;&lt;P&gt;unless they are flagged as optional. They can be changed in the function module. The changed values are then returned to the calling program.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Tables parameters:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; You use these to pass internal tables. They are treated like CHANGING&lt;/P&gt;&lt;P&gt;parameters. However, you can also pass internal tables with other parameters if you specify the parameter type appropriately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can specify the types of the interface parameters, either by referring to ABAP&lt;/P&gt;&lt;P&gt;Dictionary types or elementary ABAP types. When you call a function module, you must&lt;/P&gt;&lt;P&gt;ensure that the actual parameter and the interface parameters are compatible.&lt;/P&gt;&lt;P&gt;Interface parameters are, by default, passed by value. However, they can also be&lt;/P&gt;&lt;P&gt;passed by reference. Tables parameters can only be passed by reference. You can&lt;/P&gt;&lt;P&gt;assign default values to optional importing and changing parameters. If an optional&lt;/P&gt;&lt;P&gt;parameter is not passed in a function module call, it either has an initial value, or is set to&lt;/P&gt;&lt;P&gt;the default value.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Exceptions&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; are used to handle errors that occur in function modules. The calling&lt;/P&gt;&lt;P&gt;program checks whether any errors have occurred and then takes action accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at below links.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801f02454211d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801f02454211d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 12:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817103#M349731</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-01-27T12:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: reg : Function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817104#M349732</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;The fm is like a box and a program can't see inside this box, so it can only communicate with the it through the interface of fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interface is constituted by the IMPORT, EXPORT, CHANGING, TABLE parameters and EXCEPTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- IMPORT parameters are the parameter to transfer the data from program to funcion module: they can't be changed by the fm;&lt;/P&gt;&lt;P&gt;- EXPORT parameter are the parameter to transfer the data from function module to program: they can be changed by fm;&lt;/P&gt;&lt;P&gt;-  CHANGING is a parameter is like IMPORT and EXPORT parameter at the same moment;&lt;/P&gt;&lt;P&gt;- TABLE is to transfer the data of an internal table from and to fm &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 12:22:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817104#M349732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-27T12:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: reg : Function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817105#M349733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Below are the meanings of the interface parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import-for importing the values to the FM.&lt;/P&gt;&lt;P&gt;export-for exporting the values from FM.&lt;/P&gt;&lt;P&gt;changing-for importing and exporting back.&lt;/P&gt;&lt;P&gt;tables-for transferring internal tables.Rarely used in normal FM.&lt;/P&gt;&lt;P&gt;exception-for handling exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jan 2007 06:20:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817105#M349733</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2007-01-28T06:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: reg : Function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817106#M349734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Selva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Documentation&lt;/P&gt;&lt;P&gt;The documentation describes the purpose of the function module, lists the parameters&lt;/P&gt;&lt;P&gt;for passing data to and from the module, and the exceptions. It tells you how you can&lt;/P&gt;&lt;P&gt;pass data to and from the function module, and which errors it handles.&lt;/P&gt;&lt;P&gt;2) Interface parameters and exceptions&lt;/P&gt;&lt;P&gt;This section provides further information about the interface parameters and exceptions,&lt;/P&gt;&lt;P&gt;and how to use the function module. For further information, refer to Displaying&lt;/P&gt;&lt;P&gt;Information about Interface Parameters [Ext.] in the ABAP Workbench documentation.&lt;/P&gt;&lt;P&gt;Function modules can have the following interface parameters:  &lt;/P&gt;&lt;P&gt;3) Import parameters. These must be supplied with data when you call the function module,&lt;/P&gt;&lt;P&gt;unless they are flagged as optional. You cannot change them in the function module.&lt;/P&gt;&lt;P&gt;4) Export parameters. These pass data from the function module back to the calling program.&lt;/P&gt;&lt;P&gt;Export parameters are always optional. You do not have to receive them in your program.&lt;/P&gt;&lt;P&gt;5) Changing parameters. These must be supplied with data when you call the function module,&lt;/P&gt;&lt;P&gt;unless they are flagged as optional. They can be changed in the function module. The&lt;/P&gt;&lt;P&gt;changed values are then returned to the calling program.&lt;/P&gt;&lt;P&gt;6) Tables parameters. You use these to pass internal tables. They are treated like CHANGING&lt;/P&gt;&lt;P&gt;parameters. However, you can also pass internal tables with other parameters if you specify&lt;/P&gt;&lt;P&gt;the parameter type appropriately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the EXCEPTIONS option to handle the exceptions of the function module. If an&lt;/P&gt;&lt;P&gt;exception &amp;lt;ei&amp;gt; is raised while the function module is running, the system terminates the function&lt;/P&gt;&lt;P&gt;module and does not pass any values from the function module to the program, except those that&lt;/P&gt;&lt;P&gt;were passed by reference. If &amp;lt;ei&amp;gt; is specified in the EXCEPTION option, the calling program&lt;/P&gt;&lt;P&gt;handles the exception by assigning &amp;lt;ri&amp;gt; to SY-SUBRC. &amp;lt;ri&amp;gt; must be a numeric literal.&lt;/P&gt;&lt;P&gt;If you specify of ERROR_MESSAGE in the exception list you can influence the message&lt;/P&gt;&lt;P&gt;handling of function modules. Normally, you should only call messages in function modules using&lt;/P&gt;&lt;P&gt;the MESSAGE ... RAISING statement. With ERROR_MESSAGE you can force the system to&lt;/P&gt;&lt;P&gt;treat messages that are called without the RAISING option in a function module as follows:&lt;/P&gt;&lt;P&gt;  Messages of classes S, I, and W are ignored (but written to the log in a background job).&lt;/P&gt;&lt;P&gt;  Messages of classes E and A stop the function module as if the exception&lt;/P&gt;&lt;P&gt;ERROR_MESSAGE had occurred (SY-SUBRC is set to &amp;lt;rE&amp;gt;).&lt;/P&gt;&lt;P&gt;If you specify OTHERS after EXCEPTIONS, the system assigns a single return code to all other&lt;/P&gt;&lt;P&gt;exceptions that you have not specified explicitly in the list.&lt;/P&gt;&lt;P&gt;You can use the same number &amp;lt;ri&amp;gt; for several exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2007 18:27:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/1817106#M349734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-29T18:27:30Z</dc:date>
    </item>
  </channel>
</rss>

