2023 Feb 08 3:13 PM
Hi, I have a local table named t_test that contains a field IDNRK and here are the values:
000000000001019917
000000000001020057
000000000001345359
I was trying to select data from AUSP using the values above. However, I was only able to use 1 as I'm not familiar on how to loop a table into a structure:
SELECT objek,
atwrt
INTO TABLE @DATA(t_itemcat)
FROM ausp
WHERE objek = @x_test-idnrk
AND atinn = '1234'.
X_TEST-IDNRK comes from T_TEST which has a code:
LOOP AT t_stbdata INTO DATA(x_stb)
"SOMETHING HERE
ENDLOOP.
IF I WANT TO USE ALL THE T_ITEMCAT IN X_ITEMCAT should I also use LOOP AT?
LOOP AT t_itemcat INTO DATA(x_itemcat).
ENDLOOP.
2023 Feb 08 4:06 PM
I don't understand. Better provide an example with input data, expected output, and the rules in plain words.