Skip to Content
0
Former Member
Jun 17, 2008 at 09:24 PM

Using a view instead of a select statement

17 Views

Greetings Abapers

Ive got a problem. Im writing a program and one of the things i do is i use 2 select statements which are as follows:

  • Read all organisational relationships for all business partneru2019s linked to sales codes for all date ranges

select * from hrp1001 into table lt_hrp1001 " Get all external business partners

where plvar eq '01'

and sclas eq 'BP'

and relat eq '008'

or relat eq 'Z40'.

select * from hrp1001 appending corresponding fields of table lt_hrp1001 "Get all employees

where plvar eq '01'

and sclas eq 'BP'

and relat eq '291'

and otype eq 'S'.

I have however been told that i can use the database view HRVPADIC since the hrp1001 table is giving me duplicats which i dont want. Can anyone tell me how to use this view i.e. syntax and logic. I would really appreciate it.