KEY VS TABLE KEY in READ INTERNAL TABLE in Detail

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ส.ค. 2024
  • Intro:
    Table Key:
    Specifying a Table Key as a Search Key Either the primary table key or a secondary table key can be specified. The values can be declared either implicitly in a work area wa behind FROM or by listing the components of the table key explicitly behind TABLE KEY.
    When the primary table key is used, the table categories are accessed as follows:
    Standard tables are searched in a linear fashion.
    Binary scans are used for sorted tables.
    The hash algorithm is used for hashed tables.
    When the secondary table key is used, a binary scan is used in the sorted key case and a hash algorithm is used in the hash key case.
    When a row is found, the system field sy-tabix is set as specified by the table key in use:
    For sorted keys, it is set to the number of rows found in the associated table index.
    For hash keys it is set to the value 0.
    If no row is found, and in the case of sorted keys, sy-tabix is set to the row number of the entry in the associated table index in front of which the row would be inserted using INSERT ... INDEX ..., to preserve the sort.
    Key: Free search Key
    Effect
    Specifies a free search key. The free search key can be defined freely or linked to the specification of a secondary table key in keyname.
    Notes
    Table expressions enable reads to be performed in operand positions too. The free key search is used whenever components are specified without an explicit key specified.
    Outside of classes, the two obsolete variants of the addition WITH KEY are possible.
    to learn in more detail please refer:
    help.sap.com/d...
    Credit:
    help.sap.com/d...
    Join this channel to get access to perks:
    / @pankajkumaram

ความคิดเห็น • 2

  • @Fgjudsfhhhjkkgdafgh
    @Fgjudsfhhhjkkgdafgh 5 หลายเดือนก่อน

    Super explanation sir

  • @rangabilla4337
    @rangabilla4337 ปีที่แล้ว

    Awesome ...looking for ABAP on Cloud Sessions next!