cancel
Showing results for 
Search instead for 
Did you mean: 

Billing Block field in Sales Order Header is greyed out

saleem_sufyaan
Explorer
0 Kudos

Dear Experts,

We have a Sales order with the combination of Delivery items and Service items, where service items are invoiced with reference to Sales order and Others are invoiced through Delivery. Sales order is fully invoiced and Billing block field at Sales order header is greyed out as per Standard behavior. When we cancel Invoice for any Service Item Billing block is enabling and whereas if we cancel for delivery Item Billing Block is still in greyed out and we cannot update the billing block at SO header Level. I'm an Abaper, so I'm not sure its a standard behavior or something to do to enable billing block after delivery item invoice is cancelled. Can you please help me here. When we debug program is checking the below condition

( VBUK-FKSTK = C' AND VBUK-FKSAK = 'C' ) OR
( VBUK-FKSTK = ' ' AND VBUK-FKSAK = 'C' ) OR
( VBUK-FKSTK = 'C' AND VBUK-FKSAK = ' ' ) AND
VBAK-FAKSK IS INITIAL.

Since delivery items invoice cancellation is not updating from 'C' to 'B' for field VBUK-FKSTK, where as it is updating

VBUK-FKSAK properly for service items.

Thanks,

Saleem.

Accepted Solutions (1)

Accepted Solutions (1)

VeselinaPeykova
Active Contributor
0 Kudos

I think that the code which you mentioned, is from MV45AFFE_FELDAUSWAHL_STATUS.

If this is the case - yes, this is the standard SAP logic.

Customer-specific logic for field status can be found and set in MV45AFZZ, USEREXIT_FIELD_MODIFICATION.

What I would do in this situation (assuming that you do not want to write additional code just to correct a single document) is to add temporarily an order-related item to the sales order in VA02 - just to enable the field for billing block, set the billing block, then remove the item via the delete item button and press Save.

Of course, if you think that you need logic deviating from the standard for your regular processes you may consider adding it in the exit that I mentioned.

saleem_sufyaan
Explorer
0 Kudos

Thank you so much for your reply. Yes, its a standard logic is from MV45AFFE_FELDAUSWAHL_STATUS.

I don't want to deviate the process from standard for the Sales order, Just wanted to know whether it is a standard behavior if the Order has Delivery items and Service Items, because When we cancel invoice for Sales items VBUK is updating properly and where as it is not for Delivery items.

VeselinaPeykova
Active Contributor
0 Kudos

saleem.sufyaan yes, I can confirm that this is a standard SAP behavior, I replicated the case in a sandbox.

saleem_sufyaan
Explorer
0 Kudos

Thank for confirming. Yes, it looks as a standard behavior. Can you please provide any document reference or any SAP note regarding this would be helpful. Really appreciate you for helping me on this.

VeselinaPeykova
Active Contributor

saleem.sufyaan I am not sure what kind of document may be useful in your case.

There is a SAP note explaining how to find why a field is not ready for input in the sales order 208245 - Availability of fields in sales orders.

It is a bit too generic, I guess, unless you are supposed to prove to somebody that the logic is SAP standard. But you already know that this is coming from standard code, you have debugged it and you would have noticed if there was some enhancement (I cannot imagine why anyone would add an enhancement there, when you have MV45AFZZ, but some folks can be really creative). You could show to the functional consultant that the code is not modified, but basically, that's it.

The solution which I mentioned for overcoming the challenge (adding an item relevant for order-related billing) - I did not read it in any note, my idea was based on this code in MV45AFFE_FELDAUSWAHL_STATUS:

WHEN 'FAKSK'.
      IF ( xvbuk-fkstk CA 'C' AND
         xvbuk-fksak CA 'C' OR
         xvbuk-fkstk CA ' ' AND
         xvbuk-fksak CA 'C' OR
         xvbuk-fkstk CA 'C' AND
         xvbuk-fksak CA ' ' ) AND
         vbak-faksk IS INITIAL.
        screen-input = 0.
      ENDIF

By adding temporarily an item relevant for order-related billing XVBUK-FKSAK becomes 'B' and in this case screen-input is not set to 0.

saleem_sufyaan
Explorer
0 Kudos

veselina.peykovaThank you so much for your help.

Answers (1)

Answers (1)

z001603
Explorer
0 Kudos

Hi,

Could you please try to delete billing block using transaction V.23 ?

Thanks,

Munvar.

VeselinaPeykova
Active Contributor
0 Kudos

V.23 won't work in this case, they want to set the billing block, not delete it.

Of course, they could have set billing block in the delivery, but in many companies billing clerks are not authorized to modify deliveries, which is probably why the question came in the first place.