Sunday, September 7, 2014

Checking if Internal table got specific value



Reading/Checking internal table for specific value.

Below is code is best way to check whether the internal table having the value based on the key.


 READ TABLE my_items WITH KEY model im_item
             TRANSPORTING NO FIELDS.
  l_index sy-tabix.
  IF sy-subrc NE 0.
    RAISE failure.
  ENDIF


 TRANSPORTING NO FIELDS addition make its optimize way to make the program run faster perhaps.



No comments:

Post a Comment