Form個性化 呼叫Procedure

2022-07-20 15:03:13 字數 3481 閱讀 3244

在標準form中提交客戶化請求,通過使用form的個性化,完全可以實現這個需求。下面這個例子是在發票介面上列印付款申請,使用工具欄上活動--列印付款申請提交請求。

首先建立選單按鈕,這個就不贅述了,觸發器事件選擇when-new-form-instance

其次,響應列印按鈕 ,這裡使用執行過程這個內建項來呼叫請求,呼叫的過程**如下

[c-sharp]view plain

copy

print

?procedure submit_pay_request( p_org_id          in varchar2,  

p_invoice_id_list in varchar2)  

is  

l_success              boolean;  

l_request_number  number;  

l_errbuf                 varchar2(2000);  

e_exception           exception;  

begin  

l_success := fnd_request.add_layout(

'xxbg'

,'xxbgreqp'

,'zh'

,'cn'

,'pdf'

);  

if p_invoice_id_list <> 

'()'

then  

if l_success then  

fnd_request.set_org_id(to_number(p_org_id));  

-- 提交列印付款申請請求  

l_request_number :=   

fnd_request.submit_request(   

'xxbg'

,  'xxbgreqp'

,  ''

,  ''

,  false,  

p_invoice_id_list,  

chr(0), 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'',  

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'', 

'');  

if l_request_number = 0 then  

l_errbuf := 

'submit request failure'

;  raise e_exception;  

else  

commit;  

end if;  

else  

l_errbuf := 

'add template failure'

;  raise e_exception;  

end if;  

else  

l_errbuf := 

'please choice an invoice'

;  raise e_exception;  

end if;  

exception  

when e_exception then  

when others then  

end;  

在個性化中,新增響應按鈕事件,事件觸發器就是第一步中新增的選單項了,本例中為special45。在活動中,選擇型別為內建,內建型別--執行過程,變元為

='xxbg_ap_utl.submit_pay_request('''||:inv_sum_folder.org_id||''','||'''('||:inv_sum_folder.invoice_id||')'')'

這裡需要特別解釋一下變元,在個性化中,其實認為變元是一串字串。這裡變元可以分為兩種,

第一種,不帶「=」的字串,這種方法在個性化申請後,便已經繫結了執行的語句,任何時候執行的語句都是固定的,例如變元中填寫xxbg_ap_utl.insert_log(1, 'ap_invoice') (注意,外層無需加''),那麼在個性化申請後,我們點選選單項的按鈕永遠都是執行過程xxbg_ap_utl.insert_log(1, 'ap_invoice'),這種方法適合簡單的執行過程。

第二種,帶「=」的變元,當字串使用了「=「,那麼就代表這個字串還包含了一些動態的引數,form個性化申請後不繫結該字串而是在執行時動態解析。本例中由於使用到了發票介面的invoice_id和org_id,所以使用第二種方式。

(25.16 kb)

2009-2-27 14:34

最後,再加乙個功能,彈出請求視窗。

(25.04 kb)

2009-2-27 14:34

儲存,申請個性化,再看效果

(31.62 kb)

2009-2-27 14:34

程式庫「

Form個性化即時列印

form個性化 一 進入個性化 在需要進行個性化設定的form視窗中依次選擇 幫助 診斷 自定義 個性化 二 設定個性化選單項 條件序號 10 層 功能 說明 啟用選單項 觸發器事件 when new form instance 活動序號 10 型別 選單 選單項 special1 選單標籤 列印測...

EBS 利用form個性化 呼叫報表

1.在工具中新增呼叫報表的功能 條件 觸發器事件 when new form instance 活動 型別為 選單 選單項 specialn n為1.6 選單標籤 列印xx報表 2.對specialn 做設定 條件 觸發器事件specialn 活動 a.設定全域性變數 型別為特性,物件型別為 全域性...

使用Form個性化修改標準Form的LOV

oracle seeker 在之前的文章 使用custom.pll修改標準form的lov 中描述了如何使用custom.pll修改lov,現在介紹另外一種不需要修改fmb檔案修改form lov的方法,使用form的個性化工具。本文結合乙個簡單的form做描述,這是沒有個性化之前的lov,lov取...