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

'BAPI_MATERIAL_AVAILABILITY' dont return ATP quantity after calling BAPI_SALESORDER_SIMULATE

shobhan_rana
Explorer
0 Likes
1,827

Hello Abap-Gurus,

  1. if i call BAPI_MATERIAL_AVAILABILITY independently it functions well.

2. if i call BAPI_MATERIAL_AVAILABILITY after BAPI_SALESORDER_SIMULATE to get prices for material and customer comination the Simulation works and returns the prices. However right after i call BAPI_MATERIAL_AVAILABILITY it does not return the available quantity with the same input of point 1, where it previously returned the available quantity.

Could you clear why BAPI_MATERIAL_AVAILABILITY is returning 0 as available quantity after calling BAPI_SALESORDER_SIMULATE ?

Best Regards

Shobhan Rana

1 ACCEPTED SOLUTION
Read only

shobhan_rana
Explorer
0 Likes
1,657

Done it by preventing not to run the BAPI_AVAILABILITY_CHECK second time for the same material number when it had already happened the Price simulation.

3 REPLIES 3
Read only

vijay_hariharan
Contributor
0 Likes
1,656

Hello,

The documentation mentions that this runs the same interface as BAPI_SALESORDER_CREATEFROMDAT1 bapi-so-simu-doc.jpg
Maybe you can do a BAPI_TRANSACTION_ROLLBACK and then run the BAPI_MATERIAL_AVAILABILITY and check.. some updates running hence unable to check myself for now..

Regards,
Vijay

Read only

shobhan_rana
Explorer
0 Likes
1,656

How do you say that BAPI_TRANSACTION_ROLLBACK will help when it is mearly all about data read?

Read only

shobhan_rana
Explorer
0 Likes
1,658

Done it by preventing not to run the BAPI_AVAILABILITY_CHECK second time for the same material number when it had already happened the Price simulation.