‎2007 Nov 28 7:16 PM
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.
‎2007 Nov 28 8:21 PM
‎2007 Nov 28 7:40 PM
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.
‎2007 Nov 28 7:59 PM
I am not doing a data declratation in the program
I want to do declaration in the interface of the function module
‎2007 Nov 28 8:09 PM
Hi
In the interface also you can declare the same way.
Hope it helps.
regards,
chaithanya.
‎2007 Nov 28 8:21 PM
‎2007 Nov 28 8:41 PM
Create one structure in SE11 like t_contacts
then use that structure in SE37.
Thanks
Seshu
‎2007 Nov 28 8:56 PM
Hi
Declare it in global variables and use it ..
Data: i_contacts type standard table of t_contacts.
‎2007 Nov 28 8:58 PM
create in SE11. You cannot declare and use within the function module.