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: 

Problem with BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Kudos
191

Hi ,

I am using BAPI_SALESORDER_CREATEFROMDAT2 to create sale orders and here we have a configuration which creates Service orders (IW31) automatically from sales order.

This BAPI is working fine and creating Service orders and notifications but in some cases it is behaving abnormally, the service orders are getting created properly but notification are getting created with %numbers eg : %000000001,

%00000002, I have tried with early number allocation for Notification number range also, still the problem persist.

Pls advice.

Regards

Giridhar

2 REPLIES 2

Former Member
0 Kudos
80

Hi

<u><b>Operations are using the following key in the METHODS table: %000000000010010 (order number+operation number)</b></u>

<b>Other points of interest related to the BAPIs is -></b>

<u>Serialization of BAPIs would have an issue with database update times. I mean, if the load on your system is high, the actual commit-work may not have happened, even if you called the bapi-transaction-commit! we have faced this issue often, and always resolved it by trying to enqueue the object and dequeue it each time we plan to use it. Check if your code works in debug-mode, where the execution will be much slower than real-time scenarios. If so, my point above is quite definitely the problem you're facing.</u>

Hope this will help.

Please reward suitable points, incase it suits your requirements.

Regards

- Atul

0 Kudos
80

Hi Atul,

How enqueue and dequeue resolve this problem, you mean to say forcing the the object to in idle state till the database updates happen. If possible could you explain and forward example code.

Regards

Giridhar