cancel
Showing results for 
Search instead for 
Did you mean: 

Skipping invoice creation in background batch job (using program SDBILLDL)

AmanSaxena
Participant
0 Kudos
While creating an invoice through SDBILLDL via job - we have to check error log. If any error is there while creating invoice, we should restrict the system not to create an invoice for that particular document and should continue for the rest of the documents. Also, that error message should be displayed in batch job log.

Here is an example:

Delivery documents: say 1,2,3

1-Invoice should generate

2-Invoice should not get generate because there is an error in line Item Material

3-Invoice should generate.


Ryan-Crosby
Active Contributor
0 Kudos
Are you suggesting that SAP doesn't already show an error in the log when one is encountered?
Rohit_Zalani
Participant
0 Kudos
Hi, I guess the question is based on the type of error. If there is an inherent issue to even create the billing document, the standard program would handle it. Seemingly, what you may be asking for is a "simulated" invoice before the final invoice is created. If the issue is with an accounting integration, you would still want to post the invoice and resolve that internal issue. The question is how does the system tell you of an error unless it has done completing the work required. Maybe you can use Preliminary billing document as a step with S/4 HANA ?
AmanSaxena
Participant
0 Kudos

In my case I have three line Items in Delivery/SO
Where for 2 line Items Materials extended properly and for 3rd It is not maintained so when I am creating IV manually, In log I can see below Error - 
"Material data not fully maintained for sales org.&1 &2 language &3." (VF 084)

During batch job run I am not getting this error in the log.

AmanSaxena
Participant
0 Kudos

Hi Rohit_Zalani,

Program SDBILLDL is using FM RV_INVOICE CREATE. So I am looking for any EXIT which can be used to restrict creation of final invoice for respective Delivery 

Accepted Solutions (0)

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos

Consider adding the logic to USEREXIT_FILL_VBRK_VBRP which is triggered when a billing document is created. Predominantly, during billing, if at all any issues are there, it would be pricing but you need to first list out what other issues faced or reported by Business so far and accordingly, you need to add the required logic to this exit