Thursday, June 25, 2015

FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-01403

R12 TRYING TO ENTER INVOICE: FRM-40735: ON-COMMIT TRIGGER AND ORA-01403 ERROR - was logged for this issue and it was determined to be an issue due to the existence of duplicate payees.
Patch 10140168 was released for this but was obsoleted and replaced with GDF patch 13857555 which delivers a select and fix scripts for this issue.

Solution


1. Download and review the readme and pre-requisites for the following patch:
For R12.0.x: Patch 13857555:R12.IBY.A: RCA: ISSUES WITH DUPLICATE PAYEE DELETION GDF: 10140168
For R12.1.x: Patch 13857555:R12.IBY.B: RCA: ISSUES WITH DUPLICATE PAYEE DELETION GDF: 10140168
2. Ensure that you have taken a backup of your system before applying the recommended patch.
3. Apply the patch in a test environment.
This patch does not fix any data it just delivers the data fix scripts.
For R12.0.x:
iby_dup_payee_fix.sql 120.0.12000000.5
iby_dup_payee_sel.sql 120.0.12000000.6

For R12.1.x:
iby_dup_payee_fix.sql 120.0.12010000.3
iby_dup_payee_sel.sql 120.0.12010000.2
You can use the commands like the following:
        strings -a $XX_TOP/filename |grep '$Header'
4. Run $IBY_TOP/patch/115/sql/iby_dup_payee_sel.sql

This is a select script and does not update any data, just shows/confirms the extent of the corruption in the html output file.
5. Run $IBY_TOP/patch/115/sql/iby_dup_payee_fix.sql
This is the actual data fix script that will correct the corruption and allow the invoice to be entered.

Tuesday, June 23, 2015

Inter-Organization and Internal Sales Order Receipts

1.  What is the order of defaulting of the Receipt Routing on the receipts screen which may be set at various levels?

For Inter-Org Shipments (In-Transit Receipts) the Receipt Routing is defaulted as follows:
1. Item Attribute
2. if 1 is null, then Shipping Network for the Receiving Organization
3. if 2 is null, then Receiving Option

2.  What are the different types of Inter-Organization Transfers?

Inter-Organization transfers can be performed as either direct or intransit shipments.
Direct inter-organization transfers:
Inventory is moved directly from a shipping organization to the destination organization. Receipt is not required to be made as the transfer is direct to inventory
Intransit inventory:
Usually done when transfer time is significant. Delivery location isn't specified during transfer transaction, You only need to enter subinventory you are shipping from, a shipment number, the freight information and inter-organization transfer charge. Then you need to perform Receipt from the Receiving forms. 

3. What are the minimum setups required for Items which we use for Internal Sales Order?

The items which we use for Internal Sales Order must be Inventory enabled, internally orderable and stockable, shippable, and Order Management transactable for the source organizations. Under Inventory, you need to select the Inventory Item, Transactable, and Stockable options. Under Order Management, you need to select the Internal Ordered, Internal Orders Enabled, OE Transactable, and Shippable options.

4. How do we define the Inter-Organization Shipping Network?

Use the Shipping Networks window to define your inter–organization network. You must enable the network between each source (shipping) and destination (receiving) organization.
-Select Internal Order Required if you want all transfers between these two organizations to use internal orders.
-Specify whether you ship material directly, or use intransit inventory for shipments between these two organizations.
-For intransit transfers, you can choose from the following primary receipt routings: Standard receipt, Inspection required, or Direct delivery.

5. What are the steps to perform Inter-Organization Transfer?

 Follow these 3 simple steps:

1. Setup Shipping Network: This information describes the relationships and accounting information that exists between a from (shipping) organization and a to (distribution) organization.
Navigation path:
A. Choose the Inventory Manager responsibility.
B. Setup/Organizations - Make sure that there is an entry for from/to organization (between the organizations you intend to perform the transfer). When you click on this form, you will get a LOV with orgs.
-Choose the From Org.
-Transfer Type can be either Intransit or Direct (Direct would ship directly to Inventory, so it would be a Direct Delivery).
-FOB can be either Receipt or Shipment, if the transfer type is entered as Intransit.
If Receipt the source inventory quantities get updated at time of receipt.
If it be Shipping, then the quantities get updated as soon as the shipment is done.

