declare
x_po_head_id number ;
begin
select po_header_id
into x_po_head_id
from po_headers_all where
segment1 = '&ponumber'
and org_id = &org_id;
update po_headers_all
set authorization_status = 'APPROVED',
approved_flag = 'Y',
approved_date = sysdate,
last_update_date= sysdate
where po_header_id = x_po_head_id;
update po_line_locations_all
set approved_flag = 'Y'
where po_header_id = x_po_head_id ;
commit;
end;
x_po_head_id number ;
begin
select po_header_id
into x_po_head_id
from po_headers_all where
segment1 = '&ponumber'
and org_id = &org_id;
update po_headers_all
set authorization_status = 'APPROVED',
approved_flag = 'Y',
approved_date = sysdate,
last_update_date= sysdate
where po_header_id = x_po_head_id;
update po_line_locations_all
set approved_flag = 'Y'
where po_header_id = x_po_head_id ;
commit;
end;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12122734/viewspace-760995/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12122734/viewspace-760995/
本文介绍了一段用于更新 Oracle 应用中采购订单批准状态的 PL/SQL 脚本。通过输入采购订单号和组织 ID,该脚本会将指定采购订单的状态设置为已批准,并更新相关日期及标记。
679

被折叠的 条评论
为什么被折叠?



