Jan 2, 2020

Journal entry cannot be reversed as its not transferred to GL (Error in xla_DataFixes_Pub.Reverse_Journal_entries)

When working with Accounts Payable Trial Balance Report (ATBR) and you're getting the error while reversing the journal though Online Accounting then follow the below steps,

Error:

Journal entry cannot be reversed as its not transferred to General Ledger.
"-: XLA-95103: An internal error occurred. Please inform your system administrator or support representative that:

An internal error has occurred in the program xla.plsql.xla_datafixes_pub.reverse_journal_entries. Journal entry cannot be reversed as its not transferred to General Ledger.."

l_Return_Status = U

Undo_Accounting : Error in xla_DataFixes_Pub.Reverse_Journal_entries
:FND?FND_AS_UNEXPECTED_ERROR?N?PKG_NAME?xla.plsql.xla_datafixes_pub?N?PROCEDURE_NAME?reverse_journal_entries?N?ERROR_TEXT?ORA-20001: -: XLA-95103: An internal error occurred. Please inform your system administrator or support representative 

Step 1 : Check the current version of the file xlajedfp.pkb using the below string

strings -a $XLA_TOP/patch/115/sql/xlajedfp.pkb |grep '$Header'

(Login to APP Tier and execute the command under the Application Manager Access)

If it is less then the header version /* $Header: xlajedfp.pkb 120.14.12020000.11 2015/01/19 07:07:32 tasrivas ship $ */ then 

Step 2: kindly apply the below patch based on the EBS version 

For R12.1.x: xlajedfp.pkb 120.1.12010000.25
For R12.2.x: xlajedfp.pkb 120.14.12020000.11

Note: Before applying the patch kindly verify the patch is applied or not in your database using the query,

select ad_patch.is_patch_applied('R12',-1,19793092) from dual; 
NOT_APPLIED

Step 3: After Patch applied, re-confirm the header string and make sure its matches with updated one,

strings -a $XLA_TOP/patch/115/sql/xlajedfp.pkb |grep '$Header'

After patch applied, the patch verification will return the code EXPLICIT

select ad_patch.is_patch_applied('R12',-1,19793092) from dual; 
EXPLICIT


Dec 26, 2019

Oracle SQL-PLAN based on SQL query

To generate the cost for the query based on single table or a group of table pls follow the below syntax in TOAD / SQL Developer,

Step 1:

EXPLAIN PLAN FOR
select * from ap_suppliers;

Result =>
Explained.

Step 2:

select plan_table_output from table(dbms_xplan.display('plan_table',null,'basic'));

 Result =>
------------------------------------------
| Id  | Operation         | Name         |
------------------------------------------
|   0 | SELECT STATEMENT  |              |
|   1 |  TABLE ACCESS FULL| AP_SUPPLIERS |
------------------------------------------

Step 3:

select plan_table_output from table(dbms_xplan.display_cursor(null,null,'basic'));

 Result =>

EXPLAINED SQL STATEMENT:
------------------------
select plan_table_output from table(dbms_xplan.display('plan_table',null
,'basic'))

Plan hash value: 2137789089

-----------------------------------------------------
| Id  | Operation                         | Name    |
-----------------------------------------------------
|   0 | SELECT STATEMENT                  |         |
|   1 |  COLLECTION ITERATOR PICKLER FETCH| DISPLAY |
-----------------------------------------------------

Nov 26, 2019

How to Find the exact Error line in SQL Scripts using DBMS_UTILITY.FORMAT_ERROR_BACKTRACE

If you encounter any error in SQL file and many of the times the error console never display the correct line number where the actual error exist. Instead it will display the wrong lines and which will re-route us in somewhere !!!

To avoid this we have an standard API DBMS_UTILITY.FORMAT_ERROR_BACKTRACE and this show the correct line number where our real issue exist !

Sample Script:

DECLARE

err_code NUMBER;
err_msg  VARCHAR2(240);

BEGIN

{
...
.....
Logic of the Program
...
.....
}

