<?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: Using BAPI ====&amp;gt; BAPI_MATPHYSINV_COUNT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-gt-bapi-matphysinv-count/m-p/1832524#M354626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Frans, what kind of error does it return exactly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use BAPI_MATPHYSINV_COUNT successfully and haven't had any problems with it. I populate ITEMS table (i_count in this example) as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLEAR i_count.
  i_count-item = [line item number from the phys. inv. document].
  i_count-material = [material number MATNR].

  IF p_qty = 0.
    i_count-zero_count = 'X'.
  ELSE.
    i_count-entry_qnt = p_qty.
    i_count-entry_uom = [base unit of measure].
  ENDIF.
  APPEND i_count.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I call BAPI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'
    EXPORTING
      physinventory = p_iblnr
      fiscalyear    = current_year
    TABLES
      items         = i_count
      return        = i_return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's pretty straight forward. Maybe you should pass 'zero count' if material wasn't counted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2007 16:55:53 GMT</pubDate>
    <dc:creator>Jelena_Perfiljeva</dc:creator>
    <dc:date>2007-01-12T16:55:53Z</dc:date>
    <item>
      <title>Using BAPI ====&gt; BAPI_MATPHYSINV_COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-gt-bapi-matphysinv-count/m-p/1832523#M354625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I am using the BAPI &amp;lt;b&amp;gt;BAPI_MATPHYSINV_COUNT&amp;lt;/b&amp;gt; in a Z-Prog. Evrything is working fine when all the materials in the count is counted. When 1 or more is not counted of the count - the count creates an error in the return itab. What do I do wrong or are there another BAPI that can be used.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 11:13:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-gt-bapi-matphysinv-count/m-p/1832523#M354625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T11:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using BAPI ====&gt; BAPI_MATPHYSINV_COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-gt-bapi-matphysinv-count/m-p/1832524#M354626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Frans, what kind of error does it return exactly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use BAPI_MATPHYSINV_COUNT successfully and haven't had any problems with it. I populate ITEMS table (i_count in this example) as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLEAR i_count.
  i_count-item = [line item number from the phys. inv. document].
  i_count-material = [material number MATNR].

  IF p_qty = 0.
    i_count-zero_count = 'X'.
  ELSE.
    i_count-entry_qnt = p_qty.
    i_count-entry_uom = [base unit of measure].
  ENDIF.
  APPEND i_count.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I call BAPI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'
    EXPORTING
      physinventory = p_iblnr
      fiscalyear    = current_year
    TABLES
      items         = i_count
      return        = i_return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's pretty straight forward. Maybe you should pass 'zero count' if material wasn't counted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 16:55:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-gt-bapi-matphysinv-count/m-p/1832524#M354626</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2007-01-12T16:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using BAPI ====&gt; BAPI_MATPHYSINV_COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-gt-bapi-matphysinv-count/m-p/1832525#M354627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2015 14:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-gt-bapi-matphysinv-count/m-p/1832525#M354627</guid>
      <dc:creator>masoud_ebrahimzadeh</dc:creator>
      <dc:date>2015-12-05T14:19:57Z</dc:date>
    </item>
  </channel>
</rss>

