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.
Showing results for 
Search instead for 
Did you mean: 


Former Member
0 Kudos

Hi ,

I am using BAPI_SALESORDER_SIMULATE to get the price for a Material Entered by user in our Custom Transaction to show the Sales price once entered on the screen. If BAPI returns me ZERO price then we give a Popup to users to enter the Price and we create the same in VK11 transaction using the Condition type and this we do using Call Transaction and its synchronous . After this is called I am again using BAPI to get the price but some times BAPI returns me the price where as some times it doesn't return and as per the code the popup again comes infront of  user to enter the price .

I am not sure why BAPI simulate works like this its not consistent in getting the price always which is creating problems as popup would come for users to re-enter the price again and again . When I see VK13 price is already created.

Guys can you come up with suggestions as of where I am going wrong, any tips would be helpful.

Thanks & Regards,



Former Member
0 Kudos

Without seeing the process run, I would venture a guess that you're updating a condition table with VK11, but simulate is reading a different condition table looking for the price?

In my past experience with this, I used simulate for certain conditions I could identify, but read an Annn table in other situations. 

Have you reviewed the pricing determination analysis for the customer, sales area and material (via VA01 in your test system) to see if pricing is doing something you didn't expect in some situations?

0 Kudos

Yes thru VK11 I am updating the Condition type that is used by the pricing procedure which is liked to the Order Type . And the same Order Type I am passing to the BAPI . As said it ready 60 to 70% of the time and the remaining time it doenst.

And coming to VA01 , I tried that and it gets the price . I think its some thing related to timming issue but I need to overcome this ans Users are finding it really difficult as this is Retail Business and Customers would be sitting infornt of them and they cant tell the price.

0 Kudos

Our client is in Retail business and Customer walks to our store to buy parts .

Then our users logs into Custom Sales Order transaction and enters the Header data for sales Order creation and comes to Items data and enters the Material Number .

At this moment I use BAPI_SALESORDER_SIMULATE to get the Customer Price and this function Module does return the price for me. But if the Price is ZERO then I come up with a popup asking user to enter the New Price so that I can create the same instantly on the same screen . Once user enters the necessary info like Vendor number , Cost and Sale Price , I got to VK11 to create the SD pricing and ME11 to create the Purchase info record. After the information is saved I again Call BAPI_SALESORDER_SIMULATE to get the Price of the Part entered . Now here some times the BAPI returns the price and some times it doesnt.

This happens when user is trying to enter more than 5 or 10 materials as the Price popup comes and ask users to enter the price if the price is expired and we are creating the Price in the same session after user enters the data and again calling BAPI to get the Price.

Its not always that BAPI fails to get the price its like 60% of the time it gets the prices and remaining time it doent get the price. I tried looking into the conditions record to see if they are created and its created . It looks like timming issue for me.

As I saw that when the popup was coming again even after entering the Price which was created , I closed the popup and manually entered the part on the screen and it pulls the price.

Kindly suggest me how to solve the problem ,

Thanks & Regards,