0% found this document useful (0 votes)
86 views5 pages

R12

This patch delivers scripts to fix incorrect balancing segment values in distribution accounts due to an accounting error. It provides instructions to download and apply the patch, run scripts to identify affected records and mark them for fixing, update a driver table, run a fix script to correct the records, and verify the fix was successful by checking the driver table and logs. The scripts fix identified transactions by updating balancing segment values, code combinations, or concatenated accounts in distribution accounts.

Uploaded by

Hammer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views5 pages

R12

This patch delivers scripts to fix incorrect balancing segment values in distribution accounts due to an accounting error. It provides instructions to download and apply the patch, run scripts to identify affected records and mark them for fixing, update a driver table, run a fix script to correct the records, and verify the fix was successful by checking the driver table and logs. The scripts fix identified transactions by updating balancing segment values, code combinations, or concatenated accounts in distribution accounts.

Uploaded by

Hammer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

R12: Generic DataFix (GDF) - Update The Balancing Segment Values In The Distribution

Account When Incorrect (Accounting Error 95311) (Doc ID 1272440.1)

1. Kindly follow the instructions given below to apply the data fix patch.

AP.A Customers:

Download and apply Patch 21087115:R12.AP.A for R12.0.x

AP.B Customers:

Download and apply Patch 21087115:R12.AP.B for R12.1.x

NOTE: The instance does not need to be brought down to apply the data-fix patch and
can be applied in hotpatch mode (e.g. adpatch option=hotpatch). Additionally, the scripts
can be manually run anytime after the patch is applied, if needed.

AP.C Customers: NOTE: AP.C patches are online patching enabled, so follow
below instructions carefully:

Download the Patch 21087115:R12.AP.C and apply patch as HOT PATCH.

a. download and unzip the patch


b. Connect to the RUN edition environment.
c. Execute the patch through HOTPATCH phase
adop phase=APPLY patches=<patchnumber> hotpatch=yes
After successful patch application, go to RUN EDITION and check
Following files exists with correct versions or not.

$AP_TOP/patch/115/sql/ap_wrong_bal_segment_sel.sql

$AP_TOP/patch/115/sql/ap_wrong_bal_segment_fix.sql

These 2 scripts should be executed from RUN EDITION

NOTE : If customer instance has any active patch edition (i.e. PREPARE phase is done but
CUTOVER is pending), Then they can not apply this patch as HOTPATCH until cutover is
done.
In case of super emergency and customer cannot wait till CUTOVER to Apply this
patch, then refer to Note 1582525.1

But Oracle recommends applying the patch through HOTPATCH phase.

The patch delivers 2 scripts and the latest data-fix framework package code:
File Name Purpose
ap_wrong_bal_segment_sel.sql Select script used to find and report the problem data.
ap_wrong_bal_segment_fix.sql Fix script used to fix the problem data.
apgdfalb.pls, Source Code of the latest data-fix framework server-side API
apgdfals.pls - package AP_ACCTG_DATA_FIX_PKG. This package
provides procedures and functions used by the GDF e.g.
backing up the data,displaying the data, etc.
IMPORTANT: Make sure
package AP_ACCTG_DATA_FIX_PKG (both
SPECIFICATION and BODY) is VALID before running the
scripts.

2. Run the selection script ap_wrong_bal_segment_sel.sql manually in APPS Schema via


SQL*Plus session.
Example:
sqlplus [apps_user]/[apps_password]@[instance]
@$AP_TOP/patch/115/sql/ap_wrong_bal_segment_sel.sql

Parameters:

Start_Date (Mandatory) [DATE] (DD/MM/YYYY): 01/10/2022

End_Date (Mandatory) [DATE] (DD/MM/YYYY): 10/01/2023

P_Org_ID (Optional) [STRING] :


==========================================================
The script can be run for specific Operating Unit (OU) or all orgs depending on user choice.

P_Email_Id (Optional) [STRING] :


==========================================================
If user wants to receive the logs generated by this script, on their email id.

EMAIL FEATURE
This is an optional feature provided to Customers. After execution of GDF selection and fix
scripts, output files will be emailed to the user.
For more information on this feature, please refer to Metalink Note: 1582550.1. To make use
of this feature, pass valid email_id at the
time of script execution. This feature can be ignored by not passing any email_id at the time
of script execution.

Note: Due to technical/security issues if email is not delivered, then customers are advised to
run the scripts by not passing email_id at the
time of script execution. This will not impact actual behavior of datafix.

3. After running the script ap_wrong_bal_segment_sel.sql check the following to verify the
problem transaction(s) were picked up:
1. Driver table AP_TEMP_DATA_DRIVER_9978924
2. Log file 9978924-diag-<HH24:MI:SS>.html which shows affected records.
Run this select to find the location of the log files:
SELECT decode(instr(value,','),0,value, SUBSTR (value,1,instr(value,',') - 1)) FROM
V$Parameter WHERE name = 'utl_file_dir' ;

NOTE: If the transaction(s) in question is not found, it is possible the transaction(s) do not
meet the conditions of the select script. Please provide the Log files to BSA to update in
Oracle SR. Do not proceed to next steps if no transactions are found.

4. Use the following SQL statement (or similar one) to update the process_flag
and NEW_BALANCING_SEG_VALUE or NEW_CODE_COMBID or NEW_CONCAT_ACCOUNT of the
driver table AP_TEMP_DATA_DRIVER_9978924 for the transactions(s) that should be fixed.
1. Update the driver table AP_TEMP_DATA_DRIVER_9978924 with either the required
NEW_BALANCING_SEG_VALUE or NEW_CODE_COMBID or NEW_CONCAT_ACCOUNT
before proceeding with the fix.

