cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Billing Documents via Back ground job for billing

Former Member
0 Kudos

Hi all,

I am using “Create Background Job for billing “in CRM. This background job will run daily as a nightly batch process. I had created a variant for the same and attached to the Transaction SM36 and scheduled the job as periodic i.e. job will run daily. The customer requirement is that, if any due list items is scheduled to be billed falls on the holiday for e.g. Saturday, Sunday or other public holidays, the billing run which happens on the last working day should pick up all the due list items which is scheduled to be billed on these holidays and create a billing document .

e.g. If any billing due list items scheduled to be billed on Saturday or Sunday, the billing run program which runs on Friday should pick up all the due list items which is ready for billing on Saturday and Sunday and create a billing document in the Friday billing run. The billing run will happen as per the factory calendar.

Same process will be followed for public holidays also.

Can any one help me in this regard on how to go about addressing this issue?

Your valuable help in this regard is highly appreciated

Accepted Solutions (0)

Answers (1)

Answers (1)

ralf_rubel
Advisor
Advisor
0 Kudos

Hello Chittoori,

possibly the following approach works.

You define a second job wich runs before the regular billing job. This additional job selects all billing due list entries which should be billed earlier:

day = today + 1.

while day is not workday

select billing due list with bill_date = day.

set bill_date to today.

update billing due list.

day = day + 1.

endwhile

Later the regular billing job will catch up all due list entries from today including public holidays or weekend.

Best regards

Ralf