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

Import table in abap method

Former Member
11,319

Hi,

How can i import table in methods ,in FM i use the tab tables and in method i had the returning tab

but it just for export.

BR

Ricardos

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
5,774

via import parameters. Table should be typed like TYPE TABLE OF <referring to internal table type from Data Dictionary>.

For example in DD you define a Table Type. this will be your reference type in the import parameter.

Table type you define in transaction SE11.

You can also use a local type which you define in SE24 within your class. At the top there is a button with <Local types>.

3 REPLIES 3
Read only

Sm1tje
Active Contributor
0 Likes
5,775

via import parameters. Table should be typed like TYPE TABLE OF <referring to internal table type from Data Dictionary>.

For example in DD you define a Table Type. this will be your reference type in the import parameter.

Table type you define in transaction SE11.

You can also use a local type which you define in SE24 within your class. At the top there is a button with <Local types>.

Read only

Former Member
0 Likes
5,774

HI Micky,

Thanks,

I'm currently working on NW 7.0 ,

the table that i want to transfer is declared in se11 (Transp. Table),

when i put the table in the associated type i have just the value type ,like , type ref to ,

(I GETTHIS ERROR WHEN I TRY TO PUT TYPE TABLE OF : The typing method can be 'Like', 'Type', or 'Type Ref To') .

i try to do that via type tab in the code (button direct type entry ) like

a type table of b

my question is if this is the recommended way to do so?

Best Regards

Ricardo

Read only

MarcinPciak
Active Contributor
0 Likes
5,774

Hi,

In tables parameter use


my_tab LIKE your_db_table_name

or via importing/exporting/changing parameters:

- go to se11, select Data type

- type in new table type in Z_MY_TABLE_TYPE and Create

- select Table type

- Pass description and as Line type type in your DB table name

- activate

- pass this table type to one of FM / method parameter


my_tab TYPE my_new_table_type.

Regards

Marcin