06-20-2007 6:38 PM
I am creating a new z function module.
Under tables parameter, I need to create 'Profit_Center_Table' which should contain combination of ztable and cepc fields.
as
Tables
Profit_Center_Table should contain List of ztable and cepc fields
Is it okay, if I create a view with the combination of ztable and cepc fields
And use the view under tables tab page in my zfunction module ?
Or it is better to create a structure with the combination of ztable and cepc fields
?
06-20-2007 6:53 PM
Rich could you please be more specific ...
I mean after creating structure
did not get about creation of table type.
one more thing is Is tables tab page will become obselete ?
i am not supposed to use tables tab ?
If so how can we give multiple record ,
it seems giving/entering multiple records is not possible with IMPORT and EXPORT parameters ?
Coudl you please explain ?
THANKS.
06-20-2007 6:40 PM
It would be better to create structure.
You can create a structure and append structures of those 2 tables in it.
In future if Z table is modified to have an extra field then you will not have to change the structure.
And in view, you may have to specify the join condition. so if both the tables are not interrelated then you should not use this.
06-20-2007 6:43 PM
It is better to create a structure with your specific fields, and then create a table type which uses this structure, and then use this table type in your functino module signature, NOT as a TABLES parameter, but as an IMPORTING or EXPORTING parameter using the table type as the type reference. The TABLES parameter is obselete and shouldn't be used anymore.
Regards
RIch Heilman
06-20-2007 6:53 PM
Rich could you please be more specific ...
I mean after creating structure
did not get about creation of table type.
one more thing is Is tables tab page will become obselete ?
i am not supposed to use tables tab ?
If so how can we give multiple record ,
it seems giving/entering multiple records is not possible with IMPORT and EXPORT parameters ?
Coudl you please explain ?
THANKS.
06-20-2007 6:57 PM
TABLES tab is obselete and shouldn't be used moving forward, instead Table Types in the IMPORTING and EXPORTING tabs should be used. In the ABAP Dictionary, you create your structure, in the same way that you create your structure, there is also a radiobutton for table type, choose this option and in the next screen you can specifiy your line type, which in this case would be the structure which you just created. Once the table type is created, you can go to your function module, and either on the IMPORTING or EXPORTING tab, you enter a line for you table, lets call it SAM_TAB, then TYPE it like your Table Type that you just created in the dictionary. This is how you will pass your tabular data back and forth to/from the function module instead of the TABLES parameter. Make sense?
Regards,
Rich Heilman
06-20-2007 7:15 PM
hi,
better to create structure or internal table with all the required fields.
we can export and import internal tables to function module by using TABLES parameter interface.
if you create View, how can you pass to the function module.
as per my knowledge no parameter interface is availabe to pass views to function module.
for more information follow this link.
http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801ef5454211d189710000e8322d00/frameset.htm
regards,
Ashokreddy
Message was edited by:
Ashok Reddy