If NEW_CONCAT_ACCOUNT account is updated then it should be done with account segment


delimiter as "-". Later on, the fix would replace it with actual segment delimiter defined in
system and derive the CCID for the concatenated account. There should not be any delimiter
for the values of NEW_BALANCING_SEG_VALUE or NEW_CODE_COMBID, if provided.

ONLY ONE OF THE GIVEN COLUMNS SHOULD BE UPDATED.

b. Update process_flag in AP_TEMP_DATA_DRIVER_9978924 to Y for any invoice that should


be corrected.
If a single single transaction was detected, then run:
UDATE AP_TEMP_DATA_DRIVER_9088967 DRV
SET DRV.process_flag = 'Y', DRV.NEW_CODE_COMBID = '&CCID'
WHERE ( DRV.invoice_ID ) = '&P_invoice_ID' ;

COMMIT ;
However, if multiple transactions were detected, then run:
UDATE AP_TEMP_DATA_DRIVER_9088967 DRV
SET DRV.process_flag = 'Y', DRV.NEW_CODE_COMBID = '&CCID'
WHERE ( DRV.invoice_ID ) IN ( ##### , #####, ..., ##### ) ;

-- Note: ##### , #####, ..., ##### represents the list of Invoice_IDs to update.

COMMIT ;

5. Manually run the script ap_wrong_bal_segment_fix.sql to fix the identified (and marked
to fix) transactions.
Example:
sqlplus [apps_user]/[apps_password]@[instance]
@$AP_TOP/patch/115/sql/ap_wrong_bal_segment_fix.sql
The script will prompt user for below inputs.
P_User_Name (Mandatory) [STRING] : KRISHNA.TUMMALA
==========================================================
===============================================
Provide Application User Name in upper case.
This value should be of an application user who has access to invoice/payment and can run
accounting for invoice/payment.
For Example: CBROWN
The user id of this user will be updated in column LAST_UPDATED_BY, and SYSDATE will be
updated in LAST_UPDATE_DATE to keep audit trail.

P_Resp_Name (Mandatory) [STRING] : Payables Manager


==================================================
A Valid responsibility name assign to the user. This is case-sensitive.
This should be responsibility name through which application user can access Invoice/Payment
for accounting.
For Example: Payables Manager

Note: Make sure you are using a responsibility name and user name for a Payables
responsibility and associated user that has access to run accounting for the subject transaction.
P_Email_Id (Optional) [STRING] :
==================================================
If user wants to receive the generated logs on their email id.

6. After running script ap_wrong_bal_segment_fix.sql, check the following to verify the fix
was successful and no errors or failures occurred:
1. The user entered values in driver table AP_TEMP_DATA_DRIVER_9978924
for NEW_BALANCING_SEG_VALUE or NEW_CODE_COMBID or
NEW_CONCAT_ACCOUNT would be validated to confirm they are valid and accordingly
the VALIDATE_FLAG in the table shall be updated.

The valid values of validate_flag are as following:


N Not validated
R Sanity test rejected
T Sanity tested
I Invalid user input
V Validated
b. The Driver table AP_TEMP_DATA_DRIVER_9088967 should now have process_flag set to P
for the records that were processed and fixed OK. If a record was not fixed, it would have
another value. The records that would be successfully fixed by the scripts would have
PROCESS_FLAG in AP_TEMP_DATA_DRIVER_9978924 as 'P' and those in error would have 'E'.

P Record was processed/fixed successfully.


D Record was set for Undo Accounting but not fixed. This is an interim value.
E Record could not be processed due to unexpected error.
N Record that was not processed.
Possible Values of Process_Flag column
c. The log file 9978924-fix-<HH24:MI:SS>.html should NOT show any ORA or unexpected error
messages. Refer to step 3.b. to find the log files location.
7. If there were NO visible errors in the Fix log file re run Create accounting process from
concurrent request or from Invoice workbench
1. Log into Oracle Applications using a Payables Responsibility
2. Open the Invoice Workbench screen
(N)Invoice > Entry > Invoices
3. Query the invoice(s) corrected by this GDF. Go to Distributions and confirm that the
correct account is now populated.
4. Then, Account the invoice using the [Action] button.
OR
1. Log into Oracle Applications using a Payables Responsibility
2. Go to Other > Requests > Run
3. Submit the Create Accounting program and check if invoice is accounted.

8. If you encounter any issue or the results are not the expected, please submit a new Service
Request (SR) with Oracle support and supply the following:
1. Data-Fix scripts log files:
9978924-diag-<HH24:MI:SS>.html
9978924-fix-<HH24:MI:SS>.html
2. Data dump (SELECT * FROM) of the driver and backup tables created by the data-fix
scripts:
AP_TEMP_DATA_DRIVER_9978924
AP_INV_DISTS_9978924_BKP
AP_INV_LINES_9978924_BKP
AP_SA_TAX_DIST_9978924_BKP
ZX_RNREC_DIST_9978924_BKP
3. For the problem Invoice or a sample (2 to 3) of problem Invoices not fixed, run and
upload fresh analyzers:
o "EBS Payables Invoice and EBTax Analyzer".
o "R12: AP: Master GDF Diagnostic (MGD) Analyzer To Validate Data Related To
Invoices, Payments, Accounting, Suppliers And EBTax".

You might also like