2. Inventory/Transactions/Interorganization Transfer: When you click on this form, you will get a LOV with orgs. Choose the from org. Specify the to-org, transfer type as intransit, and input a value for shipment-number.
Click on the transaction lines button. Input the item, the quantity and the subinventories between which you want to do the transfer. (Sometimes there might not be enough quantity in the from-org to do this. For this : Go to: Inventory/Transactions/Miscellaneous Transactions. Specify the Type as Miscellaneous Receipt. Click on transaction lines button and specify item/quantity).

3. Receive against an Inter-org Transfer: Choose Purchasing Super User responsibility.
Under Purchasing/Receiving/Receipts - Query up against Shipment Number in the find window. In RCV Transactions block, specify the quantity you want to receive and commit the transaction.

6. What are the steps required for receiving against Internal Sales Order?

 The process of receiving against Internal Sales Orders involves the following steps:

1. Create an Internally Orderable Item - To do this you need to create an Item and in the Order Entry attributes, check the Internally Orderable check box.

2. Setup Shipping Network: This information describes the relationships and accounting information that exists between a from (shipping) organization and a to (distribution) organization.
Navigation path:
A. Choose the Inventory Manager responsibility.
B. Setup/Organizations - Make sure that there is an entry for from/to organization (between the organizations you intend to perform the transfer e.g.. GLO -> SAC).
When you click on this form, you will get a LOV with orgs.
-Choose the From Org.
-Transfer Type can be either Intransit or Direct (Direct would ship directly to Inventory, so it would be a Direct Delivery).
-FOB can be either Receipt or Shipment, if the transfer type is entered as Intransit.
If Receipt the source inventory quantities get updated at time of receipt.
If it be Shipping, then the quantities get updated as soon as the shipment is done.

3. Create an Internal Requisition.
-Enter the item you created in step 1.
-Enter the Source and Destination Organization. Source Organization is on the right of the form and Destination to the left.
-Enter location (e.g.. SACHQ) and Source as Inventory.
-Save and approve requisition.

4. Run the Create Internal Orders concurrent program.

5. Change responsibility to Order Entry Superuser.

6. Run Order Import concurrent program.

7. When the process completes, you will see the Order Number in the log file.

8. If the process errors : "You must enter Tax Code. Tax code attribute is missing" then:
-Change responsibility to AR Manager (Receivables)
-Navigate Setup->Transaction->Transaction Types
-Query up record with Name = "Invoice Hdwe/svcs"
-Uncheck the Tax Calculation check box
-Save

9. Run the Demand Interface concurrent program.

10. Run the Manufacturing Release concurrent program.

11. Navigate to:
-Orders, Returns -> Orders, Returns -> Do a Find on the Order Number
-Click on the View button
-Click on Cycle Status
-Your Order should now be Pick Release Eligible

12. Navigate to Shipping -> Pick Release -> Release Sales Order
-Enter a Batch Name and your Order Number
-Save
-Note the Batch_ID by doing a Help->Tools->Examine.

13. Run the Pick Release concurrent program. Use Batch Name/Order Number as parameter. This can be run from command line as:
./OESREL apps_appdemo/fnd@comp16p 0 Y (from step L)

Perform Step K. Your Order should now be Ship Confirm Eligible

14. Navigate to Shipping->Confirm Shipments->Pick Slip
-Do a Find on the Order Number
-Click on Open
-Click on details
-Check if all values of quantity to be shipped are correct
-Save

15. Change Responsibility to Purchasing Super User.
Navigate to the Enter Receipts form and query on the Requisition Number.
You can now receive against the Internal Order.
To override the destination type at receipt time you need to set the profile option RCV: Allow routing override = Yes.

