0% found this document useful (0 votes)
265 views5 pages

Invoice Split

When orders contain both services and goods in Germany, the invoice needs to be split into separate invoices for each item category. Currently, the invoice splits based on header data like billing date and assignment number. To split the invoice based on item category, the existing copy control routine will be copied and modified to add an additional split criteria of checking the item category field and assigning it to the internal ZUK table, which determines how the invoice is split. The ABAP code will be updated to fetch the item category from the VBAP table and assign it to ZUK-PSTYV before transferring it to VBRK-ZUKRI to allow invoices with different item categories to split.

Uploaded by

sumit patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
265 views5 pages

Invoice Split

When orders contain both services and goods in Germany, the invoice needs to be split into separate invoices for each item category. Currently, the invoice splits based on header data like billing date and assignment number. To split the invoice based on item category, the existing copy control routine will be copied and modified to add an additional split criteria of checking the item category field and assigning it to the internal ZUK table, which determines how the invoice is split. The ABAP code will be updated to fetch the item category from the VBAP table and assign it to ZUK-PSTYV before transferring it to VBRK-ZUKRI to allow invoices with different item categories to split.

Uploaded by

sumit patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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