cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice Split by Item-country of origin

0 Kudos

Hi Gurus,

I have the following issue,

I need to split the invoices based on the country of origin of the items.

I had implemented the following code (but doesn't work):

DATA: BEGIN OF ZUK2,

MODUL(3) VALUE '001',

SPE_HERKL TYPE HERKL,

END OF ZUK2.

SELECT SINGLE HERKL

FROM MARC

INTO w_HERKL

WHERE MATNR EQ LIPS-MATNR

AND WERKS EQ LIPS-WERKS.

IF sy-subrc EQ 0.

MOVE w_HERKL TO ZUK2-SPE_HERKL.

MOVE ZUK2 TO VBRK-ZUKRI.

In debug mode I see that ZUk2-SPE_HERKL is correctly filled with the coutry of origin.

I don't know why this code doesn't work, and only creates one invoice, even if I have one delivery with items from various country's.

Thank you for your support.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you are making changes to the runtime structures VBRK/VBRP, make sure you also apply those changes in XVBRK and XVBRP and modify it.

It should work.

Why don't you directly move the region rather than fiddling with the combination criteria?

Regards,

Amit

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jonathan,

I hope that you had implemented the code in Routine for the copy control from delivery to Billing.

Hope you have copied the existing invoice split routine and inserted your code out there. I think while debugging you shoudl be able to find out the issue. Please let us know the error which pops out while creating the billing document. If the codes are correct there is no reason why the routine shouldn't work.

You will be better served if you discuss the issue in the ABAP Forums

Thanks & Regards,

Nithin