Skip to Content
0
Former Member
May 27, 2008 at 08:13 AM

Reading the HRP1001 and the Salescode tables

56 Views

Greetings Abapers

I am trying to read the HRP1001 table for all relationships where the BP's match those in the Salescode table. Fundamentally its simple enough but the BP number in the HRP1001 table is stored in sobid and it is of the form 0000000134. The number in the salescode table which i want to compare it to when i do my select statement is simply 134. How can i chop off the first seven digits of sobid?

I tried the following:

select * from hrp1001 into table lt_hrp1001

where plvar = '01'

and relat = 'Z40'

and sobid+7(3) = lt_/ccdev01/a2scode-partner. *comparing BP numbers

This does not work as i get the error message filed sobid+7(3) is unknown. Any suggestions?