Hey fellow devs,
I've tried a myriad of select statements with little success on this one particular table.
It is a custom table based on MARA but with more fields called ZLSC_MARA.
Anyway, I keep getting the error: "The work table _____ is not long enough" when the definition is exactly the same as the structure i'm selecting into.
Here is what I have already tried.
DATA: I_ZLSCMARA TYPE TABLE OF ZLSC_MARA.
SELECT *
INTO TABLE I_ZLSCMARA
FROM ZLSC_MARA
INNER JOIN MVKE ON MVKE~MATNR = ZLSC_MARA~MATNR
WHERE LVORM NE 'X'.
Tried a few different ways of defining it:
DATA: I_ZLSCMARA LIKE ZLSC_MARA OCCURS 0.
DATA: I_ZLSCMARA LIKE ZLSC_MARA OCCURS 0 with header line.
Even this terribly inefficient way:
DATA: I_ZLSCMARA LIKE ZLSC_MARA OCCURS 0,
WA_ZLSCMARA LIKE LINE OF I_ZLSCMARA.
SELECT *
INTO WA_ZLSCMARA
FROM ZLSC_MARA
INNER JOIN MVKE ON MVKE~MATNR = ZLSC_MARA~MATNR
WHERE LVORM NE 'X'.
APPEND WA_ZLSCMARA TO I_ZLSCMARA.
ENDSELECT.
Am i missing something basic here?... How the heck do I select everything out of this table into an internal table in my program?!