<?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: Bapi with empty parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110301#M1185545</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 bapi is set for remote enabling.&lt;/P&gt;&lt;P&gt;&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;                 João Fernandes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2009 15:15:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-09T15:15:29Z</dc:date>
    <item>
      <title>Bapi with empty parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110299#M1185543</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;I am trying to create a BAPI that should retrieve a customer list. This Bapi should accept empty parameters in order to select a range of customers. This Bapi should accept wildcards * in the search like a ABAP program. But right now i only can retrieve some significant values if all the parameters are filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am i doing something wrong? I know this is a basic request but it is my first BAPI.&lt;/P&gt;&lt;P&gt;The code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION ZBAPI_CLIENTE.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Interface local:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(KUNNR) LIKE  KNA1-KUNNR OPTIONAL&lt;/P&gt;&lt;P&gt;*"     VALUE(STCEG) LIKE  KNA1-STCEG OPTIONAL&lt;/P&gt;&lt;P&gt;*"     VALUE(NAME1) LIKE  KNA1-NAME1 OPTIONAL&lt;/P&gt;&lt;P&gt;*"     VALUE(NAME2) LIKE  KNA1-NAME2 OPTIONAL&lt;/P&gt;&lt;P&gt;*"     VALUE(VTWEG) LIKE  KNVV-VTWEG&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(RETURN) LIKE  BAPIRETURN STRUCTURE  BAPIRETURN&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      ZITEMDATA STRUCTURE  ZBAPICLIENTES&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;tables: kna1, knvv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: cli like kna1-kunnr.&lt;/P&gt;&lt;P&gt;data: nct like kna1-stceg.&lt;/P&gt;&lt;P&gt;data: nm1 like kna1-name1.&lt;/P&gt;&lt;P&gt;data: nm2 like kna1-name2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cli = kunnr.&lt;/P&gt;&lt;P&gt;nct = stceg.&lt;/P&gt;&lt;P&gt;nm1 = name1.&lt;/P&gt;&lt;P&gt;nm2 = name2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from kna1 where kunnr = cli and stceg = nct and name1 =&lt;/P&gt;&lt;P&gt;nm1 and name2 = nm2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*select * from kna1 where kunnr = cli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     select * from knvv where kunnr = kna1-kunnr and vkorg = 'MR01' and&lt;/P&gt;&lt;P&gt;vtweg = vtweg and spart = '00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           move kna1-kunnr to ZITEMDATA-kunnr.&lt;/P&gt;&lt;P&gt;           move kna1-stceg to ZITEMDATA-stceg.&lt;/P&gt;&lt;P&gt;           move kna1-name1 to ZITEMDATA-name1.&lt;/P&gt;&lt;P&gt;           move kna1-name2 to ZITEMDATA-name2.&lt;/P&gt;&lt;P&gt;           move knvv-vtweg to ZITEMDATA-vtweg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           append zitemdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&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;              João Fernandes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 14:21:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110299#M1185543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T14:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi with empty parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110300#M1185544</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;Firstly the FM should be Remote Enabled (Set the Attributes) in se37. and if u don't provide any values then it will display all the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow the Steps for BAPI Creation Carefully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 14:29:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110300#M1185544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T14:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi with empty parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110301#M1185545</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 bapi is set for remote enabling.&lt;/P&gt;&lt;P&gt;&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;                 João Fernandes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 15:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110301#M1185545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T15:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi with empty parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110302#M1185546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, please use Code tags when posting the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried your code in a stand-alone report? I bet it won't work either. Wildcards work only with ranges or selection options, but in your SELECT you're looking for an exact match (=). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using CLI variable of the same type (which doesn't make any sense, by the way), make it a range table for KUNNR. See ABAP Help for TYPES - RANGE OF. Another option (might be a better one) is to use a table instead of a single KUNNR value to pass the data to BAPI.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 22:29:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-with-empty-parameters/m-p/5110302#M1185546</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2009-02-09T22:29:33Z</dc:date>
    </item>
  </channel>
</rss>

