BAPI_MATPHYSINV_COUNT

With BAPI BAPI_MATPHYSINV_CREATE_MULT and after COMMIT, I created the inventory document 100000090 on fiscal year 2006.
In transaction MI02 I can see it.
Now I try to use BAPI_MATPHYSINV_COUNT, with parameters
physinventory = '100000090'
fiscalyear = '2006'
it return me this error E and show the msg
the 'plant' and 'storage location' for invetory document 100000090 are not maintained.
but as i seen in mi02 plant n storage location r maintained n beside it i also can enter the quantity transaction through transaction MI04.
pls guide me wht can i do.
Thanx

thanx

Similar Messages

  • Help required BAPI_MATPHYSINV_COUNT

    I am using BAPI "BAPI_MATPHYSINV_COUNT" to post recount physical inventory document.
    I am passing the values to that BAPI are:
    v_phyinvno : physinventory document
    v_gjahr        : fiscalyear
    v_cntdt    : date
    i_phitm1-entry_qnt
    i_phitm1-batch
    i_phitm1-zero_count
    i_phitm1-material
    i_phitm1-entry_uom
    i_phitm1-item
    CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'
                 EXPORTING
                      physinventory = v_phyinvno
                      fiscalyear    = v_gjahr
                      count_date    = v_cntdt
                 TABLES
                      items         = i_phitm1[]
                      return        = i_return[].
    I am getting below error during execution of above BAPI.
    Error is "Material number XXXX is not maintained in the physical inventory document".
    Material number which is in the error message is already maintained in the physical inventory document.
    Please suggest me do i need to add any other information to that BAPI?
    NOTE: Where as when i am using the same data by doing manually using MI04 transactions its getting posting.
    Thaks in advance.

    before passing the material change the format to internal/external :
    CONVERSION_EXIT_MATN1_INPUT or  CONVERSION_EXIT_MATN1_outPUT
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT  '
        EXPORTING
          input  = old matrial
        IMPORTING
          output = nw material
    Edited by: pr@t on Aug 19, 2010 9:35 AM

  • Bapi is not updating table

    When executing the code it gives an error that
    3110 3111 mack7  is not contained in the physical inventory document
    where mack7 is matnr .
    3110 is plant
    while actuaaly it is present.
    report Z_PHYSICAL
           no standard page heading line-size 255.
    TYPE-POOLS: truxs.
    tables : ikpf.
    TYPES: BEGIN OF t_datatab,
          col1(30)    TYPE c,
          col2(30)    TYPE c,
          col3(30)    TYPE c,
          COL4(30)    TYPE C,
          col5(30)    type c,
          END OF t_datatab.
    data: x type i.
    data : iblnr1 like IKPF-IBLNR.
    data : gjhar like IKPF-GJAHR.
    data : v_wait like bapita-wait value 'X'.
    data : count_dat like IIKPF-ZLDAT.
    data : items like BAPI_PHYSINV_COUNT_ITEMS occurs 0 with header line.
    data : return like BAPIRET2 occurs 0 with header line.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    start-of-selection.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  ''
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    loop at it_datatab into wa_datatab.
    on change of wa_datatab-col1.
    iblnr1 = wa_datatab-col1.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = iblnr1
    IMPORTING
       OUTPUT        = iblnr1
    gjhar = wa_datatab-col2.
    count_dat = wa_datatab-col3.
    clear x.
    endon.
    x = x + 1.
    items-material = wa_datatab-col4.
    *unpack items-material to items-material.
    items-ENTRY_QNT = wa_datatab-col5.
    *CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
       input         = items-material
    *IMPORTING
      OUTPUT        = items-material
    items-batch = ''.
    items-item = x.
    append items.
    CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'
      EXPORTING
        physinventory             = iblnr1
        fiscalyear                = gjhar
      PERCENTAGE_VARIANCE       =
        COUNT_DATE                = count_dat
      tables
        items                     = items
        return                    = return
      SERIALNUMBERS             =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = v_wait
    IMPORTING
       RETURN        = return
    if sy-subrc eq 0.
    endif.
    clear items . refresh items.
    endloop.

    Hi Chaitanya,
    See if the user Customer-Exit EXIT_SAPMM07M_001 is implemented.  (Customer Function Exit: Set Segment Text in Material Document).
    Enhancement SMOD: MBCF0002
    Regards
    Bruno Xavier.

  • BAPI/FM for Physcial Inventory

    Please provide me the list for FM/BAPI avalilabe for Physcila Inventory Process.
    Regards.
    Ricky

    Hi,
    MB_BUS2028       -              Function group for BAPIs for phys. inv.
    BAPI_MATPHYSINV_CHANGECOUNT    Change count for particular items of a phys. inv. doc.
    BAPI_MATPHYSINV_COUNT          Enter count for particular items of a phys. inv. doc.
    BAPI_MATPHYSINV_CREATE         Create Physical Inventory Document
    BAPI_MATPHYSINV_CREATE_MULT    Create Physical Inventory Document
    BAPI_MATPHYSINV_GETDETAIL      Read items for a physical inventory document
    BAPI_MATPHYSINV_GETITEMS       Read list of physical inventory documents with items
    BAPI_MATPHYSINV_GETLIST        Read list of phys. inv. documents
    BAPI_MATPHYSINV_POSTDIFF       Post differences for certain items in a phys. inv. document

  • BAPI for posting TCode MI04, MI09 & MI10

    Hello Gurus,
    can someone tell me which BAPI's to use for postings of above mentioned transactions?
    Regards,
    Alej

    Hi Friend,
    Please try with BAPI_MATPHYSINV_COUNT
    Hope it will help you.
    Regards
    Krishnendu

  • LI11n Updation FM for WMS

    Hi,
            I need to update the LI11n t.code with the Count qty and the zero qunatity if the count qty was not there.
    FM's BAPI_MATPHYSINV_COUNT nad BAPI_MATPHYSINV_CHANGECOUNT are only used when the inventory management was used.
    But here i need ti update for WMS oriented concept.What is the FM i need to use to update the fields of quantty and Zero quantity.
    Also i need to check where the zero quanoty checkbox value stored(Tablename).

    No Answer

  • Function module to update 'Counted Quantity' in inventory count

    Hi Gurus,
    Are there any function module that can be used to update field counted quantity (LINV-MENGA) in inventory count (tcode LI11N)?
    Thanks & Regards,
    Ari

    Hi,
    Check in the BAPI tocde- Under MM-> Inventory Management to find the Fm or
    Pls try to use this FM for Physical Inventory  -
    BAPI_MATPHYSINV_COUNT
    Pls refer to this BOR object BUS2028 for more FM
    These relaetd BAPIs are stored under a BOR. Check the table TOJTB for the BOR and then in that BOR we can find the related BAPIs.
    Regards
    Lekha

  • Is it possible to enter more than 333 items in a physical inventory Doc.?

    Hi Gurus
    I want to enter more than 10000 line items in a physical inventory document. how can I achieve this please help. We are using SAP IS Retail.
    Regards
    Muneer . V.K

    Hi
    We are using PDA device to enter counted qty before that we will arrange all articles based on MC and we will distribute the work to different counting teams. We have a Z program developed for PDA with following logic.
    Pseudo Logic     
    1)     Application is used to create Physical Inventory Count.
    2)     There are 2 options provided for physical Inventory Count
          i)  With Reference of Physical Inventory document
          ii) Without Reference.
    3)     If with reference is chosen , Inventory document no. is available for input
    4)     If stock type is entered in without reference then vendor is mandatory for input.
    5)     User can enter the site, storage location and the following validations will be done on these screen inputs
    u2022     Validate the site against SAP entry and check whether the ser has authorization in the site
    u2022     Validate the storage location
    u2022     Validate Vendor if entered
    u2022     Validate Physical Inventory doc no. if entered
    6)     In second screen, user will scan EAN/UPC number of the article and the following validations will be done.
    u2022     Validate the EAN/UPC number. Check whether the number is available in SAP
    u2022     Check whether the article is extended for the site
    u2022     Get the base unit of measurement for the article
    u2022     Get the article description from the table
    u2022     Get the conversion factors for the barcode unit of measurement
    u2022     Get Stock on hand for the article
    7)     Perform the following validations on the unit of measurement input
    u2022     Check whether the unit of measurement is available in the system
    u2022     Check whether the unit of measurement is defined for the article
    8)     Perform the following validations on the quantity entered by the user
    u2022     Check the format of the quantity input
    9)     Move all the details along with quantity to a buffer table. Clear all the input fields for the next set of scan and move the current details to the last scanned variable for display
    10)     In case duplicate scanning of article, cumulate quantities instead of adding new entry to the buffer table
    11)     If the user click on option DISP, call the third screen
    12)     In third screen, all the EAN/UPC numbers will be displayed with an option for scrolling and removal
    13)     When the user choose option SAVE from the third screen, create physical Inventory document and update the count by following the below steps
    u2022     Prepare the header parameters for the BAPI
    u2022     Prepare the line Item parameters for the BAPI
    u2022     Create PI document using the BAPI_MATPHYSINV_CREATE_MULT and BAPI_MATPHYSINV_COUNT
    u2022     Trigger error message in case of any failure
    14)     Clear and refresh all the variables and internal tables to proceed
    15)     Create HTML templates for the screen in SE80 under the internet service ZNESTO
    16)     Publish the IAC templates for the screens in SE80 under the internet service ZNESTO
    Regards
    Muneer V.K

  • BDC/BAPI for MI04

    Hi,
    I have a requirement where I need to develop a upload program (from flat file) for MI01 and MI04 t-code. I have created a BDC for MI01 t-code which is running successfully. But I cant able to create the same for MI04 t-code. And also I didnt find any such kind or MI04. instead I found a lot of posts suggesting for BAPI (instead of BDC).
    After all this I decided to go for BAPI which I haven't developed till now. With this situation I searched it (BAPI for MI04) in the forum. But I could not find a complete code. In almost all the posts, only part of the code i.e FM's are listed. As I am new to the BAPI, I was searching for a complete code (BAPI for MI04).
    Can anyone post the BAPI code for MI04 transaction.
    Regards,
    Praveen

    use ''BAPI_MATPHYSINV_COUNT' bapi...
    u have to fill all the structures or ITAB which are mandatory. Then pass them to this BAPI. after that use BAPI_TRANSACTION_COMMIT to update the database
    and how to create .txt file to upload data to this transaction.
    the text file should contain all the fields which are necessary to pass to bapai structures /ITABs
    better , u can run the corresponding trn.. to know all mandt fields
    U can use GUI_upload to upload the flat file.
    Reward if useful

  • About MI34

    Hi ,
    I am working<b>.. MI34</b>. but facing problem while creating file.
    Actaully user want to use MI04 .<b> but MI04 is not support BDC.</b>
    In the MI34 help - . its given that the file format as BISEG .
    But I have pass 5 - 6 serial number to some material based on our requirement . But in this structure no-field is there to pass serial number.
    Plz let me some inputs / any steps.

    Maybe you could take a look at <a href="http://help.sap.com/saphelp_45b/helpdata/en/35/b0e8a587a62488e10000009b38f9b7/frameset.htm">BAPIs in Inventory Management</a>
    <i>    * Business Object MaterialPhysInv (Object type BUS2028 - Material physical inventory)
              o Create (BAPI_MATPHYSINV_CREATE)
                Create physical inventory document
              o Count (BAPI_MATPHYSINV_COUNT)
                Enter count for certain items in physical inventory document
              o ChangeCount (BAPI_MATPHYSINV_CHANGECOUNT)
                Change count for certain items in a physical inventory document
              o GetDetail (BAPI_MATPHYSINV_GETDETAIL)
                Read header and items of physical inventory document
              o GetItems (BAPI_MATPHYSINV_GETITEMS)
                List of physical inventory documents with headers and items
              o GetList (BAPI_MATPHYSINV_GETLIST)
                List of physical inventory document header records
              o PostDifferences (BAPI_MATPHYSINV_POSTDIFF)
                Post differences
    Business Object GoodsMovement (Object type BUS2017 - goods movement)
              o CreateFromData (BAPI_GOODSMVT_CREATE)
                BAPI Posting of goods movements with the function module MB_CREATE_GOODS_MOVEMENT
              o GetDetail (BAPI_GOODSMVT_GETDETAIL)
                Display details of goods movement
              o GetItems (BAPI_GOODSMVT_GETITEMS)
                List goods movement items and header data
              o Cancel (BAPI_GOODSMVT_CANCEL)
                Reverse goods movement</i>
    BAPI_MATPHYSINV_COUNT allows a table of serial numbers (table parameter SERIALNUMBERS structure BAPI_PHYSINV_SERIALNUMBERS)
    Regards

  • ALL   BAPIs  used in  MM  Module

    Hi  Gurus,
    could Anyone  tel  me  what are the  BAPIs used  in MM  Module
    Thanks in Advance.

    Hi,
    BAPI_SERVICE_GET_LIST     List display for service master records
    BAPI_SERVICE_GET_DETAIL     Read detailed data for a service master record
    BAPI_ENTRYSHEET_RESET_RELEASE     Cancel release of entry sheets
    BAPI_ENTRYSHEET_RELEASE     Release entry sheet
    BAPI_ENTRYSHEET_GETRELINFO     Release information relating to entry sheet
    BAPI_ENTRYSHEET_GETLIST     List of entry sheets
    BAPI_ENTRYSHEET_GETDETAIL     Entry sheet: detailed display
    BAPI_ENTRYSHEET_DELETE     Delete entry sheet
    BAPI_ENTRYSHEET_CREATE     Create entry sheet
    BAPI_SOURCEDETERMIN_GETSOS     Determine sources for material/material group
    BAPI_PROCOPERATION_GETINFO     Analysis of objects to be generated in Purchasing
    BAPI_PROCOPERATION_GETCATALOGS     Determine valid catalogs as F4 help
    BAPI_REQUISITION_RESET_RELEASE     Cancel release of purchase requisitions
    BAPI_REQUISITION_RESET_REL_GEN     Cancel release of purchase requisitions
    BAPI_REQUISITION_RELEASE_GEN     Release purchase requisition
    BAPI_REQUISITION_RELEASE     Release purchase requisition
    BAPI_REQUISITION_RELEASE     Release purchase requisition
    BAPI_REQUISITION_GETRELINFO     Detailed release information on purchase requisition
    BAPI_REQUISITION_GETITEMSREL     List purchase requisitions awaiting release
    BAPI_REQUISITION_GETITEMS     Read purchase requisition item
    BAPI_REQUISITION_GETDETAIL     Display purchase requisition details
    BAPI_REQUISITION_DELETE     Delete/close purchase requisition
    BAPI_REQUISITION_CREATE     Create purchase requisition
    BAPI_REQUISITION_CHANGE     Change purchase requisition
    BAPI_REQUIREMENT_GET_LIST     Read requirement coverage request
    BAPI_REQUIREMENT_CREATE     Create requirement coverage request
    BAPI_PO_UPDATE_HISTORY     Update PO History from Delivery
    BAPI_PO_RESET_RELEASE     Cancel Release of Purchase Orders
    BAPI_PO_RELEASE     Release Purchase Orders
    BAPI_PO_GETRELINFO     Detailed Release Information on Purchase Order
    BAPI_PO_GETITEMSREL     List Purchase Orders for Release
    BAPI_PO_GETITEMS     List Purchase Order Items
    BAPI_PO_GETDETAIL     Display Purchase Order Details
    BAPI_PO_GET_LIST     List Purchase Orders - Only up to 4.0A
    BAPI_PO_DELETE_HISTORY     Delete PO History from Delivery
    BAPI_PO_CREATE1     Create Enjoy Purchase Orders
    BAPI_PO_CREATE     Create Purchase Order
    BAPI_PO_CHANGE     Change Enjoy Purchase Orders
    BAPI_INFORECORD_GETLIST     Display purchasing info records
    BAPI_INCOMINGINVOICE_SAVE     Invoice Verification: Flag Invoice for Background Processing
    BAPI_INCOMINGINVOICE_RELEASE     Invoice Verification: Release Invoice
    BAPI_INCOMINGINVOICE_PARK     Invoice Verification: Park Invoice
    BAPI_INCOMINGINVOICE_GETLIST     Invoice Verification: List Invoices
    BAPI_INCOMINGINVOICE_GETDETAIL     Invoice Verification: Display Invoice
    BAPI_INCOMINGINVOICE_CREATE     Invoice Verification: Post Invoice
    BAPI_INCOMINGINVOICE_CANCEL     Invoice Verification: Reverse Invoice
    BAPI_SVCHANGE_GET_ITEMS     "Read retail revaluation document for store, key date, item status"
    BAPI_SVCHANGE_CHANGE_STATUS     Enter count quantity and change item status from A to B or C
    BAPI_RESERVATION_GETITEMS     List reservations
    BAPI_RESERVATION_GETDETAIL     Display reservation
    BAPI_RESERVATION_DELETE     BAPI to delete individual reservations
    BAPI_RESERVATION_CREATE1     BAPI to create individual reservations
    BAPI_RESERVATION_CREATE     Create reservation
    BAPI_MATPHYSINV_POSTDIFF     Post differences
    BAPI_MATPHYSINV_GETLIST     List of phys. inv. doc. header records
    BAPI_MATPHYSINV_GETITEMS     List of phys. inv. docs with headers and items
    BAPI_MATPHYSINV_GETDETAIL     Read header and items of a phys. inv. doc.
    BAPI_MATPHYSINV_CREATE_MULT     Create phys.inv.docmt(s)
    BAPI_MATPHYSINV_CREATE     Create physical inventory document
    BAPI_MATPHYSINV_COUNT     Enter count for particular items of a phys. inv. doc.
    BAPI_MATPHYSINV_CHANGECOUNT     Change count for particular items of a phys. inv. doc.
    BAPI_GOODSMVT_SAPCREATE     SAP Internal Cross-System Flow of Goods
    BAPI_GOODSMVT_GETITEMS     Display detailed list of material documents
    BAPI_GOODSMVT_GETDETAIL     Display details of goods movement
    BAPI_GOODSMVT_CREATE     Post goods movement
    BAPI_GOODSMVT_CANCEL     Reverse goods movement
    BAPI_PRICECATALOGUE_SAVREPLICA     Store instance of price catalog
    BAPI_PRICECATALOGUE_GETDETAIL     Detailed information for a price catalog
    BAPI_PRICECATALOGUE_EXISTCHECK     Check existance of a price catalog
    BBP_INVOICE_CREATE     EBP Create Invoice
    Regards,
    Chandra

  • Movement type 701 and BAPI_GOODSMVT_CREATE

    Hi all,
    I am workling on a interface with IDOC MBGMCR02 that uses BAPI_GOODSMVT_CREATE. The problem I have is that I can't find the right GM_CODE for movement types 701 and 702. I have tried all of them but I get an error "Goods movement not possible with mvmt type 701". I know it is possible to use this BAPI for this movement type, but I don't know how to do it, is there any special treatment? any ideas?
    Thanks for your help.

    These are physical inventory movement types. Are you sure you were able to use this BAPI directly? The following BAPIs work with physical inventory movements
    BAPI_MATPHYSINV_CHANGECOUNT
    BAPI_MATPHYSINV_COUNT
    BAPI_MATPHYSINV_CREATE
    BAPI_MATPHYSINV_CREATE_MULT
    BAPI_MATPHYSINV_GETDETAIL
    BAPI_MATPHYSINV_GETITEMS
    BAPI_MATPHYSINV_GETLIST
    BAPI_MATPHYSINV_POSTDIFF
    The following IDoc types are for the same.
    MATERIALPHYSINV_COUNT01     Enter Inventory Count (MaterialPhysInv)
    MATERIALPHYSINV_CREATEMULTIP01     Create physical inventory document
    MATERIALPHYSINV_POSTDIFFEREN01     Post Differences (MaterialPhysInv)
    And the message types are
    MATERIALPHYSINV_COUNT     Enter Inventory Count (MaterialPhysInv)
    MATERIALPHYSINV_CREATEMULTIPLE     Create Physical Inventory Document
    MATERIALPHYSINV_POSTDIFFERENCE     Post Differences (MaterialPhysInv)

  • BDC / Bapi to upload data for MI04

    Hi,
    Which is the best way to uplaod data to MI04 tcode. When i am trying with the BDC iin All screen mode it is throughing error after entering the quantity. Error is : Background processing not possible for material with serial number reqmt.
    Thanks

    use ''BAPI_MATPHYSINV_COUNT' bapi...
    u have to fill all the structures or ITAB which are mandatory. Then pass them to this BAPI. after that use BAPI_TRANSACTION_COMMIT to update the database
    and how to create .txt file to upload data to this transaction.
    the text file should contain all the fields which are necessary to pass to bapai structures /ITABs
    better , u can run the corresponding trn.. to know all mandt fields
    U can use GUI_upload to upload the flat file.
    Reward if useful

  • BAPI for transaction MI10

    Hi Gurus,
    Can you please tell me if there is any BAPI for transaction MI10(post document,count and difference: initial screen).
    Is there any standard IDOC type for inventory management or any message type associated with inventory management IDoc.
    Thanks

    Hi,
       check with below BAPIs
    BAPI_MATPHYSINV_CHANGECOUNT Change count for particular items of a phys. inv. doc.
    BAPI_MATPHYSINV_COUNT Enter count for particular items of a phys. inv. doc.
    BAPI_MATPHYSINV_CREATE Create physical inventory document
    BAPI_MATPHYSINV_CREATE_MULT Create physical inventory document
    BAPI_MATPHYSINV_GETDETAIL Read items for a physical inventory document
    BAPI_MATPHYSINV_GETITEMS Read list of physical inventory documents with items
    BAPI_MATPHYSINV_GETLIST Read list of phys. inv. documents
    BAPI_MATPHYSINV_POSTDIFF Post differences for certain items in a phys. inv. document
    Thanks,
    Asit Purbey.

Maybe you are looking for