AutoInvoice first looks at the transaction type setup (Menu: Setup>Transactions>Transaction Types) and the TAX_EXEMPT_FLAG column in RA_INTERFACE_LINES_ALL. If the 'Calculate Tax' box is checked on the transaction type OR the TAX_EXEMPT_FLAG column is 'R'(for Required), it tries to derive the Tax code.
To get the tax code, AutoInvoice looks at the following places in the following order, stopping at the first place where it finds a tax code:
- Ship-to site
- Bill-to site
- Customer
- Item
Thursday, February 26, 2009
Steps to be considered when we get 'Please Correct Revenue (or Receivable or Freight or Tax) Account Assignment'?
Autoaccounting is used to determine the accounts when the distribution table is not populated. When AutoInvoice gives this error, it generally gives the account with the missing segment(s).
Menu: Setup>Transactions>Autoaccounting
Query the account mentioned in the above error and note the setup for that missing segment.
If it is based on:
Transaction Type - Menu: Setup>Transaction>Transaction Types, and verify that all accounts are populated.
Salesperson - Menu: Setup>Transactions>Salespersons, and verify that all accounts are populated.
Standard Lines - For an Inventory Item navigate to Menu: Setup>Transactions>Items>Inventory items, and verify that the 'Sales Account' is populated in the 'Invoicing' alternate region. For a Memo Line, navigate to Setup =>Transactions =>Memo Lines, and make sure that 'Revenue Account' is populated.
Taxes - Menu: Setup>Tax>Codes and verify that account is populated in 'Tax' column under the 'Accounting' alternate region.
Additionally the following can be checked: Setup of Cross Validation Rules. Run Cross validation Listing Report in GL to identify the cross validation rule stopping the import of this line.
Menu: Setup>Transactions>Autoaccounting
Query the account mentioned in the above error and note the setup for that missing segment.
If it is based on:
Transaction Type - Menu: Setup>Transaction>Transaction Types, and verify that all accounts are populated.
Salesperson - Menu: Setup>Transactions>Salespersons, and verify that all accounts are populated.
Standard Lines - For an Inventory Item navigate to Menu: Setup>Transactions>Items>Inventory items, and verify that the 'Sales Account' is populated in the 'Invoicing' alternate region. For a Memo Line, navigate to Setup =>Transactions =>Memo Lines, and make sure that 'Revenue Account' is populated.
Taxes - Menu: Setup>Tax>Codes and verify that account is populated in 'Tax' column under the 'Accounting' alternate region.
Additionally the following can be checked: Setup of Cross Validation Rules. Run Cross validation Listing Report in GL to identify the cross validation rule stopping the import of this line.
Can Adjustments be imported through AutoInvoice?
we can not create adjustments through Auto Invoice and apply to Invoices.
we can create Only Invoices, Credit Memos, Debit Memos, and On-account Credits can be imported through AutoInvoice. The adjustments can be imported by using Adjustment API's. This API allows users to create, approve, update, and reverse adjustments for invoices using simple calls to PL/SQL functions.
we can create Only Invoices, Credit Memos, Debit Memos, and On-account Credits can be imported through AutoInvoice. The adjustments can be imported by using Adjustment API's. This API allows users to create, approve, update, and reverse adjustments for invoices using simple calls to PL/SQL functions.
How to apply a credit memo (from a legacy system) against an invoice using AutoInvoice:
How to apply a credit memo (from a legacy system) against an invoice using AutoInvoice: To link the credit to an invoice there are 2 options:
1) Populate REFERENCE_LINE_ID on RA_INTERFACE_LINES_ALL with the CUSTOMER_TRX_LINE_ID of the invoice. or
2) Populate REFERENCE_LINE_ATTRIBUTE1 to 15 with the INTERFACE_LINE_ATTRIBUTE1 to 15 of the invoice.
You also need to populate REFERENCE_LINE_CONTEXT with INTERFACE_LINE_CONTEXT of the invoice. INTERFACE_LINE_CONTEXT and INTERFACE_LINE_ATTRIBUTE1 to 15 are stored in RA_CUSTOMER_TRX_LINES_ALL.
To create an on-account credit (i.e. not linked to an invoice) do not populate REFERENCE_LINE_ID, REFERENCE_LINE_ATTRIBUTES or REFERENCE_LINE_CONTEXT.
1) Populate REFERENCE_LINE_ID on RA_INTERFACE_LINES_ALL with the CUSTOMER_TRX_LINE_ID of the invoice. or
2) Populate REFERENCE_LINE_ATTRIBUTE1 to 15 with the INTERFACE_LINE_ATTRIBUTE1 to 15 of the invoice.
You also need to populate REFERENCE_LINE_CONTEXT with INTERFACE_LINE_CONTEXT of the invoice. INTERFACE_LINE_CONTEXT and INTERFACE_LINE_ATTRIBUTE1 to 15 are stored in RA_CUSTOMER_TRX_LINES_ALL.
To create an on-account credit (i.e. not linked to an invoice) do not populate REFERENCE_LINE_ID, REFERENCE_LINE_ATTRIBUTES or REFERENCE_LINE_CONTEXT.
Can we Update An Already Created Invoice Through Autoinvoice Program
The Option/feature Of Updating An Exisitng Invoice In Receivables Through Auto
Invoice Program Is Not Available.
The Autoinvoice Program Is Used To Create New Invoices In Receivables.
Unlike Other Interface Programs, Say Customer Interface Program, Which You Can
Use Either To Create New Customers Or Update Exisitng Customers, The
Autoinvoice Program Cannot Be Used To Update An Existing Invoice Details.
Application we can do ie we can only apply cash receipt, credit memo or adjustment for already created/existing invoice.
You Can Only Create New Invoices Through Autoinvoice Program.
Invoice Program Is Not Available.
The Autoinvoice Program Is Used To Create New Invoices In Receivables.
Unlike Other Interface Programs, Say Customer Interface Program, Which You Can
Use Either To Create New Customers Or Update Exisitng Customers, The
Autoinvoice Program Cannot Be Used To Update An Existing Invoice Details.
Application we can do ie we can only apply cash receipt, credit memo or adjustment for already created/existing invoice.
You Can Only Create New Invoices Through Autoinvoice Program.
Monday, February 16, 2009
(Project Accounting) Steps from Project Creation to AR Flow
Projects To AR:
1.Create a Project using an appropriate Template with Tasks,Keymembers and
Customers who are having a valid Billing Contact.Change the Billing Setup as
COST/COST.
2.Create Agreements and Fundings for that Project.
3.Create Events accordingly. Give any type of Event for a Task. Number of lines of
an Invoice is dependent upon number of Events.
We can create any number of Events for a Task. All these Events will appear as
Lines in Invoice.
4.Define the Percent Complete i.e, Status of the Project and the date on which that
status is reached.
5.Create Approved Cost Budget and Approved Revenue Budget for the Project and
Baseline those Budgets.
6.Change the Project Status as Approved. Complete the Project Flexfield information.
7.Run the PRC: Generate Draft Revenue for a Single Project program to generate Draft
Revenue.Check this in Revenue Review.
8.Run the PRC: Generate Draft Invoices for a Single Project program
to generate Draft Invoice Check it in Invoice Review and Approve and Release that
Invoice.
9. Now, Run PRC: Interface Invoices to Receivables program to interface the Invoice
to Receivables.Now all the Invoices will be in RA_INTERFACE_LINES_ALL
10.Now, Run the Autoinvoice Master Program in Receivables. Batch Source is PROJECTS
INVOICES.
Now, the Invoices are successfully imported.
Or you can do in the below manner also for Foreign currency
Steps done in project creation
1.create project ie copy from existing projrcts go to projects and you can create here , for key memebrs and remaining things you can see the project wich you are copying and create same.
2.now go to Billing----> AGreement and here create funding and save the changes here .
3. now go to the BUDGET and here create budject and try to give amount and save and submit once you have submit then click baseline tab , if amount is not base lines then you have to give the conversion rate amount correctly to make it base line use below query for that
select CONVERSION_RATE*5000 from gl_daily_rates
where 1=1
and FROM_CURRENCY='EUR'
and TO_CURRENCY='USD'
and TRUNC (CONVERSION_DATE) = TO_DATE ('10-10-2008', 'DD-MM-YYYY')
4.Once you have done base line now we must creatre the expenditure items ... go to Expenditures------Pre Approved Batches ---Enter and here you can enter one new batch and create expenditure itemns..save the work and the click SUBMIT button and then Click Release button .
5.now go to Expenditures--->expenditures Inquiry--- Project here open your project and submit the request go to back end see if the concurrent program fails then run
PRC: Generate Draft Revenue for a Single Project for your single project.
6.once completeed then go to Billing--- Revenue Review and check your project and here Release.
7.Now go the expeditures ---- expenditure Inquiry---Project..... and here query for your project and open it and now RUn the Request once Request completed now
Run The request for single project PRC: Generate Draft Invoices for a Single Project
8.Go to Billing-----Inovice Review and check your invoice and expenditure how they appear and now
9. Now, Run PRC: Interface Invoices to Receivables program to
interface the Invoice to Receivables.
Now all the Invoices will be in RA_INTERFACE_LINES_ALL
10.Now, Run the Autoinvoice Master Program in Receivables. Batch Source
is PROJECTS INVOICES.
1.Create a Project using an appropriate Template with Tasks,Keymembers and
Customers who are having a valid Billing Contact.Change the Billing Setup as
COST/COST.
2.Create Agreements and Fundings for that Project.
3.Create Events accordingly. Give any type of Event for a Task. Number of lines of
an Invoice is dependent upon number of Events.
We can create any number of Events for a Task. All these Events will appear as
Lines in Invoice.
4.Define the Percent Complete i.e, Status of the Project and the date on which that
status is reached.
5.Create Approved Cost Budget and Approved Revenue Budget for the Project and
Baseline those Budgets.
6.Change the Project Status as Approved. Complete the Project Flexfield information.
7.Run the PRC: Generate Draft Revenue for a Single Project program to generate Draft
Revenue.Check this in Revenue Review.
8.Run the PRC: Generate Draft Invoices for a Single Project program
to generate Draft Invoice Check it in Invoice Review and Approve and Release that
Invoice.
9. Now, Run PRC: Interface Invoices to Receivables program to interface the Invoice
to Receivables.Now all the Invoices will be in RA_INTERFACE_LINES_ALL
10.Now, Run the Autoinvoice Master Program in Receivables. Batch Source is PROJECTS
INVOICES.
Now, the Invoices are successfully imported.
Or you can do in the below manner also for Foreign currency
Steps done in project creation
1.create project ie copy from existing projrcts go to projects and you can create here , for key memebrs and remaining things you can see the project wich you are copying and create same.
2.now go to Billing----> AGreement and here create funding and save the changes here .
3. now go to the BUDGET and here create budject and try to give amount and save and submit once you have submit then click baseline tab , if amount is not base lines then you have to give the conversion rate amount correctly to make it base line use below query for that
select CONVERSION_RATE*5000 from gl_daily_rates
where 1=1
and FROM_CURRENCY='EUR'
and TO_CURRENCY='USD'
and TRUNC (CONVERSION_DATE) = TO_DATE ('10-10-2008', 'DD-MM-YYYY')
4.Once you have done base line now we must creatre the expenditure items ... go to Expenditures------Pre Approved Batches ---Enter and here you can enter one new batch and create expenditure itemns..save the work and the click SUBMIT button and then Click Release button .
5.now go to Expenditures--->expenditures Inquiry--- Project here open your project and submit the request go to back end see if the concurrent program fails then run
PRC: Generate Draft Revenue for a Single Project for your single project.
6.once completeed then go to Billing--- Revenue Review and check your project and here Release.
7.Now go the expeditures ---- expenditure Inquiry---Project..... and here query for your project and open it and now RUn the Request once Request completed now
Run The request for single project PRC: Generate Draft Invoices for a Single Project
8.Go to Billing-----Inovice Review and check your invoice and expenditure how they appear and now
9. Now, Run PRC: Interface Invoices to Receivables program to
interface the Invoice to Receivables.
Now all the Invoices will be in RA_INTERFACE_LINES_ALL
10.Now, Run the Autoinvoice Master Program in Receivables. Batch Source
is PROJECTS INVOICES.
Thursday, January 29, 2009
Flexfields avilable for your Oracle Application Version
SELECT faa.application_name "Application Name",
fif.id_flex_name "Flexfield Name",
faa.description "Application Description"
FROM fnd_id_flexs fif, fnd_application_all_view faa
WHERE fif.application_id = faa.application_id
ORDER BY faa.application_name;
fif.id_flex_name "Flexfield Name",
faa.description "Application Description"
FROM fnd_id_flexs fif, fnd_application_all_view faa
WHERE fif.application_id = faa.application_id
ORDER BY faa.application_name;
Concurrent program name based on the request ID
Select program from FND_CONC_REQ_SUMMARY_V
where request_id = 'Your request ID';
where request_id = 'Your request ID';
Operating Unit name based on the Operating Unit ID
select Business_group_id, Organization_id, name,date_from,date_to, legal_entity_id, set_of_books_id from hr_operating_units where organization_id = 'your Operating Unit ID';
To Extract revenue distribution lines in AR
SELECT distinct c.customer_name, c.customer_number, c.customer_id,
t.customer_trx_id, t.trx_number, ct.NAME invoice_type,
l.line_number, t.org_id, cc.segment1, cc.segment2,
cc.segment3, cc.segment4, cc.segment5, cc.segment6, d.gl_date,
d.cust_trx_line_gl_dist_id, d.code_combination_id,
d.account_class
FROM ra_cust_trx_types_all ct,
ra_customers c,
ra_customer_trx_all t,
ra_customer_trx_lines_all l,
gl_code_combinations cc,
ra_cust_trx_line_gl_dist_all d
WHERE 1 = 1
AND t.cust_trx_type_id = ct.cust_trx_type_id
AND t.bill_to_customer_id = c.customer_id
AND d.customer_trx_id = t.customer_trx_id
AND d.customer_trx_line_id = l.customer_trx_line_id(+)
AND d.code_combination_id = cc.code_combination_id
AND TRUNC (d.gl_date) >= TO_DATE ('01-01-2009', 'DD-MM-YYYY')
AND d.posting_control_id = -3
AND d.account_set_flag = 'N'
AND d.account_class = 'REV'
t.customer_trx_id, t.trx_number, ct.NAME invoice_type,
l.line_number, t.org_id, cc.segment1, cc.segment2,
cc.segment3, cc.segment4, cc.segment5, cc.segment6, d.gl_date,
d.cust_trx_line_gl_dist_id, d.code_combination_id,
d.account_class
FROM ra_cust_trx_types_all ct,
ra_customers c,
ra_customer_trx_all t,
ra_customer_trx_lines_all l,
gl_code_combinations cc,
ra_cust_trx_line_gl_dist_all d
WHERE 1 = 1
AND t.cust_trx_type_id = ct.cust_trx_type_id
AND t.bill_to_customer_id = c.customer_id
AND d.customer_trx_id = t.customer_trx_id
AND d.customer_trx_line_id = l.customer_trx_line_id(+)
AND d.code_combination_id = cc.code_combination_id
AND TRUNC (d.gl_date) >= TO_DATE ('01-01-2009', 'DD-MM-YYYY')
AND d.posting_control_id = -3
AND d.account_set_flag = 'N'
AND d.account_class = 'REV'
Friday, January 23, 2009
Fundamental Links
FUNDAMENTALS :
ABC's of ERP : http://www.cio.com/research/erp/edit/erpbasics.html
ABC's of CRM : http://www.cio.com/research/crm/edit/crmabc.html
ABC's of SCM : http://www.cio.com/research/scm/edit/012202_scm.html
ABC's of E-Business (B2B) : http://www.cio.com/research/ec/edit/b2babc.html
(B2C) : http://www.cio.com/ec/edit/b2cabc.html
CRM 11i (For More info: Please see Oracle Store for product descriptions and pricing)
CRM 11i includes the following modules:
Marketing: Marketing Online (including Customer Intelligence, Marketing Encyclopedia),
Advanced Marketing, Trade Management and Marketing Intelligence.
Sales: iStore (including iMarketing, Configurator), iPayment, TeleSales, Sales Intelligence, Sales Online (including, Field Sales for mobile devices), and Incentive Compensation.
Service:iSupport, Teleservice, Service Online (including Support, Customer Care),
Depot Repair, Spares Management, Advanced Scheduler, Mobile Field Service, Contracts, and Customer Intelligence.
Contracts: Contracts Core, Contracts for Sales, Contracts for Service, Contracts for Rights, and Contracts Intelligence (Project Contracts is also built upon the Contracts Core Application; however, it is part of the ‘Back Office’ Projects family).
Interaction Center: Advanced Inbound (including Connectors), Advanced Outbound (including Interaction Blending, Connectors), eMail Center, Scripting, and Call Center Intelligence.
E-Commerce: iStore, Marketing Online (specifically the eMerchandising functionality) iPayment, Quoting, Configurator, iSupport.
ABC's of ERP : http://www.cio.com/research/erp/edit/erpbasics.html
ABC's of CRM : http://www.cio.com/research/crm/edit/crmabc.html
ABC's of SCM : http://www.cio.com/research/scm/edit/012202_scm.html
ABC's of E-Business (B2B) : http://www.cio.com/research/ec/edit/b2babc.html
(B2C) : http://www.cio.com/ec/edit/b2cabc.html
CRM 11i (For More info: Please see Oracle Store for product descriptions and pricing)
CRM 11i includes the following modules:
Marketing: Marketing Online (including Customer Intelligence, Marketing Encyclopedia),
Advanced Marketing, Trade Management and Marketing Intelligence.
Sales: iStore (including iMarketing, Configurator), iPayment, TeleSales, Sales Intelligence, Sales Online (including, Field Sales for mobile devices), and Incentive Compensation.
Service:iSupport, Teleservice, Service Online (including Support, Customer Care),
Depot Repair, Spares Management, Advanced Scheduler, Mobile Field Service, Contracts, and Customer Intelligence.
Contracts: Contracts Core, Contracts for Sales, Contracts for Service, Contracts for Rights, and Contracts Intelligence (Project Contracts is also built upon the Contracts Core Application; however, it is part of the ‘Back Office’ Projects family).
Interaction Center: Advanced Inbound (including Connectors), Advanced Outbound (including Interaction Blending, Connectors), eMail Center, Scripting, and Call Center Intelligence.
E-Commerce: iStore, Marketing Online (specifically the eMerchandising functionality) iPayment, Quoting, Configurator, iSupport.
Friday, January 16, 2009
To View triggers and Sequences created
To View triggers and Sequences created
You can see in below view
all_triggers and
all_sequences
You can see in below view
all_triggers and
all_sequences
Monday, December 22, 2008
To Retriew the records from Org dependent Views
To Retriew the records from Org dependent Views on Sql Developer/Toad/Sql * Plus
begin
fnd_client_info.set_org_context(Org_id);
end;
begin
fnd_client_info.set_org_context(Org_id);
end;
Friday, December 19, 2008
R12 AR Fax Contact Point Creation
DECLARE
l_contact_point_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type;
l_edi_rec_type hz_contact_point_v2pub.edi_rec_type;
l_email_rec hz_contact_point_v2pub.email_rec_type;
l_fax_rec hz_contact_point_v2pub.phone_rec_type;
l_telex_rec_type hz_contact_point_v2pub.telex_rec_type;
l_web_rec_type hz_contact_point_v2pub.web_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_contact_point_rec.contact_point_type := 'PHONE';
l_contact_point_rec.owner_table_name := 'HZ_PARTIES';
l_contact_point_rec.created_by_module := 'TCA_MIGRATION';
l_contact_point_rec.owner_table_id := 308013;
l_fax_rec.phone_area_code := '104';
l_fax_rec.phone_number := '234-565';
l_fax_rec.phone_line_type := 'FAX';
hz_contact_point_v2pub.create_contact_point
(p_init_msg_list => 'T',
p_contact_point_rec => l_contact_point_rec,
p_edi_rec => l_edi_rec_type,
p_email_rec => l_email_rec,
p_phone_rec => l_fax_rec,
p_telex_rec => l_telex_rec_type,
p_web_rec => l_web_rec_type,
x_contact_point_id => l_contact_point_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_contact_point_id ' || l_contact_point_id);
END IF;
END;
l_contact_point_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type;
l_edi_rec_type hz_contact_point_v2pub.edi_rec_type;
l_email_rec hz_contact_point_v2pub.email_rec_type;
l_fax_rec hz_contact_point_v2pub.phone_rec_type;
l_telex_rec_type hz_contact_point_v2pub.telex_rec_type;
l_web_rec_type hz_contact_point_v2pub.web_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_contact_point_rec.contact_point_type := 'PHONE';
l_contact_point_rec.owner_table_name := 'HZ_PARTIES';
l_contact_point_rec.created_by_module := 'TCA_MIGRATION';
l_contact_point_rec.owner_table_id := 308013;
l_fax_rec.phone_area_code := '104';
l_fax_rec.phone_number := '234-565';
l_fax_rec.phone_line_type := 'FAX';
hz_contact_point_v2pub.create_contact_point
(p_init_msg_list => 'T',
p_contact_point_rec => l_contact_point_rec,
p_edi_rec => l_edi_rec_type,
p_email_rec => l_email_rec,
p_phone_rec => l_fax_rec,
p_telex_rec => l_telex_rec_type,
p_web_rec => l_web_rec_type,
x_contact_point_id => l_contact_point_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_contact_point_id ' || l_contact_point_id);
END IF;
END;
R12 AR Email Contact Point Creation
DECLARE
l_contact_point_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type;
l_edi_rec_type hz_contact_point_v2pub.edi_rec_type;
l_email_rec hz_contact_point_v2pub.email_rec_type;
l_phone_rec hz_contact_point_v2pub.phone_rec_type;
l_telex_rec_type hz_contact_point_v2pub.telex_rec_type;
l_web_rec_type hz_contact_point_v2pub.web_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_contact_point_rec.contact_point_type := 'EMAIL';
l_contact_point_rec.owner_table_name := 'HZ_PARTIES';
l_contact_point_rec.created_by_module := 'TCA_MIGRATION';
l_contact_point_rec.owner_table_id := 308013;
l_email_rec.email_address := 'test@xxx.com';
hz_contact_point_v2pub.create_contact_point
(p_init_msg_list => 'T',
p_contact_point_rec => l_contact_point_rec,
p_edi_rec => l_edi_rec_type,
p_email_rec => l_email_rec,
p_phone_rec => l_phone_rec,
p_telex_rec => l_telex_rec_type,
p_web_rec => l_web_rec_type,
x_contact_point_id => l_contact_point_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_contact_point_id ' || l_contact_point_id);
END IF;
END;
l_contact_point_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type;
l_edi_rec_type hz_contact_point_v2pub.edi_rec_type;
l_email_rec hz_contact_point_v2pub.email_rec_type;
l_phone_rec hz_contact_point_v2pub.phone_rec_type;
l_telex_rec_type hz_contact_point_v2pub.telex_rec_type;
l_web_rec_type hz_contact_point_v2pub.web_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_contact_point_rec.contact_point_type := 'EMAIL';
l_contact_point_rec.owner_table_name := 'HZ_PARTIES';
l_contact_point_rec.created_by_module := 'TCA_MIGRATION';
l_contact_point_rec.owner_table_id := 308013;
l_email_rec.email_address := 'test@xxx.com';
hz_contact_point_v2pub.create_contact_point
(p_init_msg_list => 'T',
p_contact_point_rec => l_contact_point_rec,
p_edi_rec => l_edi_rec_type,
p_email_rec => l_email_rec,
p_phone_rec => l_phone_rec,
p_telex_rec => l_telex_rec_type,
p_web_rec => l_web_rec_type,
x_contact_point_id => l_contact_point_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_contact_point_id ' || l_contact_point_id);
END IF;
END;
R12 AR Phone Contact Point Creation
DECLARE
l_contact_point_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type;
l_edi_rec_type hz_contact_point_v2pub.edi_rec_type;
l_email_rec hz_contact_point_v2pub.email_rec_type;
l_phone_rec hz_contact_point_v2pub.phone_rec_type;
l_telex_rec_type hz_contact_point_v2pub.telex_rec_type;
l_web_rec_type hz_contact_point_v2pub.web_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_contact_point_rec.contact_point_type := 'PHONE';
l_contact_point_rec.owner_table_name := 'HZ_PARTIES';
l_contact_point_rec.created_by_module := 'TCA_MIGRATION';
l_contact_point_rec.owner_table_id := 308013;
l_phone_rec.phone_area_code := '703';
l_phone_rec.phone_number := '8441213';
l_phone_rec.phone_line_type := 'GEN';
hz_contact_point_v2pub.create_contact_point
(p_init_msg_list => 'T',
p_contact_point_rec => l_contact_point_rec,
p_edi_rec => l_edi_rec_type,
p_email_rec => l_email_rec,
p_phone_rec => l_phone_rec,
p_telex_rec => l_telex_rec_type,
p_web_rec => l_web_rec_type,
x_contact_point_id => l_contact_point_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_contact_point_id ' || l_contact_point_id);
END IF;
END;
l_contact_point_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type;
l_edi_rec_type hz_contact_point_v2pub.edi_rec_type;
l_email_rec hz_contact_point_v2pub.email_rec_type;
l_phone_rec hz_contact_point_v2pub.phone_rec_type;
l_telex_rec_type hz_contact_point_v2pub.telex_rec_type;
l_web_rec_type hz_contact_point_v2pub.web_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_contact_point_rec.contact_point_type := 'PHONE';
l_contact_point_rec.owner_table_name := 'HZ_PARTIES';
l_contact_point_rec.created_by_module := 'TCA_MIGRATION';
l_contact_point_rec.owner_table_id := 308013;
l_phone_rec.phone_area_code := '703';
l_phone_rec.phone_number := '8441213';
l_phone_rec.phone_line_type := 'GEN';
hz_contact_point_v2pub.create_contact_point
(p_init_msg_list => 'T',
p_contact_point_rec => l_contact_point_rec,
p_edi_rec => l_edi_rec_type,
p_email_rec => l_email_rec,
p_phone_rec => l_phone_rec,
p_telex_rec => l_telex_rec_type,
p_web_rec => l_web_rec_type,
x_contact_point_id => l_contact_point_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_contact_point_id ' || l_contact_point_id);
END IF;
END;
R12 AR Org Contact Creation
DECLARE
l_org_contact_id NUMBER;
l_party_rel_id_contactrel NUMBER;
l_party_id NUMBER;
l_party_number VARCHAR2 (20);
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_org_contact_rec hz_party_contact_v2pub.org_contact_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
---THIS IS THE SUBJECT ID (PERSON INFO)
l_org_contact_rec.party_rel_rec.subject_id := 308026;
l_org_contact_rec.party_rel_rec.subject_type := 'PERSON';
l_org_contact_rec.party_rel_rec.subject_table_name := 'HZ_PARTIES';
---THIS IS THE OBJECT ID (ORGANIZATION INFO)
l_org_contact_rec.party_rel_rec.object_id := 308013;
l_org_contact_rec.party_rel_rec.object_type := 'ORGANIZATION';
l_org_contact_rec.party_rel_rec.object_table_name := 'HZ_PARTIES';
l_org_contact_rec.party_rel_rec.relationship_code := 'CONTACT_OF';
l_org_contact_rec.party_rel_rec.relationship_type := 'CONTACT';
l_org_contact_rec.created_by_module := 'TCA_MIGRATION';
hz_party_contact_v2pub.create_org_contact
(p_init_msg_list => 'T',
p_org_contact_rec => l_org_contact_rec,
x_org_contact_id => l_org_contact_id,
x_party_rel_id => l_party_rel_id_contactrel,
x_party_id => l_party_id,
x_party_number => l_party_number,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_org_contact_id ' || l_org_contact_id);
DBMS_OUTPUT.put_line ( 'l_party_rel_id_contactrel '
|| l_party_rel_id_contactrel
);
DBMS_OUTPUT.put_line ('l_party_id ' || l_party_id);
DBMS_OUTPUT.put_line ('l_party_number ' || l_party_number);
END IF;
END;
l_org_contact_id NUMBER;
l_party_rel_id_contactrel NUMBER;
l_party_id NUMBER;
l_party_number VARCHAR2 (20);
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_org_contact_rec hz_party_contact_v2pub.org_contact_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
---THIS IS THE SUBJECT ID (PERSON INFO)
l_org_contact_rec.party_rel_rec.subject_id := 308026;
l_org_contact_rec.party_rel_rec.subject_type := 'PERSON';
l_org_contact_rec.party_rel_rec.subject_table_name := 'HZ_PARTIES';
---THIS IS THE OBJECT ID (ORGANIZATION INFO)
l_org_contact_rec.party_rel_rec.object_id := 308013;
l_org_contact_rec.party_rel_rec.object_type := 'ORGANIZATION';
l_org_contact_rec.party_rel_rec.object_table_name := 'HZ_PARTIES';
l_org_contact_rec.party_rel_rec.relationship_code := 'CONTACT_OF';
l_org_contact_rec.party_rel_rec.relationship_type := 'CONTACT';
l_org_contact_rec.created_by_module := 'TCA_MIGRATION';
hz_party_contact_v2pub.create_org_contact
(p_init_msg_list => 'T',
p_org_contact_rec => l_org_contact_rec,
x_org_contact_id => l_org_contact_id,
x_party_rel_id => l_party_rel_id_contactrel,
x_party_id => l_party_id,
x_party_number => l_party_number,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_org_contact_id ' || l_org_contact_id);
DBMS_OUTPUT.put_line ( 'l_party_rel_id_contactrel '
|| l_party_rel_id_contactrel
);
DBMS_OUTPUT.put_line ('l_party_id ' || l_party_id);
DBMS_OUTPUT.put_line ('l_party_number ' || l_party_number);
END IF;
END;
R12 AR Person Creation
DECLARE
l_party_id NUMBER;
l_party_number VARCHAR2 (20);
l_profile_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_create_person_rec hz_party_v2pub.person_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_create_person_rec.person_last_name := 'Rohith';
l_create_person_rec.person_first_name := 'Kannur';
l_create_person_rec.created_by_module := 'TCA_MIGRATION';
hz_party_v2pub.create_person
(p_init_msg_list => 'T',
p_person_rec => l_create_person_rec,
x_party_id => l_party_id,
x_party_number => l_party_number,
x_profile_id => l_profile_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
DBMS_OUTPUT.put_line ('l_msg_count ' || l_msg_count);
DBMS_OUTPUT.put_line ('l_msg_data ' || l_msg_data);
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_party_id ' || l_party_id);
DBMS_OUTPUT.put_line ('l_party_number ' || l_party_number);
DBMS_OUTPUT.put_line ('l_profile_id ' || l_profile_id);
END IF;
END;
l_party_id NUMBER;
l_party_number VARCHAR2 (20);
l_profile_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_create_person_rec hz_party_v2pub.person_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_create_person_rec.person_last_name := 'Rohith';
l_create_person_rec.person_first_name := 'Kannur';
l_create_person_rec.created_by_module := 'TCA_MIGRATION';
hz_party_v2pub.create_person
(p_init_msg_list => 'T',
p_person_rec => l_create_person_rec,
x_party_id => l_party_id,
x_party_number => l_party_number,
x_profile_id => l_profile_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
DBMS_OUTPUT.put_line ('l_return_status ' || l_return_status);
IF l_return_status <> 'S'
THEN
DBMS_OUTPUT.put_line ('l_msg_count ' || l_msg_count);
DBMS_OUTPUT.put_line ('l_msg_data ' || l_msg_data);
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_party_id ' || l_party_id);
DBMS_OUTPUT.put_line ('l_party_number ' || l_party_number);
DBMS_OUTPUT.put_line ('l_profile_id ' || l_profile_id);
END IF;
END;
R12 AR Customer Account Site Creation
DECLARE
l_cust_acct_site_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_cust_acct_site_rec hz_cust_account_site_v2pub.cust_acct_site_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
mo_global.init ('AR');
mo_global.set_policy_context ('S', '85');
l_cust_acct_site_rec.cust_account_id := 96682;
l_cust_acct_site_rec.party_site_id := 179420;
l_cust_acct_site_rec.created_by_module := 'TCA_MIGRATION';
hz_cust_account_site_v2pub.create_cust_acct_site
(p_init_msg_list => 'T',
p_cust_acct_site_rec => l_cust_acct_site_rec,
x_cust_acct_site_id => l_cust_acct_site_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_cust_acct_site_id ' || l_cust_acct_site_id);
END IF;
END;
l_cust_acct_site_id NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_cust_acct_site_rec hz_cust_account_site_v2pub.cust_acct_site_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
mo_global.init ('AR');
mo_global.set_policy_context ('S', '85');
l_cust_acct_site_rec.cust_account_id := 96682;
l_cust_acct_site_rec.party_site_id := 179420;
l_cust_acct_site_rec.created_by_module := 'TCA_MIGRATION';
hz_cust_account_site_v2pub.create_cust_acct_site
(p_init_msg_list => 'T',
p_cust_acct_site_rec => l_cust_acct_site_rec,
x_cust_acct_site_id => l_cust_acct_site_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_cust_acct_site_id ' || l_cust_acct_site_id);
END IF;
END;
R12 AR customer Party Site Creation
DECLARE
l_party_site_id NUMBER;
l_party_site_number NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_party_site_rec hz_party_site_v2pub.party_site_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_party_site_rec.party_id := 308013;
l_party_site_rec.location_id := 25254;
l_party_site_rec.created_by_module := 'TCA_MIGRATION';
hz_party_site_v2pub.create_party_site
(p_init_msg_list => 'T',
p_party_site_rec => l_party_site_rec,
x_party_site_id => l_party_site_id,
x_party_site_number => l_party_site_number,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_party_site_id ' || l_party_site_id);
DBMS_OUTPUT.put_line ('l_party_site_number ' || l_party_site_number);
END IF;
END;
l_party_site_id NUMBER;
l_party_site_number NUMBER;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
l_output VARCHAR2 (1000);
l_msg_dummy VARCHAR2 (1000);
l_party_site_rec hz_party_site_v2pub.party_site_rec_type;
BEGIN
fnd_global.apps_initialize(user_id in number,resp_id in number,resp_appl_id in number);
l_party_site_rec.party_id := 308013;
l_party_site_rec.location_id := 25254;
l_party_site_rec.created_by_module := 'TCA_MIGRATION';
hz_party_site_v2pub.create_party_site
(p_init_msg_list => 'T',
p_party_site_rec => l_party_site_rec,
x_party_site_id => l_party_site_id,
x_party_site_number => l_party_site_number,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
IF l_return_status <> 'S'
THEN
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i, fnd_api.g_false, l_msg_data, l_msg_dummy);
l_output := (TO_CHAR (i) || ': ' || l_msg_data);
END LOOP;
DBMS_OUTPUT.put_line ('Error mesg' || l_output);
ELSE
DBMS_OUTPUT.put_line ('l_party_site_id ' || l_party_site_id);
DBMS_OUTPUT.put_line ('l_party_site_number ' || l_party_site_number);
END IF;
END;
Subscribe to:
Posts (Atom)