<?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: Dynamic call to Function module. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-to-function-module/m-p/4867338#M1137990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the DESTINATION addition of the CALL FUNCTION statement.&lt;/P&gt;&lt;P&gt;Press F1 on the CALL FUNCTION and get the online help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Nov 2008 15:39:21 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2008-11-20T15:39:21Z</dc:date>
    <item>
      <title>Dynamic call to Function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-to-function-module/m-p/4867337#M1137989</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;In one of the program, we have found a FM ' rfc_update_taxes_doc', and which does not has any code,&lt;/P&gt;&lt;P&gt;but what i think that this Fm is called dynamically from some prog and is calling external system. &lt;/P&gt;&lt;P&gt;As it has 'targt server' in importing parameters.&lt;/P&gt;&lt;P&gt;So can anybody tell me if this is the way we call to External system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And please if anyone can tell me the real meaning of calling a Fm dynamically.&lt;/P&gt;&lt;P&gt;Please dont provide links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Manu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 15:37:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-to-function-module/m-p/4867337#M1137989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T15:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic call to Function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-to-function-module/m-p/4867338#M1137990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the DESTINATION addition of the CALL FUNCTION statement.&lt;/P&gt;&lt;P&gt;Press F1 on the CALL FUNCTION and get the online help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 15:39:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-to-function-module/m-p/4867338#M1137990</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-11-20T15:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic call to Function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-to-function-module/m-p/4867339#M1137991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manu, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try with this example. I connect Bussiness system with R/3 system,  because I need  R/3 table in Bw system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF SY-SYSID EQ 'BWD'. "SYSID = Name sap system

    D_DESTINATION = 'DESD47020'.

  ELSEIF SY-SYSID EQ 'BWC'.

    D_DESTINATION = 'DESW47420'.

  ELSEIF SY-SYSID EQ 'BWP'.

    D_DESTINATION = 'DESP47420'.

  ENDIF.


  CAMPOS-FIELDNAME = 'MANDT'.
  CAMPOS-OFFSET = '000000'.
  CAMPOS-LENGTH = '000003'.
  CAMPOS-FIELDTEXT = 'Mandant'.
  APPEND CAMPOS.
  CLEAR CAMPOS.
  CAMPOS-FIELDNAME = 'BUKRS'.
  CAMPOS-OFFSET = '000004'.
  CAMPOS-LENGTH = '000004'.
  CAMPOS-FIELDTEXT = 'Society'.
  APPEND CAMPOS.
  CLEAR CAMPOS.

  CALL FUNCTION 'RFC_READ_TABLE' DESTINATION D_DESTINATION
    EXPORTING
      QUERY_TABLE                = 'TZBZ'
*   DELIMITER                  = ' '
*   NO_DATA                    = ' '
*   ROWSKIPS                   = 0
*   ROWCOUNT                   = 0
    TABLES
      OPTIONS                    = OPTIONS1
      FIELDS                     = CAMPOS
      DATA                       = DATOS
* EXCEPTIONS
*   TABLE_NOT_AVAILABLE        = 1
*   TABLE_WITHOUT_DATA         = 2
*   OPTION_NOT_VALID           = 3
*   FIELD_NOT_VALID            = 4
*   NOT_AUTHORIZED             = 5
*   DATA_BUFFER_EXCEEDED       = 6
*   OTHERS                     = 7&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's all. &lt;/P&gt;&lt;P&gt;About the real meaning of calling a FM dynamically could be something like that because &lt;/P&gt;&lt;P&gt;you can generate the call dynamically to just call with the needed parameters (you can change &lt;/P&gt;&lt;P&gt;the parameters).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of s_codigo,&lt;/P&gt;&lt;P&gt;Lines type string,&lt;/P&gt;&lt;P&gt;          End of s_codigo.&lt;/P&gt;&lt;P&gt;Data: it_codigo type standard table of s_codigo with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND 'Title.' TO it_codigo.&lt;/P&gt;&lt;P&gt;APPEND 'form Calculate_sum.' TO it_codigo.&lt;/P&gt;&lt;P&gt;APPEND 'call function ''RFC FUNCTION ''' TO it_codigo.&lt;/P&gt;&lt;P&gt;APPEND 'destination ''D_DESTINATION''' TO it_codigo.&lt;/P&gt;&lt;P&gt;APPEND 'exporting PARAM1 = ''2''' TO it_codigo.&lt;/P&gt;&lt;P&gt;APPEND 'PARAM2 = IT_TABLE ' TO it_codigo.&lt;/P&gt;&lt;P&gt;APPEND 'importing PARAM_I1 = RESULT.' TO it_codigo.&lt;/P&gt;&lt;P&gt;APPEND 'endform.' TO it_codigo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA prog_name LIKE sy-cprog.&lt;/P&gt;&lt;P&gt;DATA resultado(1) TYPE c.&lt;/P&gt;&lt;P&gt;GENERATE SUBROUTINE POOL it_codigo NAME prog_name.&lt;/P&gt;&lt;P&gt;PERFORM Calculate_sum IN PROGRAM (prog_name) CHANGING nok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ana &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 16:39:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-to-function-module/m-p/4867339#M1137991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T16:39:59Z</dc:date>
    </item>
  </channel>
</rss>

