on 2005 Sep 19 10:41 AM
i am using one of the fields of the table as string. if i use the same table as import parameter in the function module it is giving error as the table must be a flat srtucture. can any solve this problem
thanks
suresh
Hi suresh,
Create a table type in ABAP/4 Dictionary with zcontact as row type and then use it in importing params as reference type with type spec. "Type".
I personally believe this is a good approach. So please consider it if it is viable for you..
Sri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please change string to CHAR500 in database table ZCONTACT or just call the function in loop and pass
zcontact ( Stucture not table) as an importing parameter.
In addition to error you get in FM you will also not be able to define an internal table of type ZCONTACT in the calling program .
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi suresh,
If it is only 500 Char all the time that you require then try considering a data element with char 500 as length (there are some data elements available in the system for sure like EDICHAR500 or try finding more in SE12).
Also it would be useful if you can tell us how you have defined your FM interface parameter for this...
Is it an importing parameter? if so, is it referring to a table type of the given structure? please give param name, Type spec. and reference type from the interface as it is.
As long as you specify a table type it should not give any syntax errors as far as I am concerned.
Sri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
my database table name is zcontact. in the function module the import parameter is
parameter name : li_contact(internal table)
type spec : like
associated type : zcontact.
if i am using type spec as type it is not accepting. if i give type spec as like it is giving error as zcontact must be a flat structure.this is my problem. please look into it.
thanks
suresh
Hi,
Use table type after "Type" in the import params of the fm interface. If you are already using a table type as reference then please copy and paste your importing param name type here.
Sri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the <b>type spec</b> use type not like.
if you use <variable> <b>like</b> <table with string field> you will get that erro.
instead use
<variable> <b>type</b> <table with string field>
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check the type of the table used in the FM. Use this to construct the table you export to the FM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You cannot use a structure which contains the STRING data type. Use a character field with some specified length. CHAR255 could be a choice.
Regards,
Ravi
Note :Please reward points if this helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
EMAIL_ADDRESS CHAR 30
FIRST_NAME CHAR 30
LAST_NAME CHAR 30
PHONE_NUMBER CHAR 10
COMMENTS STRING 0
i am using the above table in my function module. the customer will enter the the above details and press save button then i have store the above details in the database. the comments field should be 500char length. i have to save the deatils using the function module.
regards
suresh
User | Count |
---|---|
68 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.