7. How are Lot and Serial Numbers handled in Inter-Organization Transfers?

 When you perform an inter–organization transfer, the source and destination organization may have different lot/serial controls. Purchasing handles this situation as follows:
1. When the source organization uses controls and the destination organization does not, the control numbers are recorded as being issued from the source organization. Lot/serial transactions are recorded for the destination organization.
2. When the source organization does not use controls and the destination organization does, the transaction is processed normally.
3. When both source and destination organizations use controls, the control numbers are recorded as being issued from the source organization. These control numbers are tracked to insure that the same control numbers that were shipped are the ones
that are received. When items are returned from inventory to receiving or to the supplier, only the control numbers originally recorded for the delivery transaction can be used.

8. What's the cause of the error RVTSH-150 and what's the solution for it?

 Error RVTSH-150 is because the following select is failing, returning 0 rows:
SQL> select ms.unit_of_measure
from mtl_supply ms
where supply_type_code = 'REQ'
and supply_source_id = :req_line_id;

The error is because the Req. Supply missing. This is mostly a data problem caused at customer site. Look into why the records are missing. May be the data has been manually changed or some cancellations for the req. shipment has taken place.
For data fix, reference Note: 267439.1

9. What are the main tables involved in Inter-Organization Transfer?

A check is carried out to see if the transaction date is in an open period as specified in the profile option (INV: Transaction Date Validation). The column is acct_period, the table is ORG_ACCT_PERIODS.
The organizations setting, cost information, etc, are derived from:
ORG_ORGANIZATION_DEFINITIONS, MTL_PARAMETERS, MFG_LOOKUPS, MTL_INTERORG_PARAMETERS
[HR_ORGANIZATION_INFORMATION - for rel 11I].
The transaction information is derived from MTL_TRX_TYPES_VIEW for inter-org transactions where transaction_source_type_id=13.
The item information is derived from MTL_SYSTEM_ITEMS [MTL_SYSTEM_ITEMS_B - for rel 11I].
A check is carried out to verify the available item quantity on MTL_DEMAND and
MTL_ONHAND_QUANTITIES [MTL_RESERVATIONS included in rel 11I].
MTL_SUBINVENTORIES_TRK_VAL_V keeps track of the values of the subinventories.
MTL_ITEM_LOCATIONS is searched for the locators specified (if used).
GL_CODE_COMBINATIONS is searched for a valid locator combination (if used).
The cost of the item is gotten from CST_CG_ITEM_COSTS_VIEW.
The transaction is inserted into MTL_MATERIAL_TRANSACTIONS_TEMP table.
If the item is under lot control, lot information is deleted from MTL_TRANSACTION_LOTS_TEMP, likewise the serial numbers information if the item is serialized is deleted from MTL_SERIAL_NUMBERS_TEMP, MTL_SERIAL_NUMBERS.
The new lot information is inserted into MTL_TRANSACTION_LOTS_TEMP.

10. How can we return or correct delivered lines in an Internal Requisition?

It is not possible to perform Returns or Corrections on Internal Shipments. Once the Internal Order is ship confirmed and interfaced to Inventory, the shipment is created in Receiving tables, and there is no way to back out or modify the shipments.

In order to return an internally ordered item the original process needs to be reversed. An internal requisition for the item has to be created in the source organization, and then that order has to be processed back to the source organization. This can be done as followed:

    Reverse the original process to return an internally ordered item.
    Create an internal requisition for the item in the source organization.
    Process the order back to the source organization.

Or as a second option, a miscellaneous receipt and miscellaneous issue may be completed, as a workaround.

Enhancement request Bug 2206351 has been logged to enhance the functionality to enter returns for internal shipments.
This is also true for Inter Organization Transfers entered on Inter-organization Transfer form INVTTMTX
For IOT shipments the only solution is to create a new inter org transaction from inventory org B to inventory org A if the initial IOT is from org A to org B

