* Before ABAP 7.4, we used READ TABLE statement to read the first matching record from the internal table based upon key or index . * In SAP ABAP new syntax, instead of READ TABLE , we can use the table expressions. * We need to use the square bracket [ ], In the square bracket, we need to specify the key or index. * While using table expression, If the table entry does not exist, system throws the exception CX_SY_ITAB_LINE_NOT_FOUND. * Use line_exists statement to check the existence of a record. Report REPORT zab_rp_read_new . TABLES : vbak . SELECT-OPTIONS : s_vbeln FOR vbak - vbeln . SELECT vbeln , erdat , erzet , ernam , auart FROM vbak INTO TABLE @DATA ( lt_vbak ) WHERE vbeln IN @s_vbeln . WRITE : 'Index value' COLOR 5 . READ T...
Comments
Post a Comment