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: 

SD Order simulation is not working well

christian_swonke
Participant
0 Kudos

Hi experts,

I am trying to implement an order simulation function module for third party systems. Therefore I implemented an RFC function module which is calling  BAPI_SALESORDER_SIMULATE internaly.

Now I have the problem that in some cases the  BAPI_SALESORDER_SIMULATE is returning no result - in detail: no export order positions.

The error is very often "Address category does not exist" (Message class VP, number 700). But sometimes not error message is inside return table.

For this problem I found the SAP node 1487132.

So I call the function  SD_SALES_DOCUMENT_INIT before BAPI_SALESORDER_SIMULATE. Without any parameters.

The result is similiar. The order simulation is not working well all the time...

It seems if the order simulation is gone wrong one time, all following calls will also go wrong without erro message in return table. Are there any lock entries or something like this?

Has anybody else further ideas?

Regards

Christian

1 ACCEPTED SOLUTION

Jelena
Active Contributor
0 Kudos

I'm a bit confused by that "common part problem" mentioned in the note (and the note it refers to). There is an old SCN post about a "common part" issue, not the same one you have but maybe it'll provide some clues where to look:

If I understood the note correctly, this can happen because of some shady development. If you are just calling BAPI in your FM then you might want to check if there is anything odd in the user exits/enhancements that get triggered during the BAPI call.

3 REPLIES 3

Jelena
Active Contributor
0 Kudos

I'm a bit confused by that "common part problem" mentioned in the note (and the note it refers to). There is an old SCN post about a "common part" issue, not the same one you have but maybe it'll provide some clues where to look:

If I understood the note correctly, this can happen because of some shady development. If you are just calling BAPI in your FM then you might want to check if there is anything odd in the user exits/enhancements that get triggered during the BAPI call.

0 Kudos

I checked your link.

Of course this could be the problem but for me it is not a really good solution.

Because it means that I have to copy the whole BAPI_SALESORDER_SIMULATE and integrate it direectly to my own application to avoid the function module call itself.

It seems that the common part problem is occured by some enhancement inside the BAPI. But for the moment I can not identify this changes in detail.

I used now an Z-function module where is doing more or less the same (order creation with test flag). For the moment this seems to be a workaround.

Regards

Christian

Jelena
Active Contributor
0 Kudos

I'm not sure why you believe you'd have to copy the BAPI. How would it solve the problem? Both BAPIs and transactions eventually arrive at the same SD... function module. So unless you copy every single program you'd still hit whatever is causing this issue.

There are only a few user exits in SD, they are well documented and can be found on Google. BADIs have been added only recently, so I doubt they'd be implemented already. Either way, Google search will also find many SCN posts on how to find a BADI or enhancement point.

I've heard ANST transaction is also capable of finding such things, but have not used it in that way (there are posts on SCN on it too). Sometimes simply asking around can help. Lots of options.