EXCEPTION
     WHEN OTHERS THEN

      ROLLBACK;

err_code := SQLCODE;
err_msg  := SQLERRM;

FND_FILE.PUT_LINE(fnd_file.LOG,err_code||'->'||err_msg);
FND_FILE.PUT_LINE(fnd_file.LOG,DBMS_UTILITY.FORMAT_ERROR_STACK);
FND_FILE.PUT_LINE(fnd_file.LOG,DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);

END;
/

Note: If your SQL scripts contains commented lines like /* */ or -- or REM then kindly ignore those lines and start your count from actual SQL script starts

Ex: SQL Code 

REM Script Name
-- Development Script version 1.0
/* 
Comments 1
Comments 2
*/

Declare

Line 1
Line 2

BEGIN

Line 3
Line 4

Exception 
When Others then 

Line 5

END;

Total Lines:  23 but actual script contains only 16

Kindly Ignore the comment lines (i.e) first 6 lines and then consider the remaining lines for the error findings


Oct 31, 2019

Oracle Branding Logo Change


Oracle Branding Logo Change



Step 1 : Place the XXX.Png file under $OA_MEDIA directory in App Tier.
Step 2 : Query the Profile & Change the value . 
              System Administrator > Profile - System.
              Query profile "Corporate Branding Image for Oracle Applications"
              Change the SITE level value to the name of the custom image file { XX_CUSTOM_LOGO.jpg }
Step 3 :  Clear the Cache From Functional Administrator.



Oct 17, 2019

TOAD TNS Entry Issue

TOAD for Oracle 9 or TOAD 10 – 64-bit Windows – ORA-12154: could not resolve the connect identifier specified or ORA-6413: connection not open

I recently downloaded the new 10.x version of TOAD and could not connect to my databases. Still running TOAD 9.x, no problem. This really threw me off for a minute, so I thought I would share the resolution.
You are likely running a 64-bit Windows OS and have installed TOAD into C:\Program Files (x86)\....
I simply copied over my entire Quest Software directory from C:\Program Files (x86)\... to C:\Program Files\..., and restarted the TOAD.exe. Everything is working great, without having to reinstall anything.

Sep 26, 2019

OAF Attachment Page with AK Entity

To display the content of attachments in OAF, we need to follow the below approach in JDevloper as well in EBS Application

Step 1: Create the AK Entity for the attachment section and map it to the right database table with Primary column

Responsibility: AK Html Forms
Navigation: AK Entities





Step 2: Under the Page development in JDevloper, create the region and attachment item with type 'attachmentLink'

Create a Region with 'defaultSingleColumn' and create a sub-item with type 'attachmentLink' and map the correct VO in the View Instance. Add the attachment Prompt and Link Text for user convenience.




Step 3: Create the Primary Key and Category Map under the entity map section for attaching the item with AK entities.


Step 4: Tag the correct Primary Key column in the View Attribute column for linking the content with FND_ATTACHED_DOCUMENTS table.

Note: All the uploaded content will be stored in FND ATTACHED DOCUMENTS table with the mapped primary column crId.

 Category is mentioned as MISC (Miscellaneous) under the categoryMap for the uploaded content.















Step 5: Validate the OAF page and result will be displayed like below for the Attachment Section,


















Page Controller to capture the raised attachment events,

    if ("oaAddAttachment".equals(pageContext.getParameter(EVENT_PARAM)) ||
     "oaUpdateAttachment".equals(pageContext.getParameter(EVENT_PARAM)) ||
     "oaDeleteAttachment".equals(pageContext.getParameter(EVENT_PARAM)) ||
     "oaViewAttachment".equals(pageContext.getParameter(EVENT_PARAM)) )

{

System.out.println("Attachment Event Raised");
     
}

Useful Workflow Commands

  WFLOAD apps/columbus789 0 Y DOWNLOAD APEXP_FINDEV.wft APEXP Locations: $PO_TOP/patch/115/import/US/porpocha.wft $PO_TOP/patch/115/import/U...