‎2021 Aug 16 7:14 AM
Hi
I have a select statement which uses inline decl to get records. Eg : @lt_final
Now I want to place this select query in a perform get_data subrotine as a tables or changing.
This is to use it for below further code. But it says LT_FINAL is unknown.
Can someone assist in writing the perform statement and FORM-ENDFORM for this.
‎2021 Aug 16 7:23 AM
1) Without you posting the relevant code (use the code button in the browser editor) it's impossible to answer your question.
2) FORMs and PERFORMs are obsolete (except in rare cases) in 7.4+. This from 7.53 doc, but it's been true for a long long time. Use classes and methods instead. https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/abenprogram_call_obsolete.htm
3) Prefixes like lt_ are not regarded good style by SAP and the German ABAP user group. https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenabap_pgl.htm
‎2021 Aug 16 12:06 PM
As Matt said, without your code (please, use the CODE button) we cannot see what your problem is.
Have you declared that oldie?
I have the hunch your code looks like
SELECT *
FROM table
INTO TABLE @lt_final.and nope, you still need to declare the table, although you can do it inline, like
select fiel1, field2, field3
from table
into table @data(final_list).