on 05-02-2013 9:39 AM
Hi teams,
now , I have a request , and I want to serch a material's available quantity in a query link vbak,
if I select document NO. or created date of SO and plant ,act..
then i can get the result as below.
may be BAPI_MATERIAL_AVAILABILITY can help ,
but there is no abaper.
any one can give the code...
Hi Ding,
Use RV_AVAILABILITY_CHECK
This is the standard function module used by SAP.
or otherwise you can use the BAPI_MATERIAL_AVAILABILITY
for code search for where used list in your system , you should be able to find the usegae in many places.
Thanks,
Siva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why don't you try to use standard transaction codes like CO09?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ding,
This is exactly what CO09 displays in the Cumul. ATP Quantity.
In the "Cumul ATP Qty" column, the quantity = Total Receipts - (Total Issues OR Confirmed Issues).
The system will consider total issues if the "With Req Qty" flag is set in the initial screen of CO09, otherwise it considers the confirmed issues.
You should be able to see the figure you want in CO09 on the "Stock" line in the "Cumul ATP Qty" column.
The calculation of these values is somewhat complex as it involves adding values from a variety of sources. The value you see in the total receipts field is not actually stored in the database but it is calculated at runtime [by CO09] by gathering all the stock / receipts on your system and summing them up. The issue fields are calculated in a similar way. This happens via the following call stack:
SAPLATP3 FORM BUILD_ATP_STACK_05
SAPLATP3 FORM CALC_ATP_BASIS_06
SAPLATP3 FUNCTION ATP_CHECK_BASIS
SAPLATP0 FORM ATP_CHECK
SAPLATP0 FORM SEGMENT_CHECK
SAPLATP0 FUNCTION AVAILABILITY_CHECK_EXECUTE
SAPLATP3 FORM BUILD_ATP_STACK_05 < Pretty much happens in here if you want to check the code yourself [data objects P_SUM_R / P_SUM_I]
Hope this helps.
The problem with looking at VBBE is that it shall only consider the issues - it will not consider the planned stock receipts (like production orders, or planned orders for example).
From the CO09 screenshot, it is apparent that receipts are being considered (as the value in the total receipts is > than the on hand stock). Therefore, to calculate the value that you want, these need to be considered. This is actually done in FM STOCK_RECEIPT_ISSUE_READ (not released). I do not think the calculation is as simple as you think it is...... If you were not considering receipts in your system, then the calculation could be much simpler (something like MARD-LABST [unrestricted stock] - VBBE-VMENG). The BAPI that you mention at the beginning could actually be the easiest solution to this.
Hi,
You will not get the ATP quantity from Transaction document
if you want the confirmed quantity then you can get this from VBEP-BMENG
regards,
santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ding,
Can you please elaborate your requirement ??
Do you mean to say that : You want the quantity that is made available for a line item in given sales order ? If that is the case then this is readily available in schedule line. The table for schedule line is VBEP. VBEP -BMENG will be ATP quantity i.e confirmed quantity. There can be a situation where multiple schedule lines exists. The gross confirmed quantity can be read from VBAP also.
Hope this will help you.
Thanks and Regards,
Atulkumar Dagade
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Confirmed Qty can be Checked at VBAP Table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.