READ TABLE - index 用法

文章目录

1 introduction

index is meaning of row number. They only are used in sorted table and standard table.

2 sytax

… INDEX idx … .

3.Demo

DATA: sflight_tab TYPE SORTED TABLE OF sflight
                  WITH NON-UNIQUE KEY seatsocc,
       sflight_wa  LIKE LINE OF sflight_tab.

...

 SELECT *
       FROM sflight
       INTO TABLE sflight_tab
        WHERE carrid = 'LH' AND
             connid = '400'.

...

DO 10 TIMES.
  READ TABLE sflight_tab INDEX sy-index INTO sflight_wa.
   IF sy-subrc <> 0.
    EXIT.
  ENDIF.
  ...
ENDDO.
上一篇:Linux开机启动(bootstrap)


下一篇:Tab小案例