Application Development 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: 

'BAPI_MATERIAL_AVAILABILITY' dont return ATP quantity after calling BAPI_SALESORDER_SIMULATE

shobhan_rana
Explorer
0 Kudos

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

shobhan_rana
Explorer
0 Kudos

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

vijay_hariharan
Contributor
0 Kudos

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

shobhan_rana
Explorer
0 Kudos

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

shobhan_rana
Explorer
0 Kudos

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.