Application Development and Automation 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 only

read itab error

Former Member
0 Likes
442

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
415

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
416

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

Read only

Former Member
0 Likes
415

as sir said remove the codes

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