‎2006 Jul 21 4:57 PM
what is 'Default key'? for what type of internal tables it is used? Can you please explain with examples?
Thanks a lot.
‎2006 Jul 21 5:10 PM
<i>Key
The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
<b>At tables with structured row type, the standard key is formed from all character-type columns of the internal table.</b> If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty. At tables with non-structured row type, the standard key consists of the entire row. If the row type is also a table, an empty key is defined.
The user-defined key can contain any columns of the internal table that are no internal table themselves, and do not contain internal tables. References are allowed as table keys. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.</i>
Regards,
Rich Heilman
‎2006 Jul 21 4:59 PM
Please the documentation.
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/frameset.htm
Regards,
Rich Heilman
‎2006 Jul 21 5:02 PM
‎2006 Jul 21 5:04 PM
Hi Nuren,
<b>Default key:</b> A DEFAULT specification is formed by specifying the keyword DEFAULT and a DEFAULT value The maximum length of a default value is 254 characters.
Check the following links.
http://help.sap.com/saphelp_47x200/helpdata/en/ac/be98cea56511d2a97100a0c9449261/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/ac/be98cea56511d2a97100a0c9449261/frameset.htm
Thanks,
Vinay
‎2006 Jul 21 5:10 PM
<i>Key
The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
<b>At tables with structured row type, the standard key is formed from all character-type columns of the internal table.</b> If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty. At tables with non-structured row type, the standard key consists of the entire row. If the row type is also a table, an empty key is defined.
The user-defined key can contain any columns of the internal table that are no internal table themselves, and do not contain internal tables. References are allowed as table keys. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.</i>
Regards,
Rich Heilman