METHOD PROCEDURE BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT OPTIONS READ-ONLY
using /BIC/MZV01001
.
-- INSERT YOUR CODING HERE
outTab =
select
map(wbs_elem."/BIC/ZV01911", null, '1', '2') as "/BIC/ZFA2020"
, src.RECORD
, src.SQL__PROCEDURE__SOURCE__RECORD
from :inTab src
left join "/BIC/MZV01001" as wbs_elem
on src.zps_psp_pnr = wbs_elem."/BIC/ZV01911"
and wbs_elem."/BIC/ZV01901" = 'IV'
and src.bedat between wbs_elem.datefrom and wbs_elem.dateto
;
if :i_error_handling = 'TRUE' then
errorTab =
select
'Duplicate WBS elem mapping' as ERROR_TEXT
, SQL__PROCEDURE__SOURCE__RECORD
from :outTab
group by SQL__PROCEDURE__SOURCE__RECORD
having count(1) > 1
;
end if;
ENDMETHOD.
using /BIC/MZV01001
.
-- INSERT YOUR CODING HERE
outTab =
select
map(wbs_elem."/BIC/ZV01911", null, '1', '2') as "/BIC/ZFA2020"
, src.RECORD
, src.SQL__PROCEDURE__SOURCE__RECORD
from :inTab src
left join "/BIC/MZV01001" as wbs_elem
on src.zps_psp_pnr = wbs_elem."/BIC/ZV01911"
and wbs_elem."/BIC/ZV01901" = 'IV'
and src.bedat between wbs_elem.datefrom and wbs_elem.dateto
;
if :i_error_handling = 'TRUE' then
errorTab =
select
'Duplicate WBS elem mapping' as ERROR_TEXT
, SQL__PROCEDURE__SOURCE__RECORD
from :outTab
group by SQL__PROCEDURE__SOURCE__RECORD
having count(1) > 1
;
end if;
ENDMETHOD.
Комментариев нет:
Отправить комментарий