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: 

Sales Order - Error while changing using BAPI

Former Member
0 Kudos

Hi,

I would want to compare the system price and the expected price for a sales order and in case of any discrepancy, set a 'reason for rejection' code. I'm using the bapi 'BAPI_SALESORDER_CHANGE' to make changes to the sales order (setting the rejection code). This is working fine in cases where there is some value for both the prices but is throwing an error while the system price is null.

Is there any way to overcome this error and still set the rejection code or should we make any changes in the config to let the system allow to save changes when the system price is null.

Thanks in advance.

3 REPLIES 3

Former Member
0 Kudos

Error Message:

No Sales Price (YYYY) for material XXXXX line IIII. Order will be incomplete.

Message no. ZZ054

Diagnosis

The system could not determine a Sales Price (YYYY) for material 1. line 2..

System Response

The entire order will become incomplete when you save it.

0 Kudos

Hi Niranchan,

I would recommend you to first verify this by performing the transaction manually. Ask the functional consultant to do this scenario of changing the Sales Order manually where the pricing is missing. Based on the errors received or not you can verify your code.

I suppose the system should not allow this manually also. Hence, a config change may be expected.

Regards,

Pranav.

0 Kudos

The message you mention - ZZ054 - seems to be a non-standard one - it may be generated by some of your user-exits. Check this in SE91-> "Where-used list" (standard system should allow saving the document in case of incimplete pricing - that's why you may have an exit which prevents this).

If so, you might modify your user-exits accordingly - to allow saving the document in cases defined by you.

Another approach (not sure if this will be a solution in this case but you may check): see parameter BEHAVE_WHEN_ERROR of fm BAPI_SALESORDER_CHANGE.

regards