‎2008 Aug 29 8:03 PM
Hi Experts
Iam modifying a FM, i have 10 fileds in export parameters,
filed1
filed2
filed3
-
-
filed 10.
as per the requirement i need to display the same parameters in table form
suppose the rows of table is like
filed1filed2filed3
filed4filed5filed6
filed7filed8filed9filed10
so iam planing to create internal table and pass it TABLE parameter option in FM
please tell me is it make sense and how to define TABLE parameter in FM, and how to pass data to it
thanks
vasavi
‎2008 Aug 29 8:10 PM
inside the fm you can declare some thing like this.. have a table parameter name some thing don't reference to any data type.
and also you have 10 importing parameters.
function ztest_function.
data: begin of itab occurs 0,
field1 type <datatype>,
field2..
field10,
end of itab.
"passing importing parameters
itab-field1 = i_field1. "these are importing parameters
itab-field2 = i_field2.
...
itab-field10 = i_field10.
append itab.
table_parameter[] = itab[].
endfunction.
‎2008 Aug 29 8:30 PM
Hi,
As tables parameters is obsolete in OO contest, Use this in the changing parameter of the FM. Define a local types in the FM to populate these fields as table
Regards
Pavan
‎2008 Aug 31 5:08 AM
Hi there.
The best way is to define a structure at the data dictionary.
Write it as your table type at the table tab.
At your FM declare work area based on that structure and append its data to the output table.
Regards,
Rebeka