cancel
Showing results for 
Search instead for 
Did you mean: 

Order Output should be supressed when all items are rejected

Former Member
0 Kudos

We have a requirement, where when all schedule lines in a sales order are rejected the order confirmation output should be suppressed.

This is what we did to achieve it.

Using the customer modification structure KOMKBZ3, add a new field ZZ_ALL_SL_REJ . This field is an indicator that will be set if all all items in a sales order are rejected.

Call function KOMKBV1_FILL to populate the communication structure KOMKBV1. The function calls USEREXIT_KOMKBV1_FILL, which is the header level user exit routine.

In this user exit, through a select statement read table J_3AVBUE, and check for all schedule lines if 'ABSTA' equals C, if this is true the ZZ_ALL_SL_REJ indicator is set to ‘X’.

Then in the output requirement routine 900, see if KOMKBV1-ZZ_ALL_SL_REJ is set to 'X', if so set the return code to be 4.

However when we reject items in sales order and save it, we have to go back in again and save it for the second time for the output determination to be carried out again.

Could someone help with this...

Thanks.

Anne

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I believe an easier method would be to check KOMKBV1-ABSTK in the output requirement. If it's 'C', then all items have been rejected.

Cheers, Paul.