Skip to Content
Jun 30, 2018 at 06:59 AM

Standard Internal Table with KEY



I created a standard internal table with character and non-character fields. So the internal table will be created with non-unique key by default containing only character fields as non-unique key. Whereas Non-character/numeric fields wont be key for the internal table.

My Question is.

When i read the internal table with key using one character field and one numeric field, it is fetching the first identified record.

But i have mentioned in statement as WITH KEY, even though numeric field is not key field in internal table it fetched the record.

Please clarify either it should have some exception/compile time error or atleast SY-SUBRC NE 0.

Example code.

READ TABLE i_tab TRANSPORTING NO FIELDS WITH KEY char = value1 num = value2.