Oracle EBS AR 其他API
- DECLARE
- L_CR_ID NUMBER;
- L_ATTRIBUTE_REC AR_RECEIPT_API_PUB.ATTRIBUTE_REC_TYPE;
- L_GLOBAL_ATT_REC AR_RECEIPT_API_PUB.global_attribute_rec_type;
- L_RETURN_STATUS VARCHAR2(100);
- L_MSG_COUNT NUMBER;
- L_MSG_DATA VARCHAR2(2000);
- I NUMBER;
- L_MESSAGE_LIST VARCHAR2(1000);
- L_MSG_INDEX_OUT NUMBER;
- BEGIN
- FND_GLOBAL.APPS_INITIALIZE(USER_ID => 1111,
- RESP_ID => 50737 ,
- RESP_APPL_ID => 50737);
- mo_global.set_policy_context('S', 142);
- AR_RECEIPT_API_PUB.REVERSE(
- P_API_VERSION => 1.0,
- P_COMMIT => 'F',
- P_VALIDATION_LEVEL => 100,
- P_CASH_RECEIPT_ID => 1000,
- P_REVERSAL_DATE => fnd_conc_date.string_to_date('2017-03-31'),
- P_REVERSAL_GL_DATE => fnd_conc_date.string_to_date('2017-03-31'),
- P_REVERSAL_CATEGORY_CODE => 'REV',
- P_REVERSAL_REASON_CODE => 'PAYMENT REVERSAL',
- P_REVERSAL_COMMENTS => 'TEST',
- X_RETURN_STATUS => L_RETURN_STATUS,
- X_MSG_COUNT => L_MSG_COUNT,
- X_MSG_DATA => L_MSG_DATA);
- IF L_RETURN_STATUS <> FND_API.G_RET_STS_SUCCESS THEN
- FOR I IN 1..L_MSG_COUNT LOOP
- FND_MSG_PUB.GET(P_MSG_INDEX => I
- ,P_DATA => L_MESSAGE_LIST
- ,P_MSG_INDEX_OUT => L_MSG_INDEX_OUT);
- DBMS_OUTPUT.PUT_LINE(L_MESSAGE_LIST);
- END LOOP;
- ELSE
- DBMS_OUTPUT.PUT_LINE(L_CR_ID);
- DBMS_OUTPUT.PUT_LINE(L_RETURN_STATUS);
- DBMS_OUTPUT.PUT_LINE('L_MSG_DATA '||L_MSG_DATA);
- END IF;
- END;
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_cash_receipt_id NUMBER;
- p_count number := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- -- 2) Call the API
- AR_RECEIPT_API_PUB.CREATE_CASH
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_currency_code => 'USD',
- p_amount => 1005.65,
- p_receipt_number => 'rct-api1',
- p_receipt_date => '22-JUL-2011',
- p_gl_date => '22-JUL-2011',
- p_customer_number => '1007',
- p_receipt_method_id => 1001,
- p_cr_id => l_cash_receipt_id );
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Cash Receipt id ' || l_cash_receipt_id );
- dbms_output.put_line('Message count ' || l_msg_count);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '||l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status varchar2(1);
- l_msg_count number;
- l_msg_data varchar2(240);
- p_count number :=0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- -- 2) Call the API
- AR_RECEIPT_API_PUB.APPLY
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- p_cash_receipt_id => 83989,
- p_customer_trx_id => 527928,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data);
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- end;
- /
- set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_cash_receipt_id NUMBER;
- p_count number := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.create_and_apply
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_amount => 2000.00,
- p_receipt_number => 'rct-api2',
- p_receipt_date => '22-JUL-2011',
- p_gl_date => '22-JUL-2011',
- p_customer_number => 1007,
- p_receipt_method_id => 1001,
- p_trx_number => '102317',
- p_cr_id => l_cash_receipt_id );
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- dbms_output.put_line('Cash Receipt ID ' || l_cash_receipt_id );
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- p_count number := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.UNAPPLY
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_cash_receipt_id => 83989,
- p_applied_payment_schedule_id => 182804,
- p_reversal_gl_date => '23-JUL-2011'
- );
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_cash_receipt_id NUMBER;
- p_count number := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.APPLY_ON_ACCOUNT
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_cash_receipt_id => 83992);
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_cash_receipt_id NUMBER;
- p_count number := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.UNAPPLY_ON_ACCOUNT
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_cash_receipt_id => 83992,
- P_reversal_gl_date => '23-JUL-2011');
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_cash_receipt_id NUMBER;
- p_count number := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.reverse
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_cash_receipt_id => 83993,
- p_reversal_category_code => 'REV',
- p_reversal_reason_code => 'WRONG INVOICE');
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_cash_receipt_id NUMBER;
- p_count number := 0;
- l_application_ref_type ar_receivable_applications.application_ref_type%TYPE;
- l_application_ref_id ar_receivable_applications.application_ref_id%TYPE;
- l_application_ref_num ar_receivable_applications.application_ref_num%TYPE;
- l_secondary_application_ref_id ar_receivable_applications.secondary_application_ref_id%TYPE;
- l_receivable_application_id ar_receivable_applications.receivable_application_id%TYPE;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.ACTIVITY_APPLICATION
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_cash_receipt_id => 83994,
- p_applied_payment_schedule_id => -3,
- p_receivables_trx_id => 2536,
- p_receivable_application_id => l_receivable_application_id
- p_application_ref_type => l_application_ref_type,
- p_application_ref_id => l_application_ref_id,
- p_application_ref_num => l_application_ref_num,
- p_secondary_application_ref_id => l_secondary_application_ref_id);
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- dbms_output.put_line('Application ID ' || l_receivable_application_id;
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_cash_receipt_id NUMBER;
- p_count number := 0;
- l_receipt_number varchar(10);
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- l_receipt_number := 'misc-api1';
- AR_RECEIPT_API_PUB.CREATE_MISC
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_amount => 4560.00,
- p_receipt_date => '22-JUL-2011',
- p_gl_date => '22-JUL-2011',
- p_receipt_method_id => 1001,
- p_activity => 'Interest Income',
- p_misc_receipt_id => l_cash_receipt_id ,
- p_receipt_number => l_receipt_number);
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- dbms_output.put_line('Cash Receipt ID ' || l_cash_receipt_id );
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- -- set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- p_count NUMBER;
- x_receivable_application_id NUMBER;
- x_application_ref_id NUMBER;
- x_application_ref_num VARCHAR2(30);
- x_secondary_application_ref_id NUMBER;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- -- 2) Call the API
- AR_RECEIPT_API_PUB.apply_other_account
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_receivable_application_id => x_receivable_application_id,
- p_cash_receipt_id => 83997,
- p_receivables_trx_id => 1747,
- p_applied_payment_schedule_id => -4,
- p_amount_applied => 500.00,
- p_application_ref_id => x_application_ref_id,
- p_application_ref_num => x_application_ref_num,
- p_secondary_application_ref_id => x_secondary_application_ref_id,
- p_called_from => null);
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- dbms_output.put_line('Receivable Application Id ' || x_receivable_application_id);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- -- Note that several parameters are similar to those
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- p_count NUMBER;
- x_receivable_application_id NUMBER;
- x_application_ref_id NUMBER;
- x_application_ref_num VARCHAR2(30);
- x_secondary_application_ref_id NUMBER;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- -- 2) Call the API
- AR_RECEIPT_API_PUB.apply_other_account
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_receivable_application_id => x_receivable_application_id,
- p_cash_receipt_id => 83997,
- p_receivables_trx_id => 1747,
- p_applied_payment_schedule_id => -4,
- p_amount_applied => 500.00,
- p_application_ref_id => x_application_ref_id,
- p_application_ref_num => x_application_ref_num,
- p_secondary_application_ref_id => x_secondary_application_ref_id,
- p_called_from => null);
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- dbms_output.put_line('Receivable Application Id ' || x_receivable_application_id);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- p_count number := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.UNAPPLY_OTHER_ACCOUNT
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_cash_receipt_id => 83997,
- p_reversal_gl_date => '26-SEP-2011',
- p_receivable_application_id => 285776,
- p_cancel_claim_flag => 'Y',
- p_called_from => NULL);
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- p_count number := 0;
- l_application_ref_num VARCHAR2(30);
- l_receivable_application_id NUMBER;
- l_applied_rec_app_id NUMBER;
- l_acctd_amount_applied_from NUMBER;
- l_acctd_amount_applied_to VARCHAR2(30);
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.APPLY_OPEN_RECEIPT
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_amount_applied => -20.00,
- p_receipt_number => 'rct-api11',
- p_open_receipt_number => 'rct-api10',
- x_application_ref_num => l_application_ref_num,
- x_receivable_application_id => l_receivable_application_id,
- x_applied_rec_app_id => l_applied_rec_app_id,
- x_acctd_amount_applied_from => l_acctd_amount_applied_from,
- x_acctd_amount_applied_to => l_acctd_amount_applied_to);
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- dbms_output.put_line('Receivable Application Id ' || l_receivable_application_id);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_cash_receipt_id NUMBER;
- p_count number := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_API_PUB.CREATE_APPLY_ON_ACC
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_amount => 555.00,
- p_receipt_number => 'rct-api12',
- p_receipt_date => '22-JUL-2011',
- p_gl_date => '22-JUL-2011',
- p_customer_number => 1007,
- p_receipt_method_id => 1001,
- p_cr_id => l_cash_receipt_id );
- -- 3) Review the API output
- dbms_output.put_line('Status ' || l_return_status);
- dbms_output.put_line('Message count ' || l_msg_count);
- dbms_output.put_line('Cash Receipt Id ' || l_cash_receipt_id);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- cursor c1 is
- select line.customer_trx_line_id,
- line.line_number,
- line.extended_amount line_amount,
- tax.extended_amount tax_amount
- from ra_customer_trx_lines line,
- (select link_to_cust_trx_line_id,
- sum(nvl(extended_amount,0)) extended_amount
- from ra_customer_trx_lines
- where customer_trx_id = 528349
- and line_type = 'TAX'
- group by link_to_cust_trx_line_id) tax
- where line.customer_trx_id = 528349
- and line.line_type = 'LINE'
- and line.customer_trx_line_id = tax.LINK_TO_CUST_TRX_LINE_ID(+);
- l_llca_trx_lines_tbl ar_receipt_api_pub.llca_trx_lines_tbl_type;
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- p_count NUMBER := 0;
- l_cnt NUMBER := 0;
- BEGIN
- -- 1) Set the applications context
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- -- 2) define the amounts to apply, for illustration purposes we will apply 10% of the original amounts
- for i in c1 loop
- l_cnt := l_cnt + 1;
- l_llca_trx_lines_tbl(l_cnt).customer_trx_line_id := i.customer_trx_line_id ;
- l_llca_trx_lines_tbl(l_cnt).line_amount := i.line_amount * .10;
- l_llca_trx_lines_tbl(l_cnt).amount_applied := i.line_amount * .10;
- l_llca_trx_lines_tbl(l_cnt).tax_amount := i.tax_amount *.10;
- end loop;
- AR_RECEIPT_API_PUB.APPLY_IN_DETAIL
- ( p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_cash_receipt_id => 84003,
- p_customer_trx_id => 528349,
- p_llca_type => 'L',
- p_org_id => 204,
- p_llca_trx_lines_tbl => l_llca_trx_lines_tbl );
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
- /
- --set serveroutput on size 1000000
- DECLARE
- l_count NUMBER;
- l_return_status VARCHAR2(1);
- l_msg_count NUMBER;
- l_msg_data VARCHAR2(240);
- l_status VARCHAR2(1);
- p_count number := 0;
- BEGIN
- fnd_global.apps_initialize(1011902, 50559, 222,0);
- mo_global.init('AR');
- mo_global.set_policy_context('S','204');
- AR_RECEIPT_UPDATE_API_PUB.UPDATE_RECEIPT_UNID_TO_UNAPP
- (p_api_version => 1.0,
- p_init_msg_list => FND_API.G_TRUE,
- p_commit => FND_API.G_TRUE,
- p_validation_level => FND_API.G_VALID_LEVEL_FULL,
- x_return_status => l_return_status,
- x_msg_count => l_msg_count,
- x_msg_data => l_msg_data,
- p_cash_receipt_id => 177018,
- p_pay_from_customer => 1290,
- p_comments => 'TEST RECEIPT API',
- x_status => l_status
- );
- DBMS_OUTPUT.put_line ('X_RETURN_STATUS = ' || l_return_status);
- DBMS_OUTPUT.put_line ('X_MSG_COUNT = ' || l_msg_count);
- DBMS_OUTPUT.put_line ('X_MSG_DATA = ' || l_msg_data);
- DBMS_OUTPUT.put_line ('X_STATUS = ' || l_status);
- if l_msg_count = 1 Then
- dbms_output.put_line('l_msg_data '|| l_msg_data);
- elsif l_msg_count > 1 Then
- loop
- p_count := p_count + 1;
- l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
- if l_msg_data is NULL Then
- exit;
- end if;
- dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
- end loop;
- end if;
- END;
Oracle EBS AR 其他API的更多相关文章
- Oracle EBS AR 客户API
------------------------------------ 1. Set Environment ------------------------------------ -- 1a. ...
- Oracle EBS AR 收款API收款方法标识无效
1.确认是不是没有收款方法 methods那个表的问题2.查看收款方法那个LOV的问题3.界面录入 是否会有问题 碰到的问题是 收款日期比较早时 找不到对应的收款方法 银行账户需要重新设置
- Oracle EBS AR 事务处理到期余额总计API
declare -- Local variables here i integer; x_line_original NUMBER; x_line_remaining NUMBER; ...
- Oracle EBS OM 主要API示例
1, Book order Oe_Order_Pub.Process_Order ( 1 , Fnd_Api.G_FALSE , Fnd_Api.G_FALSE , Fnd_Api.G_FALSE , ...
- Oracle EBS AR 更新客户配置文件
DECLARE l_rec_profile_t hz_customer_profile_v2pub.customer_profile_rec_type; l_rec_profile hz_custom ...
- Oracle EBS 银行账户API
创建银行 -- Create Bank DECLARE p_init_msg_list VARCHAR2(200); p_country_code VARCHAR2(200); p_bank_nam ...
- Oracle EBS AR 收款核销行关联到事务处理
select ra.trx_number from ar_cash_receipts_all cr, ar_receivable_applications_all ar,ra_customer_trx ...
- Oracle EBS AR 删除应收发票
DECLARE -- Non-scalar parameters require additional processing p_errors arp_trx_validate.mess ...
- Oracle EBS AR 更新客户组织层
declare -- Local variables here i integer; g_module ) := 'TCA_V2_API'; lrec_org hz_party_v2pub.organ ...
随机推荐
- 联系动词Link.V笔记
这篇单独记录一下联系动词的语法.需要注意的是,只有这个单词在作为联系动词的时候才是这个意思或者才是这样的用法.当然每个单词都会有很多的用法,并不只是这样而已. 第一组:好像…似乎… seem to b ...
- kafka消费者基本操作
1.消费消息 消费者以pull的方式获取消息, 每个消费者属于某一个消费组,在创建时不指定消费者的groupId,则该消费者属于默认消费组test-consumer-group ,在配置文件./con ...
- JavaScript 经典笔记
JavaScript 是弱类型的语言,所以编译器不能检测出类型错误. JavaScript 依赖于全局变量来进行链接.所有编译单元的所有顶级变量被撮合到一个被称为全局对象(the global obj ...
- linux wheel组
wheel 组的概念 wheel 组的概念继承自 UNIX.当服务器需要进行一些日常系统管理员无法执行的高级维护时,往往就要用到 root 权限:而“wheel” 组就是一个包含这些特殊权限的用户池: ...
- 精读JavaScript模式(二)
我在想知识点怎么去分类,原本计划一章节一篇,但这样会会显得长短不一.更主要的是看到哪写的哪更为随意.那么这一篇还是紧接第一篇进行知识梳理,上篇说到了更优化的for循环,现在继续聊聊其它的循环方式. 1 ...
- Druid链接池配置加密密码链接数据库
Druid是阿里巴巴开源平台上一个数据库连接池实现,它结合了C3P0.DBCP.PROXOOL等DB池的优点,同时加入了日志监控,可以很好的监控DB池连接和SQL的执行情况,可以说是针对监控而生的DB ...
- MyBatis原理第四篇——statementHandler对象(sqlSession内部核心实现,插件的基础)
首先约定文中将的四大对象是指:executor, statementHandler,parameterHandler,resultHandler对象.(为了方便下面的文章说道四大对象就专指它们) 讲到 ...
- WPF备忘录(5)怎样修改模板中的控件
首先,想问大家一个问题,你们如果要给一个Button添加背景图片会怎么做?(呵呵,这个问题又点小白哈) 是这样吗? <Button Height="57" Horizonta ...
- maven国内aliyun镜像
打开maven安装目录下conf文件夹的settings.xml文件 配置本地仓库 <localRepository>D:/maven/repository</localReposi ...
- MyCAT入门实践
1.MyCAT简单介绍 MyCAT是一个彻底开源的,面向企业应用开发的大数据库集群,支持事务.ACID.可以替代MySQL的加强版数据库,是一个可以视为MySQL集群的企业级数据库,用来替代昂贵的Or ...