<?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 Parameters of an function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978406#M71369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all : not that bad your English.... &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an extract from the Help :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Addition 6&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;... PARAMETER-TABLE itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;With this addition, the interface of a function module can be dynamically supplied with parameters. The addition PARAMETER-TABLE excludes parallel use of the static additions 1 through 5. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The parameter table itab must be a sorted table of the table type ABAP_FUNC_PARMBIND_TAB or of the line type ABAP_FUNC_PARMBIND. These types are defined in the type group ABAP in the ABAP dictionary. The table has the following four columns: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAME For the name of the formal paramter &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KIND for the type of parameter passing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VALUE of the type REF TO DATA for the value of the actual parameter &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES_WA of the type REF TO DATA for the value of the table work area, if a TABLES parameter is passed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The columns NAME and KIND form the unique table key. For each non-optional parameter, you must fill exactly one line of the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In NAME, you must specify the name of the parameter, and in KIND the parameter type. For the parameter type, you must use solely the following constants from the type group ABAP: &lt;/P&gt;&lt;P&gt;Modules &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP_FUNC_EXPORTING for EXPORTING parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP_FUNC_IMPORTING for IMPORTING parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP_FUNC_CHANGING for CHANGING parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP_FUNC_TABLES for TABLES parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The descriptions correspond to the caller's view. If the specified and actual parameter types do not correspond to each other, the system initiates, at runtime, an exception that cannot be handled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the value of the actual parameter, the reference in the column VALUE of the table line must point to a data object that contains the required value. For this you can use the command GET REFERENCE OF f INTO g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If internal tables are passed to the TABLES parameter of a function module, that is, the column KIND contains the constant ABAP_FUNC_TABLES, the reference in the column VALUE must point to the table body of the internal table. In addition to the table body, you can pass on a reference to a table work area suitable for the type in the column TABLES_WA. This work area fills the header line of the formal parameter TABLES in the function module. In this way, it is possible, as in the static case, to pass internal tables with the header line, that is, table body and header line, to the TABLES parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;type-pools ABAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data NAME type STRING value `ABAP_DOCU_SHOW`. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data PARA_TAB type ABAP_FUNC_PARMBIND_TAB. &lt;/P&gt;&lt;P&gt;data PARA_LINE like line of PARA_TAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data AREA(4) type C. &lt;/P&gt;&lt;P&gt;data OBJECT(30) type C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AREA = 'ABAP'. &lt;/P&gt;&lt;P&gt;PARA_LINE-NAME = 'AREA'. &lt;/P&gt;&lt;P&gt;PARA_LINE-KIND = ABAP_FUNC_EXPORTING. &lt;/P&gt;&lt;P&gt;get reference of AREA into PARA_LINE-VALUE. &lt;/P&gt;&lt;P&gt;append PARA_LINE to PARA_TAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECT = 'CLASS'. &lt;/P&gt;&lt;P&gt;PARA_LINE-NAME = 'NAME'. &lt;/P&gt;&lt;P&gt;PARA_LINE-KIND = ABAP_FUNC_EXPORTING. &lt;/P&gt;&lt;P&gt;get reference of OBJECT into PARA_LINE-VALUE. &lt;/P&gt;&lt;P&gt;append PARA_LINE to PARA_TAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function NAME &lt;/P&gt;&lt;P&gt;     parameter-table PARA_TAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the function module ABAP_DOCU_SHOW is called dynamically in full form, whereby its IMPORTING parameters AREA and NAME are supplied with data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Guillaume Garcia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2005 11:32:08 GMT</pubDate>
    <dc:creator>guillaume-hrc</dc:creator>
    <dc:date>2005-10-04T11:32:08Z</dc:date>
    <item>
      <title>dynamic Parameters of an function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978405#M71368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I'm new in this community and I also have my first question.&lt;/P&gt;&lt;P&gt;First of all I've got to say sorry for my bad english and I hope that everybody here can understand me.&lt;/P&gt;&lt;P&gt;My name is Christian and I work for an pharmaceutical company in Germany. We run SAP R/3 in Release 4.6B.&lt;/P&gt;&lt;P&gt;Soon the time has come to go to a new release. Probably release 6.40.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is as followed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got to create a dynamic call of an function module.&lt;/P&gt;&lt;P&gt;At the beginning I have only the name of the function module, with is give by the user as a parameter e.g..&lt;/P&gt;&lt;P&gt;Then I make a select on the table FUPARAREF which contains all parameters (like import and export e.g.) for every function module. Now I already have a basis for the dynamic function module call.&lt;/P&gt;&lt;P&gt;But there follows a big problem which is a barricade for my project. &lt;/P&gt;&lt;P&gt;I don't know how to call the function module with a dynamic amount of export-parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For those who don't know what I mean a little example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Start of source code&lt;/P&gt;&lt;P&gt;REPORT  ZTEST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;declare the input parameter 'FNAME' in the selection &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PARAMETER FNAME LIKE FUPARAREF-FUNCNAME DEFAULT 'CS_WHERE_USED_MAT' &lt;/P&gt;&lt;P&gt;OBLIGATORY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here I select the import parameters of the above given &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;function module into an internal table.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I don't list it here because everybody should now how it looks like &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here I want to call the dynamic function module using the data-element 'FNAME'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now there follows my barricade:&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;How can I dynamically use the above selected import parameters to give them to function call?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION FNAME &lt;/P&gt;&lt;P&gt;   EXPORTING ???. &lt;/P&gt;&lt;P&gt;*End of source code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that you can understand my problem and also that one of you knows an answer for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2005 11:27:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978405#M71368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-04T11:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Parameters of an function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978406#M71369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all : not that bad your English.... &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an extract from the Help :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Addition 6&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;... PARAMETER-TABLE itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;With this addition, the interface of a function module can be dynamically supplied with parameters. The addition PARAMETER-TABLE excludes parallel use of the static additions 1 through 5. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The parameter table itab must be a sorted table of the table type ABAP_FUNC_PARMBIND_TAB or of the line type ABAP_FUNC_PARMBIND. These types are defined in the type group ABAP in the ABAP dictionary. The table has the following four columns: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAME For the name of the formal paramter &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KIND for the type of parameter passing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VALUE of the type REF TO DATA for the value of the actual parameter &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES_WA of the type REF TO DATA for the value of the table work area, if a TABLES parameter is passed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The columns NAME and KIND form the unique table key. For each non-optional parameter, you must fill exactly one line of the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In NAME, you must specify the name of the parameter, and in KIND the parameter type. For the parameter type, you must use solely the following constants from the type group ABAP: &lt;/P&gt;&lt;P&gt;Modules &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP_FUNC_EXPORTING for EXPORTING parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP_FUNC_IMPORTING for IMPORTING parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP_FUNC_CHANGING for CHANGING parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP_FUNC_TABLES for TABLES parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The descriptions correspond to the caller's view. If the specified and actual parameter types do not correspond to each other, the system initiates, at runtime, an exception that cannot be handled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the value of the actual parameter, the reference in the column VALUE of the table line must point to a data object that contains the required value. For this you can use the command GET REFERENCE OF f INTO g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If internal tables are passed to the TABLES parameter of a function module, that is, the column KIND contains the constant ABAP_FUNC_TABLES, the reference in the column VALUE must point to the table body of the internal table. In addition to the table body, you can pass on a reference to a table work area suitable for the type in the column TABLES_WA. This work area fills the header line of the formal parameter TABLES in the function module. In this way, it is possible, as in the static case, to pass internal tables with the header line, that is, table body and header line, to the TABLES parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;type-pools ABAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data NAME type STRING value `ABAP_DOCU_SHOW`. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data PARA_TAB type ABAP_FUNC_PARMBIND_TAB. &lt;/P&gt;&lt;P&gt;data PARA_LINE like line of PARA_TAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data AREA(4) type C. &lt;/P&gt;&lt;P&gt;data OBJECT(30) type C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AREA = 'ABAP'. &lt;/P&gt;&lt;P&gt;PARA_LINE-NAME = 'AREA'. &lt;/P&gt;&lt;P&gt;PARA_LINE-KIND = ABAP_FUNC_EXPORTING. &lt;/P&gt;&lt;P&gt;get reference of AREA into PARA_LINE-VALUE. &lt;/P&gt;&lt;P&gt;append PARA_LINE to PARA_TAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECT = 'CLASS'. &lt;/P&gt;&lt;P&gt;PARA_LINE-NAME = 'NAME'. &lt;/P&gt;&lt;P&gt;PARA_LINE-KIND = ABAP_FUNC_EXPORTING. &lt;/P&gt;&lt;P&gt;get reference of OBJECT into PARA_LINE-VALUE. &lt;/P&gt;&lt;P&gt;append PARA_LINE to PARA_TAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function NAME &lt;/P&gt;&lt;P&gt;     parameter-table PARA_TAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the function module ABAP_DOCU_SHOW is called dynamically in full form, whereby its IMPORTING parameters AREA and NAME are supplied with data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Guillaume Garcia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2005 11:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978406#M71369</guid>
      <dc:creator>guillaume-hrc</dc:creator>
      <dc:date>2005-10-04T11:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Parameters of an function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978407#M71370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think You need the following syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION func &lt;/P&gt;&lt;P&gt;  PARAMETER-TABLE &lt;/P&gt;&lt;P&gt;    ptab &lt;/P&gt;&lt;P&gt;  EXCEPTION-TABLE &lt;/P&gt;&lt;P&gt;    etab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where ptab contains all your parameters and etab all exceptions (if needed). You have to populate these tables first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found this in the help. For the complete example just have a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Rene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2005 11:45:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978407#M71370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-04T11:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Parameters of an function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978408#M71371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello and thank you all for your answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a problem to find the explainment for  "PARAMETER-TABLE" in the SAP Help of our System (release 46B). Is is possible that I can use this "new function" only in a later release?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that the "PARAMETER-TABLE" is just what I want, or better: just what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to find something in the SAP online help, because I think it's much "up to date" than our local version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm happy that I found so excellent and quick help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2005 17:33:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978408#M71371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-04T17:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Parameters of an function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978409#M71372</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;maybe it is easier and much faster to find it in the ABAP-Keyworddocumentation. But I don't know if it is already in 46B. I am working here on NW04 and found it quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Rene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2005 18:03:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978409#M71372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-04T18:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Parameters of an function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978410#M71373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the same problem in version 46c and i resolved it by using GENERATE SUBROUTINE instruction and i used SAP function 'FUNCTION_IMPORT_DOKU' to get those parameters functions .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jacques&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: typ_code(72) type c.&lt;/P&gt;&lt;P&gt;data: lst_code_source type typ_code.&lt;/P&gt;&lt;P&gt;data: lit_code_source type standard table of typ_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_PROG(8), l_MSG(120), l_LIN(3), l_WRD(10), l_OFF(3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_nom_fonction type rs38l-name value&lt;/P&gt;&lt;P&gt; 'ABR_ABRECHNUNGSEINHEIT_ABRECHN',&lt;/P&gt;&lt;P&gt;      lit_dokumentation type standard table of funct,&lt;/P&gt;&lt;P&gt;      lit_exception_list type standard table of rsexc,&lt;/P&gt;&lt;P&gt;      lit_export_parameter type standard table of rsexp,&lt;/P&gt;&lt;P&gt;      lit_import_parameter type standard table of rsimp,&lt;/P&gt;&lt;P&gt;      lit_changing_parameter type standard table of rscha,&lt;/P&gt;&lt;P&gt;      lit_tables_parameter type standard table of rstbl,&lt;/P&gt;&lt;P&gt;      l_no_exception(1) type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols:  0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Former dynamiquement le CALL FUNCTION !!!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append 'REPORT TESTJACQUES.' to lit_code_source.&lt;/P&gt;&lt;P&gt;append 'FORM EXECUTER_CALL_FUNCTION.'  to lit_code_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append ' ' to lit_code_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Faire un traitment pour ramasser les type-pools de la fonction si&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;une donnée a besoin d'un type en particulier&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;append 'type-pools: fvink.' to lit_code_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Définition des paramètres EXPORT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if not lit_export_parameter is initial.&lt;/P&gt;&lt;P&gt;  loop at lit_Export_parameter assigning -parameter&lt;/P&gt;&lt;P&gt;           into lst_code_source separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Ajouter le TYPE si nous parlons de TYPE sinon comme le LIKE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if not -dbfield&lt;/P&gt;&lt;P&gt;             into lst_code_source separated by space.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   Ajouter le POINT dans le DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    concatenate lst_code_source&lt;/P&gt;&lt;P&gt;                '.'&lt;/P&gt;&lt;P&gt;           into lst_code_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append lst_code_source to lit_code_source.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Définition des paramètres IMPORT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if not lit_import_parameter is initial.&lt;/P&gt;&lt;P&gt;  loop at lit_import_parameter assigning -parameter&lt;/P&gt;&lt;P&gt;           into lst_code_source separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Ajouter le TYPE si nous parlons de TYPE sinon comme le LIKE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if not -dbfield&lt;/P&gt;&lt;P&gt;             into lst_code_source separated by space.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Ajouter le DEFAULT dans le DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if not -default&lt;/P&gt;&lt;P&gt;               into lst_code_source separated by space.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   Ajouter le POINT dans le DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    concatenate lst_code_source&lt;/P&gt;&lt;P&gt;                '.'&lt;/P&gt;&lt;P&gt;           into lst_code_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append lst_code_source to lit_code_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Faire l'assignation de la variable Système !!!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if -default&lt;/P&gt;&lt;P&gt;                  '.'&lt;/P&gt;&lt;P&gt;             into lst_codE_source separated by space.&lt;/P&gt;&lt;P&gt;      append lst_code_source to lit_code_source.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Définition des paramètres CHANGING&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if not lit_changing_parameter is initial.&lt;/P&gt;&lt;P&gt;  loop at lit_changing_parameter assigning -parameter&lt;/P&gt;&lt;P&gt;           into lst_code_source separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Ajouter le TYPE si nous parlons de TYPE sinon comme le LIKE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if not -dbfield&lt;/P&gt;&lt;P&gt;             into lst_code_source separated by space.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Ajouter le DEFAULT dans le DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if not -default&lt;/P&gt;&lt;P&gt;             into lst_code_source separated by space.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   Ajouter le POINT dans le DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    concatenate lst_code_source&lt;/P&gt;&lt;P&gt;                '.'&lt;/P&gt;&lt;P&gt;           into lst_code_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append lst_code_source to lit_code_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Faire l'assignation de la variable Système !!!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if -default&lt;/P&gt;&lt;P&gt;                  '.'&lt;/P&gt;&lt;P&gt;             into lst_codE_source separated by space.&lt;/P&gt;&lt;P&gt;      append lst_code_source to lit_code_source.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Définition des paramètres TABLES&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if not lit_tables_parameter is initial.&lt;/P&gt;&lt;P&gt;  loop at lit_tables_parameter assigning  0.&lt;/P&gt;&lt;P&gt;  WRITE: / 'Error during generation in line', l_lin,&lt;/P&gt;&lt;P&gt;  / l_msg,&lt;/P&gt;&lt;P&gt;  / 'Word:', l_wrd, 'at offset', l_off.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  WRITE: / 'The name of the subroutine pool is', l_prog.&lt;/P&gt;&lt;P&gt;  SKIP 2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform executer_call_function in program (l_prog) if found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2005 19:46:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-parameters-of-an-function-module/m-p/978410#M71373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-07T19:46:40Z</dc:date>
    </item>
  </channel>
</rss>

