Invoice Split by Item-country of origin
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
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.