Over View
Use the READ TABLE coomand when get a record from the Internal Table.
It is return one record if gets multiple records.
Sample Code
* Sales Orders store into the Internal Table(IT_TABLE)
DATA: IT_TABLE TYPE TABLE OF VBAK.    " Sales Order Header
      WA_TABLE LIKE LINE OF IT_TABLE. " Structure
SELECT * 
  INTO TABLE IT_TABLE
  FROM VBAK.
* Stored into WA_TABLE
READ TABLE IT_TABLE 
      INTO WA_TABLE
  WITH KEY VBELN = '1234567890'.
* If you want check a data only, can use "NO TRANSPORTING" cpmmand.
* It will be good performance than got a data.
READ TABLE IT_TABLE NO TRANSPORTING FIELD
  WITH KEY VBELN = '1234567890'.
IF SY-SUBRC = 0.
***** can write if get a data. *****
ENDIF.
Please refer here for getting multiple records
Recent Comments