2008 Oct 30 12:45 PM
Hi experts,
I have some doubts concerning the use of tables as parameters of classes.
When we use RFC's we have the Addition "Tables" to receive a table from a function.
But, when we're using classes, we don't have this addition.
I am creating a class that will return 10 tables.
This class is calling a RFC.
How would be the best option to return these tables from my class? Should I have a method get for each table?
Thanks
2008 Oct 30 1:03 PM
You need to create a table type in SE11 and use them as a reference in the parameters.
Regards,
Naimesh Patel
2008 Oct 30 1:03 PM
You need to create a table type in SE11 and use them as a reference in the parameters.
Regards,
Naimesh Patel
2008 Oct 30 1:17 PM
Patel,
so, will I have to create a table type for each table that I want to return?
Thanks
2008 Oct 30 1:28 PM
Yes.
Your tables in the RFC FM will some reference Strucutres.
First, try to find out if there are any predefined table type for those structures or not.
To do so:
Go to SE11
Enter your Strucutre
Now do the where Used list
Select the "Table Type"
If you don't find any predefined table type for those structures, create them in the SE11.
Enter Select the Data Type and enter name.
Select the "Table Type" from next popup.
You can also create Local Data type for the classes throught button "Local Types" in the SE24. But this table types can only be used as a parameters of the methods which are Private.
Regards,
Naimesh Patel
2008 Oct 30 1:41 PM
2008 Nov 07 9:49 AM
Hi,
how about storing your tables into a kind of an array (wa, structure, itab) and return it via your own get() function and an array would be as a return value?
Best regards,
John