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

export tables in custom function module

Former Member
0 Likes
809

I am creating a custom function module and want to return a table of contacts i_contacts.

In the global data area I created a structure

TYPES: BEGIN OF t_contacts,

prsnr TYPE knvk-prsnr,

contactinfo TYPE adr6-smtp_addr,

END OF t_contacts.

And then in my interface I am trying to include as a table

i_contacts like t_contacts

But it keeps saying t_contacts not defined. Does that mean I have to define t_contacts as a global structure in SE11. Isnt there another way to define an internal table in the interface. Please advice.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
781

it says type t_contacts does not exist.

7 REPLIES 7
Read only

Former Member
0 Likes
781

Hi..

Declare like this..

Data: i_contacts type standard table of t_contacts.

i_contacts like t_contacts does not work because t_contacts is not an internal table with header line.

Hope this helps.

regards,

chaithanya.

Read only

Former Member
0 Likes
781

I am not doing a data declratation in the program

I want to do declaration in the interface of the function module

Read only

0 Likes
781

Hi

In the interface also you can declare the same way.

Hope it helps.

regards,

chaithanya.

Read only

Former Member
0 Likes
782

it says type t_contacts does not exist.

Read only

0 Likes
781

Create one structure in SE11 like t_contacts

then use that structure in SE37.

Thanks

Seshu

Read only

0 Likes
781

Hi

Declare it in global variables and use it ..

Data: i_contacts type standard table of t_contacts.

Read only

former_member191735
Active Contributor
0 Likes
781

create in SE11. You cannot declare and use within the function module.