‎2021 Jan 11 2:19 AM
Hi, the coding is as blew: and there's an error happening.
Field"LDT_VAL-MATNR" is unknown. It is neither in one of the specified tables nor defined by a "Data" statement.
How to deal with it?
Thanks!
Types:
Begin of GTS_VAL,
MATNR TYPE MARA-MATNR,
End of GTS_VAL.
GTT_VAL Type table of GTS_VAL.
Data LDT_VAL type GTT_VAL.
Select ~
for all entries in LDT_VAL
Where MSEG-MATNR = @LDT_VAL-MATNR
‎2021 Jan 11 4:54 AM
Hi!
You need to escape LDT_VAL everywhere, so change to this:
for all entries in @LDT_VALNext, you need to use the ~ to indicate fields from specific tables (or table aliases). In this example, change to:
Where MSEG~MATNR = @LDT_VAL-MATNR
‎2021 Jan 11 4:54 AM
Hi!
You need to escape LDT_VAL everywhere, so change to this:
for all entries in @LDT_VALNext, you need to use the ~ to indicate fields from specific tables (or table aliases). In this example, change to:
Where MSEG~MATNR = @LDT_VAL-MATNR
‎2021 Jan 11 6:12 AM
Your syntax is completely wrong. One possibility:
SELECT * FROM MSEG
INTO TABLE @DATA(ITAB)
FOR ALL ENTRIES IN @LDT_VAL
WHERE MATNR = @LDT_VAL-MATNR.
(but instead of *, specify the columns you really need)