Submit request pada oracle APPS salah satu caranya bisa dilakukan dengan cara menggunakan menu VIEW > Request, kali ini saya mencoba mencoba melakukan submit request dari backend dari suatu procedure (PL/SQL) yang saya apply di database, dengan parameter inputan yang saya passing dari record transaksi pada form
Perhatikan gambar form input Kwitansi dibawah ini, dari Form ini pengennya sih langsung generate report kwitansi melalui menu Tools WS Print Kwitansi

Form Input Kwintansi
Setelah menu WS Print Kwintasi di tekan, Submit request untuk generate report Kwitansi otomatis jalan, perhatikan gambar dibawah

Form Submit Request
Untuk detail report tidak saya jelaskan disini, untuk Mapping parameter reportnya perhatikan table di bawah
|
Program |
WS Kwitansi Print |
|
Short Name Program |
WSARKWI |
|
Application |
Receivables |
|
Parameter |
|
1 |
p_branch_id |
|
2 |
p_kwitansi_number |
|
3 |
P_Org_id |
|
4 |
P_Username |
Skenario
- Membuat procedure untuk submit request, perhatikan procedure WS_PRINT_KWITANSI dibawah ini
PROCEDURE WS_PRINT_KWITANSI
p_branch_id INNUMBER,
p_kwitansi_number INNUMBER,
p_org_id INNUMBER,
p_username INVARCHAR2
IS
v_req_id NUMBER
BEGIN
/*
-- If you are directly running from the database using the TOAD, SQL-NAVIGATOR or --SQL*PLUS etc. Then you need to Initialize the Apps. In this case use the above API to --Initialize the APPS. If you are using same code in some procedure and running directly
--from application then you don’t need to initalize.
--Then you can comment the above API.
*/
v_req_id :=fnd_request.Submit_request’AR’,’WSARKWI’,’WS Kwitansi Print’,
SYSDATE,false,p_branch_id,p_kwitansi_number,p_org_id,p_username
/*
fnd_request.Submit_request(application,program,description,start_time,sub_request,argument1..100)
-- Arguments
-- application - Short name of application under which the program is registered
-- program - concurrent program name for which the request has to be submitted
-- description - Optional. Will be displayed along with user concurrent program name
-- start_time - Optional. Time at which the request has to startb running
-- sub_request - Optional. Set to TRUE if the request is submitted from another running request and has to be treated
-- - as a sub request. Default is FALSE
-- argument1..100 - Optional. Arguments for the concurrent request
*/
COMMIT;
IF v_req_id = 0
THEN
fnd_file.put_line fnd_file.LOG,’Request submission For this store FAILED’
--DBMS_OUTPUT.PUT_LINE( ’Request submission For this store FAILED’ );
ELSE
fnd_file.put_line fnd_file.LOG,’Request submission for this store SUCCESSFUL’
--DBMS_OUTPUT.PUT_LINE( ’Request submission For this store SUCCESSFUL’ );
ENDIF;
--Note:- If you are running directly from database, use DBMS API to display. If you are
-- Running directly from Application, then Use the fnd_file API to write the message
-- in the log file.
END WS_PRINT_KWITANSI
2. Personalisasi Form Print Kwitansi untuk mengeksekusi procedure WS_PRINT_KWITANSI diatas
|
Seq |
10 |
|
Description |
Menu WS Print Kwitansi |
|
Condition |
|
Trigger Event |
WHEN-NEW-FORM-INSTANCE |
|
Trigger Object |
|
Condition |
|
Actions |
|
Seq |
10 |
|
Type |
Menu |
|
Description |
|
Language |
All |
|
Menu Entry |
MENU1 |
|
Menu Label |
WS Print Kwitansi |
|
Seq |
20 |
|
Description |
Trigger Submit Request From Backend |
|
Condition |
|
Trigger Event |
MENU1 |
|
Trigger Object |
|
Condition |
|
Actions |
|
Seq |
10 |
|
Type |
Builtin |
|
Description |
|
Language |
All |
|
Builtin Type |
Execute a Procedure |
|
Argument |
=’DECLARE
BEGIN
WS_PRINT_KWITANSI(’’’||:KWITANSI.BRANCH_ID
||’’’,’’’||
:KWITANSI.KWITANSI_NUMBER||’’’,
fnd_global.ORG_ID,
fnd_global.USER_NAME);
END’ |
No comments:
Post a Comment