2008 Nov 05 5:51 AM
2008 Nov 05 6:16 AM
Hi,
This is just an hypothetical example of self join in abap.
select x~empid as xempid "Employee ID
x~empname as xempname "Employee Name
y~empid as yempid "Supervisor ID
y~empname as yempname " Supervisor Name
into corresponding fields of itab
from zemployee as x
inner join zemployee as y on x~supid = y~empid
Regards,
Vishal
2008 Nov 05 6:09 AM
Hi,
i think self join is not available in SAP...but you can make the view table from single database table in DDIC..Other wise do it using internal table....from one database table....fill up two internal tables..and making loop...store it another internal table....
Arunima
2008 Nov 05 6:11 AM
HI,
Do we really need something like SELF join in abap.
Rgds,
Sandeep
2023 Apr 14 12:02 PM
2008 Nov 05 6:16 AM
Hi,
This is just an hypothetical example of self join in abap.
select x~empid as xempid "Employee ID
x~empname as xempname "Employee Name
y~empid as yempid "Supervisor ID
y~empname as yempname " Supervisor Name
into corresponding fields of itab
from zemployee as x
inner join zemployee as y on x~supid = y~empid
Regards,
Vishal