Skip to Content
avatar image
-3
Former Member

Would you know a function or a bapi that can give me the stock for a material in a specific day?

Would you know a function or a bapi that can give me the stock for a

material in a specific day?
i founded a bapi called bapi_material_availability but it doesn't give the
stock in a past day.

i need for storag location with batch

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jun 02, 2017 at 09:57 PM

    There is no such BAPI or function, there is a transaction with a huge program: MB5B. The stock of a certain day in the past is not stored in a table, the program starts with todays stock and calculates backwards based on the movements.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 03, 2017 at 09:27 AM

    If you could share the business background for this information then we might have alternative ideas.

    I am doing SAP for 20 years and did other systems before, but to know how much stock I had on the second Thursday in March was never a figure to drive our business.

    If such information is extremely important for your business and you are concerned about performance then it might be worth to copy the stock information every day at midnight into a Z-table. So you can quickly access the needed information with a single select.

    Or you run MB52 report daily and store the list in an archive. Just depends on the requirements, like how often needs someone to know this info, for what reason and if it is enough to read it from a list or if you need to compute it further

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      most of time we have pending sales order we need to enter and completed to invoices in Previous Month before closing the month

      without know the availability of material batch it took much time to determine which batch available.

      for example : if today is : 05/06/2017 i need to make invoices in 31/05/2017 before closing month 05 /2017

  • Jun 05, 2017 at 07:42 AM

    Think again - is your business really that different to any business at any SAP customer world wide? If all customers would need such BAPI to invoices then it was probably available.

    From your text it is unfortunately not explained with a reason, just with a wish. Also the logical flow of the business case is not really explained in a way strangers could understand it.

    Why is it needed to know the availability of a batch if you want to post an invoice?

    Why can't you use GR based Invoice verification?

    Add comment
    10|10000 characters needed characters exceeded

    • Sorry this is even more confusing. Now you even turned from a simple stock quantity into availability check. If you want to post a goods issue then you should actually know what you have put onto a van and not just theoretically determine something.

  • Jun 12, 2017 at 08:45 PM

    Looks like they are having business process issues in trying to get users to actually acknowledge picking or PGI when the delivery gets sent out. There are a lot of better ways to solve this issue. For one you can tie the printing of required outputs such as a packing list or bill of lading to the PGI. No PGI -> no documents -> can't ship. You can also change your ATP check control to consider existing deliveries. That way the new deliveries can not be created if there is not enough material to satisfy the old deliveries plus the new ones.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 14, 2017 at 05:59 AM

    Hello Ahmed,

    Check with the below document.

    https://blogs.sap.com/2012/11/30/getting-opening-and-closing-quantities-of-stock-with-accuracy-of-mb5b/

    MB5B is a very well tuned program so it should not raise performance concerns.

    Thanks,

    Sijin

    Add comment
    10|10000 characters needed characters exceeded

    • Yes exactly.

      With my first employer the amount of material transactions was moderate ( not that high and not that low ).

      And the report which we created based on MB5B used to be run in background jobs like many other FICO related reports. And the report was mainly run on month end times. So we never faced any issues instead we got a perfect Stock report :) and of course with Opening and Closing as accurate as MB5B's ;)