Also online help clearly indicates
Finding Returns
Use the Find Returns window to find source documents for which you can enter returns. Use the Supplier and Internal tabbed region to search for Purchasing documents. If Order Management is installed, use the Customer tabbed region to search for customer return material authorizations (RMAs).
Note: You cannot enter returns for internal shipments (that is, shipments with a Source Type of Internal).

11. What to do if the physical quantity received does not match quantity shipped?

Case 1: When physical qty received is more than qty shipped.
Example: Source org ships 80 pieces, but receiving org wants to receive only 100 pieces.

An intransit shipment cannot be over-received. Receive the entire qty shipped in the receiving org and create a new intransit shipment for the remaining qty shipping it from the source org.

Case 2: When physical qty received is less than qty shipped.
Example: Source org ships 100 pieces, but receiving org receives only 80 pieces.

Partial receipt of intransit shipment is allowed, but there is no way to cancel the remaining qty.  Hence, entire qty shipped should be received.  To adjust the on-hand quantity:

 o A reverse intransit shipment can be done for the excess qty from receiving org to source org.
    OR
 o A miscellaneous issue from the receiving org for the excess qty can be done.

If only a partial receipt is done, then the remaining qty will continue to show in intransit until its received.

Monday, June 22, 2015

What are the main tables involved in Inter-Organization Transfer?

 What are the main tables involved in Inter-Organization Transfer?

A check is carried out to see if the transaction date is in an open period as specified in the profile option (INV: Transaction Date Validation). The column is acct_period, the table is ORG_ACCT_PERIODS.
The organizations setting, cost information, etc, are derived from:
ORG_ORGANIZATION_DEFINITIONS, MTL_PARAMETERS, MFG_LOOKUPS, MTL_INTERORG_PARAMETERS
[HR_ORGANIZATION_INFORMATION - for rel 11I].
The transaction information is derived from MTL_TRX_TYPES_VIEW for inter-org transactions where transaction_source_type_id=13.
The item information is derived from MTL_SYSTEM_ITEMS [MTL_SYSTEM_ITEMS_B - for rel 11I].
A check is carried out to verify the available item quantity on MTL_DEMAND and
MTL_ONHAND_QUANTITIES [MTL_RESERVATIONS included in rel 11I].
MTL_SUBINVENTORIES_TRK_VAL_V keeps track of the values of the subinventories.
MTL_ITEM_LOCATIONS is searched for the locators specified (if used).
GL_CODE_COMBINATIONS is searched for a valid locator combination (if used).
The cost of the item is gotten from CST_CG_ITEM_COSTS_VIEW.
The transaction is inserted into MTL_MATERIAL_TRANSACTIONS_TEMP table.
If the item is under lot control, lot information is deleted from MTL_TRANSACTION_LOTS_TEMP, likewise the serial numbers information if the item is serialized is deleted from MTL_SERIAL_NUMBERS_TEMP, MTL_SERIAL_NUMBERS.
The new lot information is inserted into MTL_TRANSACTION_LOTS_TEMP.

Tuesday, June 9, 2015

Forms Personalizations Not Visible


Symptoms

 On 12.1.3:
The Forms Personalizations made on the Service Request Form are not visible.
The Personalizations are active and working, but it is not possible to see them and maintain the Personalizations.

Steps:
- Open Service Request form
- Help - Diagnostics - Custom Code - Personalize


Cause

In new versions of the Personalizations form FNDCUSTM.fmb, there is a new field called Key.
The personalizations form (FNDCUSTM.fmb) now has two modes. When the form is displayed, the 'FND: Enable Industry Editing' profile value is checked. If the profile is set to Yes, only personalizations that have a value for the KEY column will be displayed. If the profile is set to No or not set at all, only personalizations that have a null value for the KEY column will be displayed.


Solution

When creating Forms Personalizations, make sure the profile option
'FND: Enable Industry Editing'
is set to No or Null

