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

TABLE parameter in FUnction module

Former Member
0 Likes
579

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

3 REPLIES 3
Read only

Former Member
0 Likes
528

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.

Read only

Former Member
0 Likes
528

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

Read only

Former Member
0 Likes
528

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