Application Development 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: 

structure with a string field as parameter in FM

Former Member
0 Kudos

Hi,

I have a requirement wherein based on some id which is the import paramter (table) i have to fetch some text of type string n pass as an export paramater. it has to be a table since for each id there wil a text associated with it.

For this i have declared a structure with two fields, one client and the other, the text type string.

While trying to activate my fm, it says that italicsthe structure should be a flat type. You cannot use internal tables. string, references etcitalics

Please provide a solution.

Regards,

herwin.

6 REPLIES 6

former_member194669
Active Contributor
0 Kudos

Just create it as "Table Type" in SE11 and give that name in the tables tab

Former Member
0 Kudos

Thats because you cannot assign structures in the EXPORT parameter TAB and you can do that only in the TABLES tab. You should use TABLE TYPES in the EXPORT parameter TABs. Please check in SCN as to how to create a table type.

Vikranth

0 Kudos

So vikranth, can i assign structures with string type fields in tables parameters. i had the same message while activating

0 Kudos

Hello Herwin,

I just checked and even i was getting the same error, be it in the tables parameter or even by creating a table type. Looks like string data type is not supported in the function module interface. Only option which seems appropriate is to use char type with the maximum length possible.

Vikranth

0 Kudos

Hi Vikranth,

ya using char or lchar would be one option and the other would be the use of the table type in the the import/export parameters. That worked without giving me that warning message and was able to execute my code properly with the desired output.

Regards,

Herwin.

Edited by: Herwin Wilmet Dsouza on May 11, 2010 12:18 PM

0 Kudos

Hi,

I have created the structure with a field having data type STRINGVAR. Function module didn't give any error if i used this structure in the parameter definitions.

Regards

Vinod