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

Problem in Passing internal table Function module

Former Member
0 Likes
2,271

Hi experts,

I am new to creating function module and needed certain suggestions.

I have created a type inside the FM

types: begin of T1

field A

field B

end of T1.

Now, i have populated the internal table of this type but how to send it through the tables tab of my FM.

IN the parameter, i can write my internal table name but what should be associated type ...

Please give some suggestions

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,484

Hi,

You cant use TYPES structure for TABLE parameter in Function modules. You need to create a structure(using SE11) with the required fields and use that as an associated types in TABLE parameter.

Thanks and Regards,

Senthil Kumar Anantham.

6 REPLIES 6
Read only

Former Member
0 Likes
1,485

Hi,

You cant use TYPES structure for TABLE parameter in Function modules. You need to create a structure(using SE11) with the required fields and use that as an associated types in TABLE parameter.

Thanks and Regards,

Senthil Kumar Anantham.

Read only

0 Likes
1,484

Thanks senthil,

Do i need to assign the structure in a table type and mention that table type in the associated type in order to pass multiple values through internal table ??

Read only

0 Likes
1,484

Hi,

Not required.

Table parameter will behave like type table of Z_sturcture. So just define the structure and use it in the TABLE parameter.It will convert that into internal table..

Example :


Parameter name         Typing                Associated type
T_RETURN                  LIKE                   your Z_structure

If you want to give table in the import parameter, then you need to create the table type for the structure.....

Read only

Former Member
0 Likes
1,484

type should be the type for internal table and should be defined in DATA DICTIONARY only then u can define table types in FM parameter

Read only

Former Member
0 Likes
1,484

Hi Subhajit,

Create a database structure ZSTRUCTURE of same type (T1) as the one created within the function module.

Give ZSTRUCTURE as the associated type to that table parameter.

Hope this helps you!

Thanks,

MM Jaffer.

Read only

Former Member
0 Likes
1,484

Hi,

Go to se11 and create a table type including the zstructure name in it and activate the table type.

Now in you function module interface ie : in tables you can use assocate type as the table type.

Which will work perfectly now..

If you face any problem in creating table type please search forum you will get lots of links on it..

Let me know if you need further information.

Regards

Satish Boguda