Oracle provides couple of API's to
get the Total Amount on a Standard Purchase Order. Using this API, you don't
have to worry about the calculation of the Quantity x Unit Price and what needs
to be excluded from the calculation.
To get the Total Amount of the
current revision of the Standard Purchase Order
##########################################################
DECLARE
l_total
NUMBER := 0;
BEGIN
l_total :=
po_core_s.get_total('H', :p_po_header_id);
dbms_output.put_line('PO Total Amount:'||l_total);
END;
##########################################################
To get the Total Amount of any
previous revisions of the Standard Purchase Order, use the following API.
##########################################################
DECLARE
l_total NUMBER := 0;
BEGIN
l_total := po_core_s.get_archive_total_for_any_rev
(:p_po_header_id,-- PO Header Id
'H', --
Standard Header
'PO', -- Document Type
'STANDARD', -- Document Sub Type
0,
-- Revision Num
'Y'); -- Base
Currency
dbms_output.put_line('PO Total
Amount:'||l_total);
END;
###########################################################
Wednesday, October 9, 2013
Thursday, September 12, 2013
FND_REQUEST.ADD_LAYOUT for Setting Layout options for a Concurrent Request
Using FND_REQUEST.SUBMIT_REQUEST, Concurrent Request can only be
submitted as a request and any layout options or print options cannot be added
to the request. To be able to set the layout options for a request a separate function
FND_REQUEST.ADD_LAYOUT needs to be called before calling the SUBMIT_REQUEST.
This will be useful while calling a XML Publisher Report Concurrent Program is
being submitted from another Program.
fnd_request.add_layout (template_appl_name =>
'Template Application',
template_code => 'Template Code',
template_language => 'en', --Use language from template definition
template_territory => 'US', --Use territory from template definition
output_format => 'PDF' --Use output format from template definition
);
template_code => 'Template Code',
template_language => 'en', --Use language from template definition
template_territory => 'US', --Use territory from template definition
output_format => 'PDF' --Use output format from template definition
);
Thursday, September 5, 2013
REP-0300: ORACLE error occurred REP-0069: Internal error
Following is the error I got while running a report through Concurrent Program in R12.
This is a very generic error and does not give you any details on what is causing this.
Enter Password:
REP-0300: ORACLE error occurred.
REP-0069: Internal error
REP-57054: In-process job terminated:Terminated with error:
REP-300: ORACLE error occurred.
I created a report and I was using a Select * from in one of the queries of the report datamodel. When I executed the concurrent program I was getting the above listed error.
I had no clue why this is happenning. I had multiple queries in that report. I tried to debug which query is causing the error by removing one query at a time and I was able to pin down the query causing this error. Then I realized that I am using Select * from.... in this query and I am selecting individual columns in all other queries. When I replaced the * with Individual columns in this query, Error disappeared.
Hope this helps.
This is a very generic error and does not give you any details on what is causing this.
Enter Password:
REP-0300: ORACLE error occurred.
REP-0069: Internal error
REP-57054: In-process job terminated:Terminated with error:
REP-300: ORACLE error occurred.
I created a report and I was using a Select * from in one of the queries of the report datamodel. When I executed the concurrent program I was getting the above listed error.
I had no clue why this is happenning. I had multiple queries in that report. I tried to debug which query is causing the error by removing one query at a time and I was able to pin down the query causing this error. Then I realized that I am using Select * from.... in this query and I am selecting individual columns in all other queries. When I replaced the * with Individual columns in this query, Error disappeared.
Hope this helps.
Saturday, January 26, 2013
Timeout Functionality on Workflow Notifications
Timeout functionality can be set on the Workflow Notifications. This will enable notifications to get Timed Out after desired time and as per the requirement if a reminder is needed, reminder notification can be sent and if reminder is not needed, notification can be escalated to the supervisors.
Below is the Approval notification properties of the Expense Report Approval Workflow
Below is the Approval notification properties of the Expense Report Approval Workflow
Go to Node Tab where you will see the option for Timeout. There are 3 options in here.
Relative Time: This can be set when the Timeout period you want to set is Constant. If relative time is chosen and Timeout is set then if the Timeout needs to be changed in the future, Workflow has to be touched to set a new Timeout.
Item Attribute: This is a better option to choose when there might be a change in the Timeout period in the future. When Item Attribute is selected, we set the Timeout period from the back end code by setting the Timeout period in Minutes to the Workflow Attribute. Make sure this attribute value is set before sending the notification for approval.
Saturday, August 11, 2012
Invoice Matching 2-Way, 3-Way and 4-Way
When Invoices are matched with PO, following 3 options can be used to match the PO.
PO Unit Price = Invoice Unit Price
PO Quantity = Invoice Quantity
PO Quantity = Invoice Quantity
3-Way Match: In 3-Way Match PO Quantity should match with Invoice Quantity and Receipt Quantity. Also PO Unit Price should match with Invoice Unit Price. All the matching should be with in the tolerance limits allowed in the Receiving Control options.
PO Unit Price = Invoice Unit Price
PO Quantity = Invoice Quantity
PO Quantity = Invoice Quantity
Invoice Quantity = Receipt Quantity
4-Way Match: In 4-Way Match PO Quantity should match with Invoice Quantity and Receipt Quantity and also Accepted Quantity Also PO Unit Price should match with Invoice Unit Price. All the matching should be with in the tolerance limits allowed in the Receiving Control options.
PO Unit Price = Invoice Unit Price
PO Quantity = Invoice Quantity
Invoice Quantity = Accepted Quantity
Invoice Quantity = Receipt Quantity
PO Receipt Accounting entries to GL
When a PO Receipt is created in the Receiving Transactions form with destination type as Inventory, 2 entries get created in the RCV_TRANSACTIONS form. One with Transaction type as Deliver and other with Receive. Also accounting is also derived for the 'RECEIVE' transaction. You will see an entry with RECEIVING_INSPECTION and an ACCRUAL entry in the RCV_RECEIVING_SUB_LEDGER table. When "Create Accounting: Receiving" is run, these Accrual Transaction for Receipt is transferred to GL through SLA. In SLA for Receive Transactions "Receiving Inspection" account is Debited and "Accrual" Account is credited. Journal Category will be "Receiving" for these transactions
For the Deliver Transaction type the transaction is sourced to Material Transactions as "PO Receipt" Transaction Type. Accounting will be done on this transaction when "Active Cost Worker" program is run. Usually this program will be scheduled to run every few minutes to calculate cost of the transactions. When "Accounting Program" is run, these transactions from MTL_TRANSACTION_ACCOUNTS will be transferred to GL through SLA. In SLA for Deliver Transactions, "Inventory Valuation" account is Debited and "Receiving Inspection" account is Credited. Journal Category will be "Inventory" for these Deliver Transactions.
For the Deliver Transaction type the transaction is sourced to Material Transactions as "PO Receipt" Transaction Type. Accounting will be done on this transaction when "Active Cost Worker" program is run. Usually this program will be scheduled to run every few minutes to calculate cost of the transactions. When "Accounting Program" is run, these transactions from MTL_TRANSACTION_ACCOUNTS will be transferred to GL through SLA. In SLA for Deliver Transactions, "Inventory Valuation" account is Debited and "Receiving Inspection" account is Credited. Journal Category will be "Inventory" for these Deliver Transactions.
Tuesday, June 12, 2012
What is a Purchase Requisition?
A Purchase Requisition is a method by which Goods/Services can be Purchased from a Supplier. In Oracle a Purchase Requisition is routed for Approval using Workflow engine. Once approved, this Requisition is often converted to RFQ (Request for Quotation). A Purchase Requisition is usually generated by User Departement or the personnel who are actually going to use the goods or services received from the Requisition.
Monday, June 4, 2012
OAF Switcher Region: How to use it?
A Switcher region can be used to dynamically switch between the items to be displayed in a table or region.
This is similar to a CASE Statement in SQL. Depending on the input to the Switcher Region, it will display the items under the region.
Lets say, we have a requirement where we need to display Delete Icon as Enabled when Employee is In-Active and Delete Icon as Disabled when Employee is Active as shown below.
This is similar to a CASE Statement in SQL. Depending on the input to the Switcher Region, it will display the items under the region.
Lets say, we have a requirement where we need to display Delete Icon as Enabled when Employee is In-Active and Delete Icon as Disabled when Employee is Active as shown below.
To Achieve this, We need to Create a Switcher Region in the Table where you want to display the Delete Icon. If you are using an Advanced Table, Follow the below Steps.
In the VO which populates these rows, make the following changes,
In the VO which populates these rows, make the following changes,
1. Create a Pseudo Column in the Query which returns "Delete_Disabled" or "Delete_Enabled" based on the Status value "Active" or "In-Active".
2. Once the SQL Statement is modified in the Query, DeleteSwitch Item is going to is going to return one the se 2 attributes as Inputs to Switcher Region ("DeleteDisabled" or "DeleteEnabled")
Now make the following changes in Page or Region
2. Once the SQL Statement is modified in the Query, DeleteSwitch Item is going to is going to return one the se 2 attributes as Inputs to Switcher Region ("DeleteDisabled" or "DeleteEnabled")
Now make the following changes in Page or Region
1. Create a New Column under Advanced Table where you want this Delete Icon to be displayed.
2. Right Click on the New Column that was created and Select New -- Switcher
2. Right Click on the New Column that was created and Select New -- Switcher
3. Set the following Properties to the Switcher Region.
ID: DeleteSwitcher
Region Style: Switcher
View Attribute: DeleteSwitcher
Region Style: Switcher
View Attribute: DeleteSwitcher
4. You will notice a new <case> item being created under the Switcher Region.
5. Set the following properties to the First Case Item.
ID: DeleteDisabled
Item Style: image
Prompt: Delete
Image URL: deleteicon_disabled.gif
Rendered: True
ID: DeleteDisabled
Item Style: image
Prompt: Delete
Image URL: deleteicon_disabled.gif
Rendered: True
6. Right Click on Switcher Region and Select New -- Case
7. For the New Item, Set the following Properties
7. For the New Item, Set the following Properties
ID: DeleteEnabled
Item Style: image
Prompt: Delete
Image URL: deleteicon_enabled.gif
Rendered: True
Item Style: image
Prompt: Delete
Image URL: deleteicon_enabled.gif
Rendered: True
8. Make sure you are giving the ID of the Item exactly matching with the View Attribute value being returned by the DELETE_SWITCHER in the Sql Query of VO
9. Test run you page and you will notice that records with Status as "Active" have the Delete Icon Disabled and Status as "In-Active" have the Delete Icon Enabled.
9. Test run you page and you will notice that records with Status as "Active" have the Delete Icon Disabled and Status as "In-Active" have the Delete Icon Enabled.
OAF Error: The search cannot be executed because the table has pending changes that would be lost.
If you are getting the above error message while trying to Query a Region in OAF. Add the below simple code in the Controller of the Region/Page after you call the AMMethod.
OAF Error Message:
"The search cannot be executed because the table has pending changes that would be lost"
OAAdvancedTableBean table = (OAAdvancedTableBean) webBean.findChildRecursive ("CustomersAdvTable");
// When handling a user initiated search, we always need to execute
// the query so we pass "false" to queryData().
table.queryData(pageContext, false);
Check the below screenshot to check how I used the above code.
http://jneelmani.blogspot.com/2009/11/oaf-search-cannot-be-executed-because.html
Monday, May 28, 2012
How to create a Result Type in a Notification
To display a new Result Type in the notification we need to create a new Lookup Type in the workflow builder and Lookup Codes that you want to display in the notifications.
Steps to Create a New Lookup Type and Assign it to a Notification
1. Right Click on Lookup Types -- Select New
4. Enter the following Properties for the New Lookup Code and Click Apply and OK
Steps to Create a New Lookup Type and Assign it to a Notification
1. Right Click on Lookup Types -- Select New
2.
New Lookup Type will be displayed under the Lookup Types
3.
Right Click on the New BPA Approval Lookup that we created and Select “New
Lookup Code”
4. Enter the following Properties for the New Lookup Code and Click Apply and OK
5.
Create a new Lookup Code for “Reject” similarly as did for “Approve”
6.
To be able to see these Lookup Codes as buttons in the Approval Notification, Create
a New Message with the Result Type as BPA Approval Lookup
7. Create a new Message and in the Result Tab, Enter the following Properties as shown below.
7. Create a new Message and in the Result Tab, Enter the following Properties as shown below.
8.
Click Apply and OK.
9.
Now assign this Message and Result Type to the Notification where you want to
have this Results Displayed as Buttons inside the Notification
10.
Include this Notification in your Process and when Run, you would be able to
see the selected Resulted type of Buttons in the Notification
Subscribe to:
Posts (Atom)