Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Excluding order from BAPI_MATERIAL_AVAILABILITY

roland_spindler
Participant
0 Likes
516

Hi,

I'm using FM BAPI_MATERIAL_AVAILABILITY to determine the availability for a certain material.

Example: 3 pieces available

Sales order X needs 2 pieces

=> This should work.

However, when I call the BAPI to check if the sales order can be fulfilled, I only get 1 available piece, because the other 2 have already been assigned to sales order X!

How do I use the BAPI to check if sales order X can be fulfilled, i.e. how do I exclude the material already assigned to this order?

I already tried to provide sales order + position number to the BAPI, but this did not work. What's my mistake?

Thanks in advance

Roland

2 REPLIES 2
Read only

Former Member
0 Likes
418

Hello Roland,

did you create the sales order already?

Normally the BAPI is called during the creation of the sales order, and in case of unavailability of the material the sales order doesnt get created.

Because the BAPI expliciteley checks the availability of materials including sales orders.

another thing you could do is not to use that BAPI, but just check against

MARC-labst. which is the availability with sales orders not calculated.

Read only

0 Likes
418

Hello Florian,

Yes, the sales order already exists. I want to display a list of sales orders including their material availability.

> another thing you could do is not to use that BAPI, but just check against

> MARC-labst. which is the availability with sales orders not calculated.

True, but I also want to include upcoming deliveries, so I can tell for example that the sales order can be fulfilled tomorrow.

Roland