Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

READ internal table with two keys on same field

Hi experts.

I'm trying to read an internal table to two values but apparently i can't use the keyword OR.

Here is what i tryed. Can anybody tell me what is the correct instruction to use ?

Thanks for your help.

* Test 1
  READ TABLE lt_status INTO wa_status 
    WITH KEY txt04 =  ( c_wait_exp OR c_expert ).

*Test 2
  READ TABLE lt_status INTO wa_status 
    WITH KEY txt04 =  c_wait_exp.
   OR txt04 = c_expert.

Both are incorrects.

Tags:
replied

READ is supposed to return a single entry, so there is a logical problem with using OR conditions. That's why they are not allowed.

See if you can use LOOP AT ... WHERE ... instead.

Thomas

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question