|
|

楼主 |
发表于 2010/9/15 16:58:43
|
显示全部楼层
瞎猫碰上死耗子式的实现了user的需求,也许存在很多不足,但是还是贴出来仅供参考,希望真正的开发高手批评指正,谢谢~~
修改了OE_approvals_wf package body 下的 Initiate_Approval package
1)添加变量l_sold_item varchar(200);如下判断条件处
2) 添加语句对变量 l_sold_item进行赋值
--注:最后附上get_item函数定义
select GET_ITEM(to_number(itemkey))
into l_sold_item
from dual
IF itemtype = OE_GLOBALS.G_WFI_NGO THEN
IF l_sales_document_type_code = 'O' THEN
select sold_to_org_id, expiration_date, salesrep_id
into l_sold_to_org_id, l_expiration_date, l_salesrep_id
from oe_order_headers_all
where header_id = to_number(itemkey);
--調用函數GET_ITEM for l_sold_item---modified at 2010/09/14 for show item information
select GET_ITEM(to_number(itemkey))
into l_sold_item
from dual
3)如下数组赋值处添加--'SOLD_ITEM'为在workflow中定义属性之internal name
l_aname(4):='SOLD_ITEM';
l_avaluetext(4):=l_sold_item;
l_aname(1) := 'SALESPERSON';
l_avaluetext(1) := l_salesrep;
l_aname(2) := 'SOLD_TO';
l_avaluetext(2) := l_sold_to;
l_aname(3) := 'EXPIRATION_DATE';
l_avaluetext(3) := l_expiration_date;
l_aname(4):='SOLD_ITEM';
l_avaluetext(4):=l_sold_item;
wf_engine.SetItemAttrTextArray( itemtype
, itemkey
, l_aname
, l_avaluetext
); |
|