cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with BAPI_SALESORDER_SIMULATE for manual freight condition

KK07
Contributor
0 Kudos

Hi,

I need to simulate the sales order, so am using BAPI BAPI_SALESORDER_SIMULATE to get the sales order from reference quotation. It is working as expected for most of the time, but for one material, one manual condition(freight charges) it is calculating as 0. however if we use the same quotation in VA01, it is calculating correctly. after debugging, I found that CVBAP-ORFMNG field value is set to 0 incase of bapi where as 10 incase of VA01. does any one know why this happening? any place to check in configuration etc?

Can the above BAPI be useful for manual conditions? or is there any seperate BAPI available?

Accepted Solutions (1)

Accepted Solutions (1)

VeselinaPeykova
Active Contributor

I don't think that this is a configuration problem. If it were - then the reference quantity will not be populated in VA01 as well.

Anyways, I am a bit confused - you mentioned that the problematic condition is a manual freight condition. In this case - what values do you populate exactly for it and how? My understanding about this BAPI is that you cannot specify conditions like in BAPI_SALESORDER_CREATEFROMDAT2. The reason why I mention there are certain specifics in using BAPIs for creation with reference - unless you use BAPI_SALESDOCUMENT_COPY you do not actually transfer the pricing, item categories, etc. from the referenced document and you have to replicate the copy control logic by yourself. Read 370988 - BAPIs in SD: Creation with reference if you do not believe me 🙂

Taking this into account, most probably you will observe a similar problem if you modify manually in the quotation a pricing condition that is determined via condition records, but is modifiable in the quotation - in the order simulation you will see the default value that is determined when you create an order in VA01 without reference and do not modify the condition value and not the value that you set in the quotation.

I suppose that the same note which I mentioned can explain why in your case the referenced quantity is zero.

Edit: Actually, you can enter up to 4 conditions per item with BAPI_SALESORDER_SIMULATE, which might or might not be sufficient in your processes.

Answers (2)

Answers (2)

sriram_ramesh
Participant
0 Kudos

Check MV45AFZZ or if there is requirement routine created that modifies this value.

VOFM -> Requirements

former_member182371
Active Contributor
0 Kudos

Hi,

check in MV45AFZZ and see if there is any routine affecting field ORFMNG

Best regards,

Pablo