‎2010 Mar 21 1:46 PM
Anybody please resolve my doubt
types tb_std_type type table of sflight.
-->this i understand as not a generic table type.'NON-UNIQUE" and DEFAULT KEYS are implicity defined .
data it_std type tb_std.-->Since i could declare an internal table of tb_std_type,i strongly belive tb_std_type is not a genric table type.
But when i try to declare another type of same table type tb_std_type ie
types tb2_type type tb_std_type.
This is giving me an error saying\
tb_std_type has a generic type.Use of this type is only possible for typing field symbols and formal parameters.
If thats true then how was i able to create a internal table out of it...
In case of sorted and hashed tables it behaves as exactly as it is defined.(Like if generic,can only be used for typing formal params.field symbold..and if non generic--internal tables declaration and normal typing is possible)
Please resolve this
*Would be great if could avoid a copy paste from std.help..because i have been through it..
‎2010 Mar 21 3:22 PM
Hello Teenu,
Query#1
types tb2_type type tb_std_type.
This is giving me an error saying\
tb_std_type has a generic type.Use of this type is only possible for typing field symbols and formal parameters.
Why is the table generic? An excerpt from SAP documentation clearly states that:
An internal table that has no table key or an incomplete table key is generic with respect to the table key. A table type of this nature can be used only for typing formal parameters or field symbols.
Query#2
If thats true then how was i able to create a internal table out of it...
SAP says:
A standard table type with a generic primary table key can only be specified after TYPE when DATA is used.
Source: [http://help.sap.com/abapdocu_70/en/ABAPTYPES_KEYDEF.htm|http://help.sap.com/abapdocu_70/en/ABAPTYPES_KEYDEF.htm]
BR,
Suhas
‎2010 Mar 21 3:22 PM
Hello Teenu,
Query#1
types tb2_type type tb_std_type.
This is giving me an error saying\
tb_std_type has a generic type.Use of this type is only possible for typing field symbols and formal parameters.
Why is the table generic? An excerpt from SAP documentation clearly states that:
An internal table that has no table key or an incomplete table key is generic with respect to the table key. A table type of this nature can be used only for typing formal parameters or field symbols.
Query#2
If thats true then how was i able to create a internal table out of it...
SAP says:
A standard table type with a generic primary table key can only be specified after TYPE when DATA is used.
Source: [http://help.sap.com/abapdocu_70/en/ABAPTYPES_KEYDEF.htm|http://help.sap.com/abapdocu_70/en/ABAPTYPES_KEYDEF.htm]
BR,
Suhas
‎2010 Mar 21 3:50 PM
Oh okay..
so with that 'data' declaration,a bound table type with a standarad key is generated ..right..and
it happens only with standard tables....
that was a good piece of help
Thanks alot Suhas
‎2010 Mar 21 3:54 PM