Home » Applications » Oracle Fusion Apps & E-Business Suite » run request from database
run request from database [message #540420] |
Mon, 23 January 2012 08:13 |
hany_marawan
Messages: 198 Registered: April 2005 Location: Cairo - Egypt
|
Senior Member |
|
|
I tried to run the request "Receipt Write-off Report"
from database but to give me non.
why????
this the code.
can anyone help me
--===============================
PROCEDURE insert_receipt_writeoff
IS
l_options_ok BOOLEAN;
l_request_id number;
v_result VARCHAR(100);
cursor receipt is
select acr.receipt_number
,arc.amount_applied
,acr.amount
,acr.currency_code
,acr.pay_from_customer
,ac.customer_name
,ac.customer_number
,acr.receivables_trx_id
,acr.receipt_method_id
from ar_cash_receipts_all acr
,ar_customers_all_v ac
,AR_RECEIVABLE_APPLICATIONS_all arc
where acr.customer_site_use_id =ac.CUSTOMER_ID
and acr.cash_receipt_id=arc.cash_receipt_id
and arc.display='Y'
and acr.receipt_number='47';
BEGIN
for rec in receipt loop
MO_GLOBAL.init('AR');
mo_global.set_policy_context('S',1112); -- take org_id
fnd_global.apps_initialize(50657, 1112, 222,0); -- resp_id,user_id
MO_GLOBAL.init('AR');
mo_global.set_policy_context('S',1112); -- take org_id
fnd_global.apps_initialize(50657, 1112, 222,0); -- resp_id,user_id
l_options_ok := FND_REQUEST.SET_OPTIONS (implicit => 'NO'
,protected => 'YES'
,language => ''
,territory => '');
if (fnd_request.set_print_options('', 'LANDSCAPE', 0, True, 'N')) then
IF (l_options_ok) then
fnd_request.set_org_id(1112);
l_request_id := FND_REQUEST.SUBMIT_REQUEST(application => 'AR'
,program => 'ARWRTRPT'
,description => ''
,start_time => ''
,sub_request => FALSE
,argument1 => sysdate --'P_APPLY_DATE='
,argument2 => rec.customer_number --'P_CUSTOMER_NUMBER='
,argument3 => sysdate --'P_GL_DATE='||
,argument4 => rec.currency_code
,argument5 => '' --'P_RECEIPT_DATE_FROM='
,argument6 => '' --'P_RECEIPT_DATE_TO='
,argument7 => '' --'P_RECEIPT_GL_DATE_FROM='
,argument8 => '' --'P_RECEIPT_GL_DATE_TO='
,argument9 => '' --'P_RECEIPT_METHOD_ID='
,argument10 => 'rec.receipt_number --'P_RECEIPT_NUMBER='
,argument11 => ''
,argument12 => '1.00' --'P_UNAPP_AMOUNT='
,argument13 => '' --'P_UNAPP_AMOUNT_PERCENT='
,argument14 => '' --'P_USER_ID='||
,argument15 => ''
,argument16 => ''
,argument17 => ''
,argument18 => ''
,argument19 => ''
,argument20 => ''
,argument21 => ''
,argument22 => ''
,argument23 => ''
,argument24 => ''
,argument25 => ''
,argument26 => ''
,argument27 => ''
,argument28 => ''
,argument29 => ''
,argument30 => ''
,argument31 => ''
,argument32 => ''
,argument33 => ''
,argument34 => ''
,argument35 => ''
,argument36 => ''
,argument37 => ''
,argument38 => ''
,argument39 => ''
,argument40 => ''
,argument41 => ''
,argument42 => ''
,argument43 => ''
,argument44 => ''
,argument45 => ''
,argument46 => ''
,argument47 => ''
,argument48 => ''
,argument49 => ''
,argument50 => ''
,argument51 => ''
,argument52 => ''
,argument53 => ''
,argument54 => ''
,argument55 => ''
,argument56 => ''
,argument57 => ''
,argument58 => ''
,argument59 => ''
,argument60 => ''
,argument61 => ''
,argument62 => ''
,argument63 => ''
,argument64 => ''
,argument65 => ''
,argument66 => ''
,argument67 => ''
,argument68 => ''
,argument69 => ''
,argument70 => ''
,argument71 => ''
,argument72 => ''
,argument73 => ''
,argument74 => ''
,argument75 => ''
,argument76 => ''
,argument77 => ''
,argument78 => ''
,argument79 => ''
,argument80 => ''
,argument81 => ''
,argument82 => ''
,argument83 => ''
,argument84 => ''
,argument85 => ''
,argument86 => ''
,argument87 => ''
,argument88 => ''
,argument89 => ''
,argument90 => ''
,argument91 => ''
,argument92 => ''
,argument93 => ''
,argument94 => ''
,argument95 => ''
,argument96 => ''
,argument97 => ''
,argument98 => ''
,argument99 => ''
,argument100 => ''
);
commit;
dbms_output.put_line('l_request_id ='||l_request_id);
else
dbms_output.put_line('error ....');
end if;
end if;
end loop;
END; -- Procedure
|
|
|
|
Re: run request from database [message #540453 is a reply to message #540442] |
Mon, 23 January 2012 13:34 |
hany_marawan
Messages: 198 Registered: April 2005 Location: Cairo - Egypt
|
Senior Member |
|
|
In the receivable, if you have receipt by 30 pound and you make apply and enter line by 29 pound there will be difference between the value of the receipt and the line applied.
so we run "Receipt Write-off Report" request to insert new line by the difference to make a balance.
I want to insert this line by the request I created in the database, I wrote this code.
But when I run this request no lines inserted.
I hope I explained good.
|
|
|
|
|
Re: run request from database [message #540756 is a reply to message #540515] |
Wed, 25 January 2012 10:16 |
hany_marawan
Messages: 198 Registered: April 2005 Location: Cairo - Egypt
|
Senior Member |
|
|
Hello,
As you saw in the code I wrote
dbms_output.put_line('l_request_id ='||l_request_id);
to give me the request number to know if it run or not, but it gave me 0 and not gave me error message.
|
|
|
|
Re: run request from database [message #541182 is a reply to message #540806] |
Sun, 29 January 2012 03:40 |
hany_marawan
Messages: 198 Registered: April 2005 Location: Cairo - Egypt
|
Senior Member |
|
|
Yes I asked a similar question from a year.
I solved this problem and I run a request from database in other modules, but this time it's not working.
I'm sure about the user_id, responsibility_id and security_grou_id.
Regards
|
|
|
|
Goto Forum:
Current Time: Sun Nov 24 04:19:28 CST 2024
|