select d.depto, d.dcrdep, c.KOSTL, a.processo, a.code, a.aprov, u.bname, a.SUBS, a.ativo
from
SAPSR3.ZTMM_COMP_DEPTO@SAP d,
SAPSR3.ZTMM_COMP_APROV@SAP a,
SAPSR3.ZTMM_COMP_CCUSTO@sap c,
SAPSR3.USR02@SAP u
where d.mandt = a.mandt
and d.depto = a.depto(+)
and d.mandt = u.mandt
and a.aprov = u.bname(+)
and d.mandt = c.mandt
and d.depto = c.depto(+)
-- and a.aprov = 'VPOPPER'
and c.kostl in ( 'L2108', 'L2109', 'L2113')
order by 1, 2, 3, 4, 5
/*
select * from
SAPSR3.USR02@SAP*/