10-31-2019 11:37 AM
SELECT * from /brlt/subsc INTO dup_table WHERE Type = ls_request_input_data-Type AND Dl1 = ls_request_input_data-Dl1.
ENDSELECT.
The statement above is going in a loop instead of selecting all rows at once in a structure.
10-31-2019 11:47 AM
A structure is something flat, is like a table with only one line. So you cannot have a whole table inside a structure.
You have to declare a table
SELECT * from /brlt/subsc
INTO TABLE @DATA(dup_table)
WHERE Type = @ls_request_input_data-Type
AND Dl1 = @ls_request_input_data-Dl1.
or use your statement, because it is the right way to read a table in a structure
10-31-2019 12:55 PM
Please use the CODE button to format your code so that it's shown in a more user-friendly format (colorized).
10-31-2019 1:52 PM
I would suggest to check the documentations of the SELECT statement.
10-31-2019 2:20 PM
Hello Amit Krishna,
SELECT.. ENDSELECT is Loop which will basically fetch one entry at a time until the last entry is reached. It is considered as a client cursor that will induce a lot of work load on the communication between Application and Database server. It is not a recommended approach as well. You can proceed with the code suggested by Frederic Girod.
Regards!