‎2005 Sep 23 8:37 AM
Hello all,
Newbie here, this may sound a little to easy:
I need to define a type which contains filed of type table,
I tryed like this:
<i>
begin of ty_feature,
fname(30) type c,
fvalue(30) type c,
end of ty_feature,
ty_features type table of ty_feature,
begin of ty_xmlmat,
matnr type mara-matnr,
maktx type makt-maktx,
classnum(16) type c,
color(4) type c,
<b> features type ty_features,</b>
end of ty_xmlmat.
</i>
The error i get :
<b>"TY_FEATURES" is a generic type. A type reference is possible only for field symbols and FORM parameters.
</b>
Please tell how to define this kind type.
Lots of thanks,
Bogdan
Sorry for my miserable english
‎2005 Sep 23 8:44 AM
Hi
Try this
types : begin of ty_feature,
fname(30) type c,
fvalue(30) type c,
end of ty_feature.
types : ty_features type table of ty_feature.
data :begin of ty_xmlmat,
matnr type mara-matnr,
maktx type makt-maktx,
classnum(16) type c,
color(4) type c,
features type ty_features,
end of ty_xmlmat.
Cheers
‎2005 Sep 23 8:49 AM
Hi Sinha,
thanks for fast answer,
ty_xmlmat must be a type not a data element
Bogdan
‎2005 Sep 23 8:46 AM
You don't have to write ty_features type table of ty_feature anymore...
you just have to declare this:
<b>features type ty_feature</b>
‎2005 Sep 23 8:50 AM
Hi Chan
features must be declared as table of ty_feature
thank you
Bogdan
‎2005 Sep 23 12:33 PM
instead of
ty_features type table of ty_feature,
try
ty_feature type standard table
of ty_feature with default key.
Christian