Friday, June 5, 2015

Concurrent Program "Serial Number Generation" Completes With Warning Or Error


Symptoms

Concurrent program "Serial number generation" completes with Warning.
Run for quantity 100, but only 9 serials are generated.
Run again for qty 100, request complete with error.
No serials are generated.


Cause

Serial generation have starting number 1.

Starting number also control number of digits allowed for serial.
Starting number 1 means that only one digit is allowed for serial , 1 to 9.

Solution

To implement the solution, please execute the following steps:

1. Go into the responsibility: Inventory

2. Navigate to Items>Organization item

3. In tab Inventory change starting number.
Fill out with '0' to control number of digits that is allowed for the serial number.
Par example starting number 0001, will generate serials up to 9999.

4. Retest the issue.

5. Migrate the solution as appropriate to other environments.

serial number query

1. Determine the status of the serial number that you are attempting to use:

SELECT segment1 "ITEM", msn.serial_number, ml.meaning
FROM mtl_serial_numbers MSN,
           mtl_system_items_b MSIB,
           mfg_lookups ml
WHERE msn.inventory_item_id = msib.inventory_item_id
AND ml.lookup_code = msn.current_status
AND ml.lookup_type = 'SERIAL_NUM_STATUS'
AND msib.segment1 = '&your_item'
AND msn.serial_number ='&your_serial_number';

2.  If the status is 'Issued Out Of Stores', the serial number is used in some organization.  You will need another serial number for your transaction

Wednesday, June 3, 2015

Monitoring Open and Cached Cursors

To monitor open cursors, query v$sesstat where name='opened cursors current'. This will give the number of currently opened cursors, by session:


--total cursors open, by session
select a.value, s.username, s.sid, s.serial#
from v$sesstat a, v$statname b, v$session s
where a.statistic# = b.statistic#  and s.sid=a.sid
and b.name = 'opened cursors current';

If you're running several N-tiered applications with multiple webservers, you may find it useful to monitor open cursors by username and machine:
--total cursors open, by username & machine
select sum(a.value) total_cur, avg(a.value) avg_cur, max(a.value) max_cur, 
s.username, s.machine
from v$sesstat a, v$statname b, v$session s 
where a.statistic# = b.statistic#  and s.sid=a.sid
and b.name = 'opened cursors current' 
group by s.username, s.machine
order by 1 desc;

Tuesday, June 2, 2015

How to give access to OLM Administrator page

Provide  ‘Learning Management Administrator’ responsibility to a user account including access to ‘Learning Administrator’ role to user account

Projects Publish WorkPlan Tables

The following SQLs identified the invalid / incorrect data:
 a) select * from pa_projects_all where project_id=;
 b) select * from pa_tasks where project_id=;
 c) select * from pa_proj_elements where project_id=;
 d) select * from pa_proj_elem_ver_structure where project_id=;
 e) select * from pa_proj_element_versions where project_id=;
 f) select * from pa_proj_workplan_attr where project_id=;
 g) select * from pa_proj_structure_types where proj_element_id in (select
 proj_element_id from
  pa_proj_elements where project_id = );
 h)select * from pa_object_relationships where object_id_from1 in (
  select element_version_id from pa_proj_element_versions where project_id =
 ) or object_id_to1 in (
  select element_version_id from pa_proj_element_versions where project_id =
 );
 i) select * from pa_budget_versions where project_id=;
 j)select * from dba_source where (substr(name,1,3)='PA_' or name like 'PJI%')
 and type in ('PACKAGE','PACKAGE BODY') and line=2;


a) select * from pa_projects_all where project_id=;
b) select * from pa_tasks where project_id=;
c) select * from pa_proj_elements where project_id=;
d) select * from pa_proj_elem_ver_structure where project_id=;
e) select * from pa_proj_element_versions where project_id=;

NOTE:  The project id of the project can be found from the following SQL query:
  SELECT project_id
  FROM   pa_projects_all
  WHERE  segment1='';