← Back to Cases
IBY Credit Card Missing Address ID
Case Number00081079
Oracle ModuleOracle Payments (IBY) / Accounts Payable (AP)
EBS VersionR12 (12.1.3)
Functional AreaCredit Card / IBY_CREDITCARD / Party Address
Related PatchesNone

Symptoms

Root Cause

Active credit card instrument records in IBY_CREDITCARD were created or migrated without populating the ADDRESSID column. The correct billing address reference should be the PARTY_SITE_USE_ID from HZ_PARTY_SITE_USES for the card owner's active BILL_TO site. A data migration, import, or program error left this column NULL for a subset of active credit cards.

Resolution

Step 1 – Create backup and error tables

Run data_fix.sql. The script creates:

Step 2 – Populate ADDRESSID from TCA party site

The script iterates through active credit cards with a NULL address_id (limited to a configurable batch size). For each card, it updates IBY_CREDITCARD.ADDRESSID by looking up the PARTY_SITE_USE_ID for the card owner's active BILL_TO site from HZ_PARTY_SITE_USES, HZ_PARTY_SITES, HZ_LOCATIONS, and HZ_PARTIES.

Step 3 – Handle TOO_MANY_ROWS errors

If a card owner has more than one active BILL_TO address, the update raises a TOO_MANY_ROWS exception. These records are logged to the error table with an appropriate message. They must be manually resolved by selecting the correct BILL_TO address for the credit card.

Step 4 – Commit and validate

The script commits after each successfully processed card. After completion, it prints a summary of successful and failed records and queries the error table. Review the error table and manually correct any remaining records with multiple BILL_TO addresses.

Note: The script processes credit cards in batches (configurable row limit). Cards with multiple BILL_TO party site uses require manual review and are logged to the error table. The script stamps updated records with last_updated_by = -9999 for audit identification.

Script Inventory

FileDescription
data_fix.sqlPL/SQL script to populate missing ADDRESSID on IBY_CREDITCARD by joining to HZ_PARTY_SITE_USES for the card owner's BILL_TO site. Creates backup and error tables. Handles TOO_MANY_ROWS for cards with multiple billing addresses. Produces spooled output with success/failure counts.

Key Tables Affected

TableAction
IBY_CREDITCARDUpdate ADDRESSID from HZ_PARTY_SITE_USES for card owner's BILL_TO site
HZ_PARTY_SITE_USESRead only — source for PARTY_SITE_USE_ID lookup
HZ_PARTY_SITESRead only — party site join
HZ_PARTIESRead only — party join for card owner