Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

perform statement 7.4

rangerlet_mesee
Participant
0 Likes
990

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.

2 REPLIES 2
Read only

matt
Active Contributor
891

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

Read only

VXLozano
Active Contributor
891

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).