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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
* 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