Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How do you Automatically Split an Invoice?

Former Member
0 Likes
3,484

We have a need to automate the splitting of an invoice when line/item exceeds a certain line count (determined by geography, i.e Bozotown wants to split every 100 lines).

I am looking for a user exit/BAPI/other to provide this opportunity to do this.

And to further more determine how to do this once the exit/BAOU/etc. is determined.

Any help or guidance is most appreciated.

1 ACCEPTED SOLUTION
Read only

eduardo_hinojosa
Active Contributor
0 Likes
2,844

Hi

Get the routine 006 (report FV60C006) as a template for your own customer VOFM routine and set it in copy rules. Usually, max billing items is for sales organization levels (field TVKO-MAXBI).

I hope this helps you

Regards

Eduardo

14 REPLIES 14
Read only

Former Member
0 Likes
2,844

Hi

The split of the invoice can be done in the copy routine (if you speak about sales invoice)

Max

Read only

0 Likes
2,844

Hi - what 'copy' routine are you referring to?

Read only

0 Likes
2,844

Hi

There are routines in order to transfer the data from sales document to the bill, here it can fill the field VBRK-ZUKRI in order to define an own logic for the split.

All routines can be found by trx VOFM, but which routines you're using can be found int the customizing

Max

Read only

0 Likes
2,844

Okay - got more info on this request.

The request is to split invoices for countries (using Sales Org (VKORG) the number based on the number of items (INCLUDING their sub items, from the BOM).

I found in the system where by configuration we have a limit of 10 items for a country - then the invoice is split.  But this count does NOT include counting the BOM subitems, so will not work for our needs.

I am thinking we change the routine using the system limit (being item count) and count the BOM to determine the actual number to split on - we can still use the system limit number - just set it for the max lines allowed and revise the count in the copy routine to include the BOM sub items in the count.

Let me know if you believe this can work.

Read only

PeterJonker
Active Contributor
0 Likes
2,844

maybe this discussions will help you:

http://scn.sap.com/thread/3421688

http://scn.sap.com/thread/700311

Although this is through customizing (setting the max lines of items per invoice) it still does not help you to do this based on geography.

In customizing there is also a way to set the max items per sales organization. That will maybe fit your requirement.

Goto

SPRO

Sales And Distribution / Billing / Billing Documents / Country Specific Features / Maintain Maximum Number Of Billing Items

Read only

0 Likes
2,844

Okay - got more info on this request.

The request is to split invoices for countries (using Sales Org (VKORG) the number based on the number of items (INCLUDING their sub items, from the BOM).

I found in the system where by configuration we have a limit of 10 items for a country - then the invoice is split.  But this count does NOT include counting the BOM subitems, so will not work for our needs.

I am thinking we change the routine using the system limit (being item count) and count the BOM to determine the actual number to split on - we can still use the system limit number - just set it for the max lines allowed and revise the count in the copy routine to include the BOM sub items in the count.

Let me know if you believe this can work.

Read only

Sijin_Chandran
Active Contributor
0 Likes
2,844

Hello Scott ,

The best and recommended technique for this is using Requirement Routine coding using VOFM.

Adding with the reply of

You can search for the same like this VOFM > DATA Transfer > Billing Documents

You will get the below screen :

These Routines are associated with Billing types using VTFL ( Copy Control from Delivery to Billing ).

For checking the codes inside them , just select any one of them and press source text (F5). You can also create new one by copying Standard one.

Though I haven't worked on Billing Document Splitting using Routine but am pretty much sure that it can be done using the same .

Read only

0 Likes
2,844

Following links may help you out :

http://scn.sap.com/thread/1625342

http://scn.sap.com/thread/2080804

And related searches will be helpful to you.

Read only

0 Likes
2,844

Okay - got more info on this request.

The request is to split invoices for countries (using Sales Org (VKORG) the number based on the number of items (INCLUDING their sub items, from the BOM).

I found in the system where by configuration we have a limit of 10 items for a country - then the invoice is split.  But this count does NOT include counting the BOM subitems, so will not work for our needs.

I am thinking we change the routine using the system limit (being item count) and count the BOM to determine the actual number to split on - we can still use the system limit number - just set it for the max lines allowed and revise the count in the copy routine to include the BOM sub items in the count.

Let me know if you believe this can work.

Read only

0 Likes
2,844

Hello Scott ,

I found in the system where by configuration we have a limit of 10 items for a country - then the invoice is split.  But this count does NOT include counting the BOM subitems, so will not work for our needs.

Which Standard Routine has been assigned for this Purpose ?

Read only

eduardo_hinojosa
Active Contributor
0 Likes
2,845

Hi

Get the routine 006 (report FV60C006) as a template for your own customer VOFM routine and set it in copy rules. Usually, max billing items is for sales organization levels (field TVKO-MAXBI).

I hope this helps you

Regards

Eduardo

Read only

0 Likes
2,844

Okay - got more info on this request.

The request is to split invoices for countries (using Sales Org (VKORG) the number based on the number of items (INCLUDING their sub items, from the BOM).

I found in the system where by configuration we have a limit of 10 items for a country - then the invoice is split.  But this count does NOT include counting the BOM subitems, so will not work for our needs.

I am thinking we change the routine using the system limit (being item count) and count the BOM to determine the actual number to split on - we can still use the system limit number - just set it for the max lines allowed and revise the count in the copy routine to include the BOM sub items in the count.

Let me know if you believe this can work.

Read only

0 Likes
2,844

Hi

Yes I think it should be ok, I suppose you need to be sure not to separate the subitem of the same bom in different invoices.

Max

Read only

0 Likes
2,844

Hi

Check in tcode VOV7 if the subitems for BOM are relevant for billing.

In the other hand, I am suggesting you create your own VOFM subroutine using other standard (I suggested you 006) as a template.

Set it in copy rules, trigger a break point and debug it, and check how the subitems behave.

Regards

Eduardo