cancel
Showing results for 
Search instead for 
Did you mean: 

Preventing billing split for multiple deliveries (over-riding billing date)

Former Member
0 Kudos

Hi all,

I have multiple deliveries which should be invoiced into ONE billing document. The only difference between the deliveries is the billing date, which is why it is splitting.

I am therefore copying routine 001 and in VOFM and adding this code to the end of it:


  vbrk-fkdat = sy-datum.     "prevent split due to difference in billing date

This is great and working fine because when I have 2 deliveries with diff. billing dates, it will take todays date. The only problem is when:

1. Billing for a single document (dated 11/08/2011), it will over-write it and set the date to today (17/08/2011)

2. Billing for 2 documents with the same date

What is the best way around this?

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

No modifications need to be made, there is a field in VF04 that will help you with this

Former Member
0 Kudos

Hi,

Let your logic of moving sy-datum be as it is..

now in exit V05IEXIT, in FORM USEREXIT_VKDFS_SORTKRI_DEL redetermine the actual PGI date and assign it back to FKDAT.

Let us know if this works?

Regards,

Raghu.

od_manikandan
Active Contributor
0 Kudos

Hai,

Put a condition before date assignment,

If delivery documents are more than 1 do vbrk-fkdat = sy-datum else endif.

Regards,

Mani

Former Member
0 Kudos

hi all,

Thanks for the input. I understand the logic on how to do it, but my main concern here is how.

I'm not sure how to determine if there is more than 1 delivery document. I've looked at the global variables and havn't found one where it is stored.

former_member209761
Active Contributor
0 Kudos

Dear Pistols123,

1. Billing for a single document (dated 11/08/2011), it will over-write it and set the date to today (17/08/2011)

Here can't you write the code to check whether there is only one billing document, if so omit your code for the date manipulation.

So that system will not assign system date, but will take the orginal date (actual good issue date or billing date entered in vf01)

2. Billing for 2 documents with the same date

write the code to check whether all the billing documents have the same date , if so omit your code for the date manipulation.

So that system will not assign system date, but will take the orginal date (actual good issue date or billing date entered in vf01)

Thanks & Regards,

Hegal K Charles