cancel
Showing results for 
Search instead for 
Did you mean: 

Copy control routine for invoice spliting

Former Member
0 Kudos

hi expert,

can anybody give any idea regarding invoice splits in sd.

In copy control routine i need to modify the existing code .Where and how can find that.

please reply asap whenever it is convenient to you.

Regards,

mon

Edited by: Thomas Zloch on Apr 23, 2010 1:45 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You have to fill VBRK-ZUKRI with the key condition for spliting. See the sample code to split invoice for each line item in sales order

data: begin of zuk,
          modul(3) value '901', "routine name"
          vtweg like vbak-vtweg,
          spart like vbak-spart,
	   posnr like vbap-posnr,
        end of zuk.

  zuk-spart = vbak-spart.
  zuk-vtweg = vbak-vtweg.
  zuk-posnr = vbap-posnr.  " Line Item No
  vbrk-zukri = zuk.

Regards

Vinod

Former Member
0 Kudos

hi vinod,

Thanks for your reply.

How to find that standard routine (001/007)

my exact requirement is based on the customer code (maintain in customer master ) need to

split into 2 or 3 invoices. even though delivery document is one.

can you plz give any idea.

Former Member
0 Kudos

You can get the standard routines in transaction code VOFM -> Data Transfer -> Billing Documents.

Select the routine you want to see click on F5 to see ABAP Code. Instead of changing routine 001/007, you should create new routine in 900 series and do the coding as mentioned in my last post. Instead of POSNR in my last post you can fill the field

VBRK-ZUKRI with combination of values including customer number.

Regards

Vinod

Former Member
0 Kudos

where can i write the split logic.

actually i need to create one ztable ( having customer code, material group and split condition and maintain the record)

and need to maintain customer code in customer master table.

suppose i m having record in ztable a1(customer code) 1(condi) m1(mat grp)

a1 2 m2

a1 3 m3

a1 4 m4

a1 5 m5

now i need to split 1 invoice ( for m1)

2 invoice ( for m2 and m3 )

3 invoice ( for m4 and m5 )

and where i'll create routine with 900 and where will i assigned it?

so can u plz give idea how to do it?

Former Member
0 Kudos

Creation of new routine is done through the following path

You can get the standard routines in transaction code VOFM -> Data Transfer -> Billing Documents.

New routine is to be assinged to the copy control from delivery to Invoice (which is done by functional consultants)

Regards

Vinod

Former Member
0 Kudos

hi expert ,

my actual requirement is to create one ztable ( having customer code, material group and split condition )

and need to maintain customer code in customer master table. i need to split invoices for delivery doc

suppose i m having record in ztable a(customer code) 1(condi) m1(mat grp)

a 2 m2

a 2 m3

a 2 m4

a 3 m5

b 1 m1

b 2 m2

b 3 m3

now i need to split first invoice ( for combination of a and 1 )

2 invoice ( for combination of a and 2 )

3 invoice ( for combination of a and 3 )

1 invoice ( for combination of b and 1 )

2 invoice ( for combination of b and 2 )

3 invoice ( for combination of b and 3 )

my question is , how many times 007 routine will trigger once or multiple times ?

can i write loop within this routine for combination of a and 2 (if it is having multiple times)

here i need to check delivery item having same time of material group or not. if yes then only it will split with customer code

can anybody please help me out

regards,

mon

Former Member
0 Kudos

Take a look at FV60C001 which is the standard example for invoice split.

Regards,

John.