cancel
Showing results for 
Search instead for 
Did you mean: 

Billing Block removal not updated in the sales order change log

former_member184555
Active Contributor
0 Kudos

Hi Gurus,

A specific Billing Block is automatically assigned to the sales document header (VBAK-FAKSK) when the net value of the sales order is negative. This is an order related billing.

Sometimes the Billing block is getting released automatically and the Negative Invoice is getting created in the Background job run for creating the invoices. When we check the sales order, the Billing block is not existing and the removal of the billing block is not recorded in the Change Log of the sales order.In the CDHDR table also there are no details about the release of the billing block.

This is happening only occassionally. When I tried to replicate the issue, the system is not allowing me to create the invoice as long as the billing block is there in the sales order and if I remove the block, it is recorded in the sales order change log.

My doubt is.,

1. How the billing block is getting released automatically?

2. Even if the block is released, why it is not recorded in the Change Log of the sales order?

Looking forward your for suggestions and solutions.

Thanks,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ravi,

This is kind of strange.

You might want to add a check through user-exit when saving the order that the billing block is filled when the net value is negative. At the same time you might want to track (also through user-exit) the user name who released the billing block and the release time. This way you will not need to rely anymore on the standard change log.

It is probably a redundant functionality / checking, but you will sleep better at night and be able to offer a most robust process to your (internal) Customer.

Regards,

Franck

Answers (5)

Answers (5)

former_member184555
Active Contributor
0 Kudos

Hi Jelena,

This is really a strange behaviour. I couldn't replicate the issue and hence finding it difficult to analyse. Thanks a lot for your efforts to help.

Thanks,

Ravi

former_member184555
Active Contributor
0 Kudos

Hi

The assignment of the billing block is perfectly working. The userexit is SAVE_DOCUMENT_PREPARE.

The program used to create the invoices is SDBILLDL only. In the variant, the checkbox to exclude the variants....it filters the documents with billing block and they will not appear in the billing due list. Even if this is not checked and even if the blocked documents included in the Billing due list....the invoices will not be created and the log will show that the invoices are not created because of the billing block.

It is order related billing and the invoices are created everyday and this issue is happening occassionally.

I have searched for the OSS Notes with different search strings, but couldn't find any related notes. If you are aware of any related Notes, please provide me the note numbers.

Thanks,

Ravi

Jelena
Active Contributor
0 Kudos

In this case I can only suggest to write to SAP about this...

former_member184555
Active Contributor
0 Kudos

Hi Jelena,

Sorry for not mentioning that, the billing block is assigned because of coding in the userexit. System checks the net value of the order and if it is negative, it applies the block.

The invoices are created through a scheduled background job.

When we check the corresponding sales order of a negative invoice, the filed Header - Billing document - Billing block is Blank (which is supposed to have this specific billing block). The order change log doesn't have any details of the removal of the block.

Thanks,

Ravi

Jelena
Active Contributor
0 Kudos

Which user exit do you use specifically? Is it the one for VBAK or SAVE_DOCUMENT_PREPARE?

What program do you use to create the invoices? SDBILLDL? It should create a log, unless it's been disabled on purpose. What do you see in that log? Also on the selection screen for this program there is a checkbox to exclude blocked documents. Is it checked?

Also just to make sure - do you have the order-related billing?

Did you look at the OSS notes? There are quite a few for the billing block issues...

former_member184555
Active Contributor
0 Kudos

Hi Frank and Jelena,

Thanks for your replies.

The users input manual discounts in the order thro VA02 and by mistake if more discounts are given and if the netvalue becomes negative, this specific billing block will be assigned automatically and this change is recorded in the Change log also. Sometimes this block is getting released and the negative invoices are getting created and the removal of the block is not getting recorded in the sales order change log.

Thanks,

Ravi

Jelena
Active Contributor
0 Kudos

I still don't quite understand how exactly this process work. How is the block "assigned automatically"? Do you have some configuration for it or is it a user exit?

If there is no record in the change log, why do you think the block has been released? Just because an invoice has been created? Who/what creates the invoices? If it's a mass process, check all the additional logs - job log and billing log. There must be some kind of a message somewhere...

If you use any custom ABAP reports in this process, I would check them too. Sometimes programmers use function modules that are not released by SAP and not meant for what they're being used. Hypothetically, it's also possible to delete the change documents after the update.

Jelena
Active Contributor
0 Kudos

Ravi, I think that your assumption that billing block has been applied and then miraculously "released automatically" and, on top of that, this change was not reflected in the change documents, is incorrect. In fact, all evidence points that the block was never applied in the first place. If you see that there is no block now and no change has been recorded, why do you assume that the block was ever there?

How exactly is the billing block applied? Is it a user exit or some custom program? If it's a user exit, there might be some programming error (e.g. some conditions were not programmed for). Sometimes users just do strangest things... I would also look at update terminations (SM13), maybe the update just didn't go through.

If billing block is updated by a program (in background job, for example), the document locking or a conflict with another update is the most likely issue. Once we used BAPI to update rejection reason and sometimes the lines were not updated. We also could not catch it in the test system. It turned out that the delivery was not processed completely for the order at the time when the program ran and, therefore, the field could not be changed. BAPI did not return an error message (type E), but, when we changed the program to display all messages, it became clear.