‎2010 Jul 08 10:34 AM
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
‎2010 Jul 08 10:37 AM
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.
‎2010 Jul 08 10:37 AM
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.
‎2010 Jul 08 10:41 AM
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 ??
‎2010 Jul 08 10:54 AM
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.....
‎2010 Jul 08 10:39 AM
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
‎2010 Jul 08 10:45 AM
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.
‎2010 Jul 08 10:56 AM
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