<?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: pass value from program to function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393852#M814892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For passing hard-coded values pass them into a variable of the appropriate type and pass the variable to the function module by assigning the variable to the appropriate parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,Internal Tables are passed to FMs ,so populate the IT prior to passing it to the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need more share it with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2008 06:13:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-21T06:13:02Z</dc:date>
    <item>
      <title>pass value from program to function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393848#M814888</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 want to call program from Function Module. then i want to pass some value from program to that Function module.how do i transfer value from program to FUNCTION MODULE.&lt;/P&gt;&lt;P&gt;reply ASAP.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;supriya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 06:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393848#M814888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T06:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: pass value from program to function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393849#M814889</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 pass values to the function module through the IMPORTING or TABLE parameter of the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. if you want to pass a material number to the function module, you create a IMPORTING parameter in the function module as e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_MATNR TYPE MATNR_D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then when calling the function module through patten (Crtl + F6) function, you shall get the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZFM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;  I_MATNR = v_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As shown above, you pass the variable v_matnr from program to function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Aditya Laud on Feb 21, 2008 1:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 06:05:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393849#M814889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T06:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: pass value from program to function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393850#M814890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey call that function module in program and pass values to that by specifieng the parameters existing in that function module . when you call thee FM autometically it ask for some parameters values h=just pass values to that parameters ok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 06:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393850#M814890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T06:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: pass value from program to function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393851#M814891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;&lt;SPAN __default_attr="sylfaen" __jive_macro_name="font"&gt;&lt;SPAN __default_attr="15" __jive_macro_name="size"&gt;
You can try using:

&lt;PRE&gt;&lt;CODE&gt;EXPORT var = var TO MEMORY ID 'MID'. " In Program&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;IMPORT var = var FROM MEMORY ID 'MID'. " In Function Module&lt;/CODE&gt;&lt;/PRE&gt;
Note that your definition of &lt;STRONG&gt;VAR&lt;/STRONG&gt; should be same in both Program and Function Module.
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN __default_attr="maroon" __jive_macro_name="color"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 06:06:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393851#M814891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T06:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: pass value from program to function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393852#M814892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For passing hard-coded values pass them into a variable of the appropriate type and pass the variable to the function module by assigning the variable to the appropriate parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,Internal Tables are passed to FMs ,so populate the IT prior to passing it to the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need more share it with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 06:13:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393852#M814892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T06:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: pass value from program to function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393853#M814893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; gv_field  = ur value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL  function_module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;   field  =  gv_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont pass value directly to FM. pass the variable .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 06:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pass-value-from-program-to-function-module/m-p/3393853#M814893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T06:23:13Z</dc:date>
    </item>
  </channel>
</rss>

