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.
I had implemented the code in Routine for the copy control from delivery to Billing
Thank you for your support.