2018 Jun 30 7:59 AM
Hi,
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.
2018 Jun 30 10:01 AM
Simply use F1 on WITH KEY and read the documentation!
It is clearly said there, that WITH KEY allows you to enter a free search key that is independent from the table key. In order to enter the table key, you use WITH TABLE KEY.
2018 Jun 30 10:01 AM
Simply use F1 on WITH KEY and read the documentation!
It is clearly said there, that WITH KEY allows you to enter a free search key that is independent from the table key. In order to enter the table key, you use WITH TABLE KEY.
2018 Jun 30 10:42 AM
2018 Jun 30 1:40 PM
Do you think that next time you might read the documentation before asking a question here?