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

Error looping at a table

Former Member
0 Likes
344

Greetings Abapers

Im trying to loop at a table for certain criteria. My code is:

  • Loop at the relationships table and get dates for each salescode BP

loop at lt_hrp1001 where lt_/ccdev01/a2scode-partner EQ lt_hrp1001-sobid

and lt_hrp1001-sclas EQ 'BP'.

I get the following error though:

"No component exists with the name lt_/ccdev01/a2scode-partner"

-partner is a field in my local table and all tables have been declared. Please help.

2 REPLIES 2
Read only

Former Member
0 Likes
304

Don't put the table name in the loop where clause


loop at lt_hrp1001 
  where sobid = lt_/ccdev01/a2scode-partner
     and sclas EQ 'BP'.

Read only

Former Member
0 Likes
304

loop at lt_hrp1001 where sobid = lt_/ccdev01/a2scode-partner

and sclas = 'BP'.

endloop.