Application Development 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: 

select query in method endmethod

Former Member
0 Kudos

Hi all,

I am writing code in a method which is not accepting into table in select query, How to pass data into internal table using select query in method. As per my knowlegde we have to write code using field-symbols. can anybody please help me.

Thanks in advance.

Ranjith

2 REPLIES 2

former_member188685
Active Contributor
0 Kudos

it is possible to do a select into table. in your case the exporting parameter may be defined normal structure. if you want to define the internal table you have to use table types to behave the parameter as Internal table.

exporting 
  e_flight    type sflight_1ab1

select * from sflight
into table e_flight
up to 30 rows.

0 Kudos

to explain a bit more

if your internal table has a structure defined in DDIC, you can look for a table type using this structure - if it does not exist you can create one

if your internal table has a structure defined locally in your program you have two possibilities:

- if you are able to create a type with TYPE TABLE OF ty_struc then you can refer to this type for your parameter

- if you are not able to add a table type, then you can use TYPE STANDARD TABLE for your parameter, and ensure that you call method with compatible parameter