EGO Setup Default Organization for User Program Ends With ORA-01422 Error (Doc ID 1086410.1)

Last updated on APRIL 28, 2016

Applies to:

Oracle Product Hub - Version 11.5.10.2 and later
Information in this document applies to any platform.
EGOPRTYSTUP


Symptoms

The program 'EGO Setup Default Organization for User' (EGOPRTYSTUP) ends with the below error message. This occurs when multiple records corresponding to the default enterprise organization are present in HZ_PARTIES. Have two records for this organization in the TCA, one active and one inactive.
It looks like this organization is created as part of the upgrade - the creation date on the two records corresponds to upgrade dates (R10 -> R11 and R11 -> R12).

Error
EXCEPTION in getting default enterprise with error
ORA-01422: exact fetch returns more than requested number of rows

Steps
See that there are more than one records returned from the following query:

SELECT hp.party_id
INTO l_org_id
FROM hz_parties hp, hz_code_assignments hca
WHERE hca.owner_table_id = hp.party_id
AND hca.owner_table_name = 'HZ_PARTIES'
AND hca.class_category = 'POS_PARTICIPANT_TYPE'
AND hca.class_code = 'ENTERPRISE'


Log in as a user that has access to the Development Manager responsibility.
Switch to development manager.
Run EGO Setup Default Organization for Use concurrent program.
The program ends in error.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms