Wednesday, January 20, 2016

API to delete value set values



Use the following api to delete unwanted/unusable value set values

 fnd_flex_values_pkg.delete_row (<<flex_Value_id>>);

Flex value id can be select using the following select statement:

Select a.flex_value_id
From FND_FLEX_VALUES_VL a
  ,fnd_flex_value_sets b
Where a.FLEX_VALUE_SET_ID = b.FLEX_VALUE_SET_ID
And b.FLEX_VALUE_SET_NAME = 'XXPM_VALUE_SETNAME'


Don't use this for deleting application seeded value set values. Above solution can only be used for custom value sets.

Friday, January 1, 2016

PLS-00302: component 'PURGE_BUSINESS_EXCEPTIONS' must be declared


When I run concurrent program "Purge Diagnostic and Log Messages", following error occurs:
Purge Diagnostic and Log Messages

ORACLE error 6550 in FDPSTP
Cause: FDPSTP failed due to ORA-06550: line 1, column 20: 
PLS-00302: component 'PURGE_BUSINESS_EXCEPTIONS' must be declared 
ORA-06550: line 1, column 7: 
PL/SQL: Statement ignored 

To overcome the above error "Purge Logs and Closed System Alerts " should be run instead of "Purge Debug Log and System Alerts" in Release 12.2

You can disable concurrent request program  "Purge Debug Log and System Alerts" 

Thursday, December 31, 2015

How to caught Invalid Month Exceptiion


Declare
               l_invalid_month exception;
               pragma exception_init( l_invalid_month, -1843 );
               l_date_chr Varchar2(30);
               l_trx_date  Date;
             Begin
               l_trx_date := to_date(l_date_chr,'MM/DD/RRRR');
             Exception
               When l_Invalid_month Then
                    l_trx_date := to_date(l_date_chr,'DD/MM/RRRR');
             End;

Create an exception variable and use exception_init pragma to associate the oracle error code.

Thursday, December 17, 2015

Generate Table and Indexes DDL using with dbms_metadata



Generate DDL with dbms_metadata

conn user/password

set pagesize 0
set long 90000
set feedback off
set echo off 

Spool ddl.sql

SELECT DBMS_METADATA.GET_DDL('TABLE',ut.table_name)
     FROM USER_TABLES ut;
SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name)
     FROM USER_INDEXES u;

Spool off

or you can use dual table for generating DDL

set heading off;
set echo off;
set long 90000;
 
spool ddl.sql
 
select dbms_metadata.get_ddl('TABLE','YOUR TABLE NAME','YOUR TABLE OWNER NAME') from dual;
 
select dbms_metadata.get_ddl('INDEX','YOUR INDEX NAME','YOUR TABLE OWNER NAME') from dual;
 
spool off;


Friday, December 11, 2015

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded (bsu.sh)

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded message appears while applying patch 11781879_103604 on R12.2 

$bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=VKXF -prod_dir=$FMW_Home/wlserver_10.3


Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
            at java.util.HashMap.createEntry(HashMap.java:869)
            at java.util.HashMap.addEntry(HashMap.java:856)
            at java.util.HashMap.put(HashMap.java:484)
            at com.bea.cie.common.dao.xbean.XBeanDataHandler.loadPropertyMap(XBeanDataHandler.java:778)
            at com.bea.cie.common.dao.xbean.XBeanDataHandler.(XBeanDataHandler.java:99)
            at com.bea.cie.common.dao.xbean.XBeanDataHandler.createDataHandler(XBeanDataHandler.java:559)
            at com.bea.cie.common.dao.xbean.XBeanDataHandler.getComplexValue(XBeanDataHandler.java:455)
            at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:442)
            at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:464)
            at com.bea.plateng.patch.dao.cat.PatchCatalog.getPatchDependencies(PatchCatalog.java:56)
            at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1621)
            at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
            at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
            at com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)

            at com.bea.plateng.patch.Patch.main(Patch.java:281)

Solution for Linux:

1. Source EBS R12.2 environment
2. Change directory to $FMW_HOME/utils/bsu
3. Backup the existing copy of bsu.sh to bsu.sh_backup
4. Open the bsu.sh using vi editor 
    Change the line MEM_ARGS="-Xms256m -Xmx512m"
    to
    MEM_ARGS="-Xms512m -Xmx1024m -XX:+UseParallelGC"
5. Save the file
6. Run the patch installtion again.