SAP ITAB KEY SECONDARY RESTRICT

Get Example source ABAP code based on a different SAP table
  


ARTICLE

Restrictions for Secondary Keys
Internal tables with secondary keys can be used in all processing statements for internal tables and other statements that work with internal tables. However, there are also operand positions for internal tables for which it does not make sense to use secondary keys. Secondary keys are therefore not supported for those operand positions.
The use of tables with secondary keys causes syntax or runtime errors for the following operand positions:
An internal table as an actual parameter for a TABLES parameter for RFC can have any table type but no secondary key.
Only standard tables without secondary keys are possible for the following:
rspar for SUBMIT WITH rspar and rtab for SUBMIT WITH sel IN rtab
itab for FIND IN TABLE itab and REPLACE IN TABLE itab
result_tab for SPLIT INTO TABLE result_tab
column_syntax for SELECT, GROUP BY, and ORDER BY
cond_syntax for WHERE
dbtab_syntax for SELECT, INSERT, UPDATE, MODIFY, and DELETE
expr_syntax for UPDATE
IN-, OUT-, INOUT parameter for EXEC SQL - EXECUTE
itab for EXPORT TO INTERNAL TABLE itab and IMPORT FROM INTERNAL TABLE itab
itab for GENERATE SUBROUTINE POOL itab, READ REPORT INTO itab, INSERT REPORT FROM itab, and SYNTAX-CHECK FOR itab.
itab for EDITOR-CALL FOR itab
itab for WRITE TO itab

Internal Statements:

SYNTAX-CHECK FOR PROGRAM ... REPLACING progtab
SYNTAX-CHECK FOR PROGRAM ... TRACE-TABLE itab
SYNTAX-CHECK FOR DYNPRO ... TRACE-TABLE itab
SYNTAX-CHECK FOR DYNPRO h f e m ID id

EXPORT DYNPRO h f e m ID id
GENERATE DYNPRO h f e m ID id
IMPORT DYNPRO h f e m ID id
(Interne Tabellen f (Feldliste), e (Ablauflogik), m (matchcode))

EXPORT NAMETAB h f ID id
IMPORT NAMETAB h f ID id
SYSTEM CALL EXPORT NAMETAB h f ID id
SYSTEM CALL IMPORT NAMETAB h f ID id (Interne Tabelle f (Feldliste))

SYSTEM-CALL LOAD LIST PAGE DESCRIPTION INTO itab
SYSTEM-CALL LOAD LIST DESCRIPTION INTO itab
SYSTEM-CALL LOAD LISTLEVEL-STACK INTO itab

SCAN [AND CHECK] ABAP-SOURCE itab
SCAN ABAP-SOURCE ... STATEMENTS INTO itab (Statement-Tabelle)
SCAN ABAP-SOURCE ... TOKENS INTO itab (Token-Tabelle)
SCAN ABAP-SOURCE ... KEYWORDS FROM itab (Keyword-Tabelle)
SCAN ABAP-SOURCE ... LEVELS INTO itab (Level-Tabelle)
SCAN ABAP-SOURCE ... STRUCTURES INTO itab (Strukturen-Tabelle)
SCAN ABAP-SOURCE ... ENHANCEMENTS INTO itab (Erweiterungs-Tabelle)
SCAN ABAP-SOURCE ... IMPLEMENTATIONS FROM itab
SCAN ABAP-SOURCE ... REPLACING itab (Ersetzungs-Tabelle)