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

Class with returning parameter

Former Member
0 Likes
534

Hi all,

i have a class with one returning parameter.

R_FLIGHT returning type structure (with carrid and object references).

field-symbols: <wa_flight> like line of r_flight.

My error:

r_flight is unknown

Whats wrong? Why can i am not access the parameter r_flight??

regards

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
470

r_flight is a structure, not a table. Hence "<b>like line of r_flight</b>" makes no sense.

Either redefine r_flight as a table, or simply define

field-symbols: <wa_flight> like r_flight

rgds, matt.

3 REPLIES 3
Read only

matt
Active Contributor
0 Likes
471

r_flight is a structure, not a table. Hence "<b>like line of r_flight</b>" makes no sense.

Either redefine r_flight as a table, or simply define

field-symbols: <wa_flight> like r_flight

rgds, matt.

Read only

Former Member
0 Likes
470

hi,

thanks.

But how can i get an internal table of the structure as a return value.

regards

Read only

matt
Active Contributor
0 Likes
470

If you want to return an internal table as a return value, then your return parameter must be defined as a type that is a table. Currently, your return parameter is a structure, not a table.

You can define the type in the TYPES section of your class. Or you can use a predefined table type in the data dictionary. Or you can define a table type in the data dictionary.

rgds, matt