Skip to Content

Skipping of the Physical Inventory Document Number


I'm creating Physical Inventory Document using BAPI_MATPHYSINV_CREATE_MULT. Also I'm passing muliple materials at once to create the document.

It works fine if all materials are stable. But if any of the materials is in error, IT_RETURN will give the error for the particular material and will block the creation of inventory for rest materials.

So as a work around, after the first execution, I'm removing the material which is in error and passing the rest materials.

This will create the document number successfully, but the issue is from the first execution the document number will be skipped. How do I overcome this issue of Skipping Inventory Document Number?



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Mar 11 at 03:41 PM

    Hi Naveen,

    I'm afraid there is all but nothing you can do here. It all depends on when a new number is drawn by BAPI_MATPHYSINV_CREATE_MULT function. If it's drawn early on before the checks, this number is lost in case of an error and you can't get it back. That's is somehow similar to material master creation - you enter MM01 transaction, a material number is automatically assigned and you can see it in MM01. If you don't save the data, the material number is lost. Next time you call MM01, a new material number will be assigned. See note 1646025 - Material number skipping while creating material in transaction MM01 or app "Create Material" for more details.

    I suppose BAPI_MATPHYSINV_CREATE_MULT is implemented in a similar way. You can check it by yourself, just put a break-point in NUMBER_GET_NEXT function and see when it's called during BAPI_MATPHYSINV_CREATE_MULT processing.

    Best regards

    Dominik Tylczynski

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.