<?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: Execute BAPI using Import Parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-bapi-using-import-parameters/m-p/1291320#M155441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what you are tyring to do by dynamcially executing different BADI's. You need to have the parameters of the BAPI, in your program, populate them and pass that to the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can call the function dynamically using CALL FUNCTION (funcname), but passing the parameters for a BAPI, which is decided only at runtime, you will not even have a pattern to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Apr 2006 06:35:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-26T06:35:32Z</dc:date>
    <item>
      <title>Execute BAPI using Import Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-bapi-using-import-parameters/m-p/1291319#M155440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Friends,&lt;/P&gt;&lt;P&gt;        I have a requiement to develope a report which displays the result of given BAPI. In which I used FUNCTION_GET function. In this function i am passing the BAPINAME so it will give me the Import,Export and Return Parameters of that BAPI. This will be stored in one ITAB.&lt;/P&gt;&lt;P&gt;        Now if i want to set the Input Parameters of that particular BAPI and want to execute it and stores the result of it in another ITAB.&lt;/P&gt;&lt;P&gt;        Can u tell me how to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written following code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZGETBAPI_NAME line-size 132.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: bapiname like TFDIR-FUNCNAME default'BAPI_CREDITOR_GETDETAIL'.&lt;/P&gt;&lt;P&gt;Data: rtrbapi_itab like CATFU occurs 0 with header line.&lt;/P&gt;&lt;P&gt;Data: pName(30) Type C.&lt;/P&gt;&lt;P&gt;Data: Name(30) Type C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FUNCTION_GET'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FUNCNAME                    = bapiname&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    PRMTAB                      = rtrbapi_itab&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   FM_NOT_FOUND                = 1&lt;/P&gt;&lt;P&gt;   NAMETAB_FAULT               = 2&lt;/P&gt;&lt;P&gt;   REF_FIELD_MISSING           = 3&lt;/P&gt;&lt;P&gt;   REF_STRUCTURE_MISSING       = 4&lt;/P&gt;&lt;P&gt;   OTHERS                      = 5&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 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;Loop At rtrbapi_itab.&lt;/P&gt;&lt;P&gt;  Write: /  rtrbapi_itab-PARAMTYPE,&lt;/P&gt;&lt;P&gt;         07 rtrbapi_itab-NAME,&lt;/P&gt;&lt;P&gt;         38 rtrbapi_itab-TABNAME,&lt;/P&gt;&lt;P&gt;         68 rtrbapi_itab-FIELDNAME,&lt;/P&gt;&lt;P&gt;         98 rtrbapi_itab-DATATYPE,&lt;/P&gt;&lt;P&gt;        102 rtrbapi_itab-INTTYPE,&lt;/P&gt;&lt;P&gt;        106 rtrbapi_itab-DDLEN,&lt;/P&gt;&lt;P&gt;        110 rtrbapi_itab-INTLEN.&lt;/P&gt;&lt;P&gt;EndLoop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hitesh Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2006 06:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-bapi-using-import-parameters/m-p/1291319#M155440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-26T06:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Execute BAPI using Import Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-bapi-using-import-parameters/m-p/1291320#M155441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what you are tyring to do by dynamcially executing different BADI's. You need to have the parameters of the BAPI, in your program, populate them and pass that to the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can call the function dynamically using CALL FUNCTION (funcname), but passing the parameters for a BAPI, which is decided only at runtime, you will not even have a pattern to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2006 06:35:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-bapi-using-import-parameters/m-p/1291320#M155441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-26T06:35:32Z</dc:date>
    </item>
  </channel>
</rss>

