I have confront following problem in SO items quantity checking :
When I process the checking in SO items , I need to know the whole item list which have already been inputed by user.
But in USER-EXIT SAPMV45A_CHECK_VBAP, I can not found the table that contained the whole content which be saw
in screen. And I also can not use the SAPMV45A_SAVE_PREPARE, for I am using the BAPI to simulate the process of
creating SO and catch some error.
So, the USER-EXIT SAPMV45A_CHECK_VBAP is the one what I can only use in the BAPI checking.
Have someone got any idea?
0010 material A 100 PC
0020 material B 200 PC
When I begin to chek material A , I need to know the material B quantity too, for material B is the alternative material of A,
if the control quota is 299 PC. The program should not let the material A with 100 PC or material B wiht 200 PC pass the checking. As material A + material B = 300 PC > 299 PC (control quota)
have you check the XVBAP[ ] internal table it will contain the values of all the line items from sales order, also check YVBAP[ ]
i think you are checking the fields VBAP which is a structure and it contains current line entry from the no of times (no of line items )USEREXIT_CHECK_VBAP executes.
Since I found the XVBAP will be filled one line by on line when item checking is prcessed in SAPMV45A_CHECK_VBAP.
So I try to check the quota in the last line when the XBAP is full of data. Or persuade the customer the logic that
when B is aternative materil of A , material A is vice verse, then I can chek the alternative material when it appear again.