You are on page 1of 5

Invoice Split

Issue:
When Services and goods combined in one order, respective invoice should get split into
separate invoices for Germany.

Analysis:
Sales order is created for 2 items :-
Item=AC Repairing and Item Category :TAD(Service)
Item=SMC-20(Samsung Mobile Charger) and Item Category:TAN(Standard Item)
After that Delivery is Created for TAN Item.
Invoice is created and it is getting split on the basis of different header data like billing
date ,assignment number.
Doument Flow of Sales Order:
Solution:
As our requirement is on the basis of item category split here the invoice is getting split on the
basis of header data.
So for splitting the invoice on the basis of item category we should do following changes in copy
control:
1)Go to VTFA transaction and choose your billing type and SO type (i.e F2 and OR)
2)Select the item category(TAD) and check the data VBRK/VBRP and in this field we can see the
currently used routine i.e 001(Invoice Split).

3)With the help of ABAP guy we will create copy of that routine under different number and
add lines of code i.e additional split criteria.
4)After that we will assign the new copy control routine.
Logic to be send to ABAPER:
Split Criteria will be Company Code=1000 (i.e Germany)

PSTYV LIKE VBAP-PSTYV  (Line to be added in ZUK)


VBAP –>It is a standard table in SAP
PSTYV--> It will have information of item category and it is stored in VBAP.
Here the Item Category is fetched.

ZUK-PSTYV = VBAP-PSTYV
ZUK- It is internal table defined to be used in routine to define and check the split criteria and
pass the value to VBRK-ZUKRI.
Here the item category will be fetched from VBAP table and assigned to ZUK-PSTYV.
After that this criteria will be transfer to VBRK-ZUKRI.

Example :
VBAP Table  PSTYV=TAN
And ZUK-PSTYV= TAN
And TAN item category will be send to VBRK-ZUKRI
So it will allow TAD +TAN Sales Order to Split Invoice .
Source Code:
Header Data
Item Data
Additional Split Criteria (Like Company Code=1000)

DATA:BEGIN OF ZUK,
MODUL(3) VALUE ‘001’,
VTWEG LIKE VBAK -VTWEG ,
SPART LIKE VBAK-VTWEG,
PSTYV LIKE VBAP-PSTYV,(New Line for Item Category)
END OF ZUK.

ZUK-SPART=VBAK-SPART.
ZUK-VTWEG=VBAK-VTWEG.
ZUK-PSTYV=VBAP-PSTYV. (New Line for assigning Item category to PSTYV Field of Zuk table)

VBRK-ZUKRI=ZUK.

END FORM

You might also like