Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Invoice Split by Item-country of origin

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.

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question