Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

read itab error

Former Member
0 Kudos

Hello all,

i m coding this......

loop at itab2.

READ TABLE itab1 with KEY X = 'itab2-X'.

if sy-subrc= 0.

process.

endif.

endloop.

But here itab1-X shows no data in debug but there is data in itab2-X.

so no wrong result.

can u tell me why table itab1 is not reading here .

Thanks a lot.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Remove the quotes around ITAB2-X.

loop at itab2.
READ TABLE itab1 with KEY X = itab2-X.   "<<- Remove quotes
if sy-subrc= 0.
*process.
endif.
endloop.

REgards,

Rich Heilman

2 REPLIES 2

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Remove the quotes around ITAB2-X.

loop at itab2.
READ TABLE itab1 with KEY X = itab2-X.   "<<- Remove quotes
if sy-subrc= 0.
*process.
endif.
endloop.

REgards,

Rich Heilman

Former Member
0 Kudos

as sir said remove the codes

when u use codes ' ' it will take it as a text-literal