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

Exporting Internal Table from Methods

former_member575017
Participant
0 Likes
1,801

Hi Experts,

I wanted to export an internal table from Methods and I am using below syntax and its not working.

METHODS get_data IMPORTING value(s_matnr) type mara-matnr

exporting it_tab TYPE STANDARD TABLE itab.

Please let me know what is the proper syntax.

Thanks

Basanagouda

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,391

Hi,

Define itab as a 'table type' of standard table.

Example: TYPES: t_sflight TYPE STANDARD TABLE OF sflight.

METHODS : get_data IMPORTING s_carrid type sel_carrid

EXPORTING e_tab type t_sflight.

ENDCLASS

3 REPLIES 3
Read only

Former Member
0 Likes
1,392

Hi,

Define itab as a 'table type' of standard table.

Example: TYPES: t_sflight TYPE STANDARD TABLE OF sflight.

METHODS : get_data IMPORTING s_carrid type sel_carrid

EXPORTING e_tab type t_sflight.

ENDCLASS

Read only

0 Likes
1,391

Thanks Jose for the solution.

Regards

Basanagouda

Read only

0 Likes
1,391

Hi Basanagouda,

I particularly declare such types in a interface called lif_types (Local interface for types).

see ya,