Enterprise Resource Planning Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
gabrieltreib
Advisor
Advisor
535

Hi everyone,

Have you ever been stuck during the billing document creation with an error message, and you couldn't debug it?

Let's imagine that you are using transaction VF01, you have entered a SD document, and the system only issues the error message "No billing documents were generated. Please see the log".

log error 1.png

This is not enough for you, so you hit the "Log", and system will display the actual error raised.
In this scenario, we have error with Message ID "VF", Message class "017".
If you simply try to add a breakpoint to Message ID "VF", Message class "017" on debugger, system won't stop at program that issued this message.
This is caused by the fact that the Billing errors are stored into table VBFS, instead of using statement MESSAGE, in order to not stop the Billing document creation via batch job, but still shows the user the error to why that SD document was not invoiced.

To debug this message, you can add a breakpoint into include LV60AA98. This include is related to form VBFS_HINZUFUEGEN, called by Billing programs to issue the error on the programs of package VF.
Then, after adding the breakpoint and starting the billing creation again, you can go one step back on the call stack to find the program/logic that have called this include.

Screenshot 2025-05-26 at 16.38.57.png

In this example, the system have issued VF017 because it failed on the validation of the "Billing status"(VBUK-FKSTK), so it called VBFS_HINZUFUEGEN to store the error.
This error is related to a Copy control routine, but this error is also issued for regular program messages like VF188/VF056(related to billing cancellation error).

If you are adding some non-standard logic to billing document creation, make sure to always store the errors in VBFS via VBFS_HINZUFUEGEN(LV60AA98).
You may also check SAP KBA 2107348 - Whole billing job cancelled due to a message in a single sales document that explains what happens if you issue a MESSAGE during a batch job.

I hope this quick explanation can ease your analysis of the billing errors during debugging!

3 Comments