‎2007 Jan 11 11:13 AM
Hi All
I am using the BAPI <b>BAPI_MATPHYSINV_COUNT</b> 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.
Thanks
‎2007 Jan 12 4:55 PM
Frans, what kind of error does it return exactly?
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:
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.Then I call BAPI:
CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'
EXPORTING
physinventory = p_iblnr
fiscalyear = current_year
TABLES
items = i_count
return = i_return.It's pretty straight forward. Maybe you should pass 'zero count' if material wasn't counted?
‎2015 Dec 05 2:19 PM