Thursday, February 28, 2013

Payment Process Request cannot continue the print process

Check this site

Check this picture below:












Solution:

1. Check view log (Format Payment Instructions):

Unable to extend lob segment IBY.SYS_LOB0000195685C00003$$ by 61450 in tablespace IBYD.

2. Increase Tablespace IBYD become 1 GB.

3. Create Payment Process Request again with . (dot) assigned at the end of the name of file.


Wednesday, February 27, 2013

HZ Table Relationship Diagram

HZ table relationship

How To Solve When Export from Oracle Form - Data Appears but Dialog Box Never Appears - 11.5.10.2



Symptoms

1. When selecting File/Export the data appears to export but the dialog box  (to Open or Save) never appears.
2. The FND_GFM package body is at version 115.56.

STEPS
1. File > Export from any form
2. The transfer popup briefly flashes.

EXPECTED BEHAVIOR
Expect a dialog box to appear asking to Open or Save.

Cause
 The package FND_GFM is failing to upload the exported data into the FND_LOBS table.
Per bug 5642586 sometimes the table index is corrupted but aflobbld.sql
does not see the corruption when building the FND_LOBS table.

Solution
1. Determine the total available tablespace storage space:
SQL> SELECT SUM(bytes) FROM DBA_FREE_SPACE WHERE tablespace_name='CTXD';
2. If storage is low, add a datafile to the problem tablespace:
SQL> ALTER TABLESPACE ADD DATAFILE 'filespec' SIZE xxM;
3. Re-compile invalid object
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
4. Then run $FND_TOP/sql/aflobbld.sql to build the FND_LOBS table.
There is two value input:
1) The name of the APPLSYS schema (ie: APPLSYS)
2) The name of the APPS schema    (ie: APPS)
5. Retest for File > Export

Appendix

Detail of aflobbld.sql :

REM dbdrv: none
REM +==================================================================+
REM | Copyright (c) 1999 Oracle Corporation Redwood Shores, California, USA                                                      |
REM |                           All rights reserved.                                                                                                       |
REM +==================================================================+
REM | FILENAME
REM |      aflobbld.sql
REM |
REM | DESCRIPTION
REM |      This file both creates and maintains the FND_LOBS_CTX
REM |      intermedia index on the FND_LOBS table.
REM |
REM |      Specifically, this script:
REM |
REM |      1) Creates all of the required interMedia preferences
REM |      2) Rebuilds FND_LOBS_CTX from scratch (but ONLY WHEN the
REM |         index is determined to be invalid or missing.
REM |      3) Refreshes FND_LOBS_CTX online to pick up any data changes
REM |         made since the last refresh or rebuild.
REM |
REM | ARGUMENTS
REM |      This script takes two:
REM |
REM |      1) The name of the APPLSYS schema (ie: APPLSYS)
REM |      2) The name of the APPS schema    (ie: APPS)
REM |
REM | NOTES
REM |   Call this module after loading help files with FNDGFU or any time
REM |   you want to refresh the interMedia index FND_LOBS_CTX on FND_LOBS.
REM |   This file will detect a missing or invalid index and rebuild from
REM |   scratch when appropriate.
REM |
REM |   This script encapsulates all of the logic previously found in
REM |   AFLOBCX2.sql, AFLOBCX3.sql and previous versions of aflobbld.sql.
REM +==================================================================+
REM $Header: aflobbld.sql 115.22 2004/09/02 01:43:31 mskees ship $

set verify off;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
whenever sqlerror exit failure rollback;
-- set serveroutput on size 100000

declare

    myDebugFlag boolean := false;

    indx_schema varchar2(30);
    exec_schema varchar2(31);
    cursor c_multi_lexer is
        select pre_owner, pre_name from ctx_preferences
        where pre_name like 'FND_LOBS_G%';
    cursor c_pref_list is
        select pre_owner, pre_name from ctx_preferences
        where pre_name like 'FND_LOBS%';

    tspace  varchar2(256);
    tspace2 varchar2(256);
    tspace3 varchar2(256);

    stmt    varchar2(1000);
    mycount number;
    cursor  oldIndex is select OWNER from all_indexes
              where  INDEX_NAME = 'FND_LOBS_CTX'
              and OWNER in (select ORACLE_USERNAME from FND_ORACLE_USERID);

begin

    indx_schema := '&1';
    exec_schema := '&2';

    -- Remove the comment on next line to force the index to be dropped and recreated
    -- myDebugFlag := true;

-- **********************************************************************
-- **                                                                                                                              **
-- **               BEGIN "create preferences" SECTION                                             **
-- **                                                                                                                             **
-- ** This section creates the interMedia preferences to be used when                    **
-- ** when creating the fnd_lobs_ctx index on the FND_LOBS table.                        **
-- ** Our interMedia preferences are owned by APPS.                                                       **
-- **********************************************************************

    --------------------------------
    -- Remove any old preferences --
    -- Remove any old preferences --
    --------------------------------

    -- dbms_output.put_line('Dropping old preferences ...');
    for dropit in c_multi_lexer loop
        ad_ctx_ddl.drop_preference( dropit.pre_owner || '.' || dropit.pre_name );
    end loop;

    for dropit in c_pref_list loop
        ad_ctx_ddl.drop_preference( dropit.pre_owner || '.' || dropit.pre_name );
    end loop;

    ------------------------------------------
    -- Create the basic wordlist preference --
    ------------------------------------------
    -- dbms_output.put_line('Create the wordlist ...');
    ad_ctx_ddl.create_preference('FND_LOBS_BASIC_WORDLIST_2','BASIC_WORDLIST');
    ad_ctx_ddl.set_attribute('FND_LOBS_BASIC_WORDLIST_2','STEMMER','AUTO');
    ad_ctx_ddl.set_attribute('FND_LOBS_BASIC_WORDLIST_2','FUZZY_MATCH','AUTO');

    ------------------------------------------
    -- Create the charset_filter preference --
    ------------------------------------------
    ad_ctx_ddl.create_preference('FND_LOBS_CHARSET_FILTER_2','CHARSET_FILTER');
    -- Set the default character set to be UTF8 when none specified
    ad_ctx_ddl.set_attribute('FND_LOBS_CHARSET_FILTER_2','CHARSET','UTF8');

    ----------------------------------------------------------------------
    -- Create the multi lexer preference and its constituent components --
    ----------------------------------------------------------------------
    -- dbms_output.put_line('Create the lexers ...');
    ad_ctx_ddl.create_preference('FND_LOBS_GBL_LEXER_2','multi_lexer');
    ad_ctx_ddl.create_preference('FND_LOBS_BLEXER_2', 'basic_lexer');
    ad_ctx_ddl.create_preference('FND_LOBS_CLEXER_2', 'chinese_vgram_lexer');
    ad_ctx_ddl.create_preference('FND_LOBS_JLEXER_2', 'japanese_vgram_lexer');
    ad_ctx_ddl.create_preference('FND_LOBS_KLEXER_2', 'korean_lexer');

    ad_ctx_ddl.add_sub_lexer('FND_LOBS_GBL_LEXER_2','JA','FND_LOBS_JLEXER_2', n
    ad_ctx_ddl.add_sub_lexer('FND_LOBS_GBL_LEXER_2','KO','FND_LOBS_KLEXER_2', n
    ad_ctx_ddl.add_sub_lexer('FND_LOBS_GBL_LEXER_2','ZHS','FND_LOBS_CLEXER_2',
    ad_ctx_ddl.add_sub_lexer('FND_LOBS_GBL_LEXER_2','ZHT','FND_LOBS_CLEXER_2',
    ad_ctx_ddl.add_sub_lexer('FND_LOBS_GBL_LEXER_2','default', 'FND_LOBS_BLEXER


    -----------------------------------------
    -- Create the storage preference --
    -----------------------------------------
    -- use the table space where all of the other fnd indexes live --
    select 'tablespace ' || TABLESPACE_NAME ||
        ' storage(initial 4K next 4M minextents 1 maxextents unlimited)'
    into tspace
    from ALL_INDEXES where INDEX_NAME = 'FND_CONCURRENT_REQUESTS_U1';

    -- use the default tablespace for APPLSYS for dynamically created LOBs --
    select 'tablespace ' || DEFAULT_TABLESPACE || ' storage(maxextents unlimited)'
    into tspace2 from DBA_USERS where USERNAME = upper( indx_schema );

    tspace3 := 'store as ' || '('||tspace2||')';


    -- dbms_output.put_line('Create the storage preference ...');
    ad_ctx_ddl.create_preference('FND_LOBS_BASIC_STORAGE_2', 'BASIC_STORAGE');
    ad_ctx_ddl.set_attribute('FND_LOBS_BASIC_STORAGE_2', 'I_TABLE_CLAUSE', 'lob(token_info) ' || tspace3);
    ad_ctx_ddl.set_attribute('FND_LOBS_BASIC_STORAGE_2', 'K_TABLE_CLAUSE', tspace);
    ad_ctx_ddl.set_attribute('FND_LOBS_BASIC_STORAGE_2', 'R_TABLE_CLAUSE', 'lob(data) store as (cache) ' || tspace2 );
    ad_ctx_ddl.set_attribute('FND_LOBS_BASIC_STORAGE_2', 'N_TABLE_CLAUSE', tspace);
    ad_ctx_ddl.set_attribute('FND_LOBS_BASIC_STORAGE_2', 'I_INDEX_CLAUSE', tspace);
    ad_ctx_ddl.set_attribute('FND_LOBS_BASIC_STORAGE_2', 'P_TABLE_CLAUSE', tspace);

-- ****************************************
-- **                                                                 **
-- **  END "create Preferences" section                **
-- **                                                                 **
-- **  All of the required interMedia                      **
-- **  preferences now exist                                 **
-- ****************************************

------------------------------------------------------------------------------

-- **********************************************************************
-- **                                                                                                                             **
-- **              BEGIN "create index" SECTION                                                       **
-- **                                                                                                                             **
-- ** This section checks to see if the FND_LOBS_CTX index already                                   **
-- ** exists and is healthy.  If so, we skip ahead to the "refresh                                         **
-- ** index" section.  If not, we create the index from scratch.                                           **
-- ** index" section.  If not, we create the index from scratch.                                           **
-- ** FND_LOBS_CTX lives in APPLSYS, along with the other FND indexes.              **
-- **********************************************************************

    --------------------------------------------------------------------
    -- Change to APPLSYS schema so that the index will be owned there --
    --------------------------------------------------------------------
    execute immediate 'alter session set current_schema = ' || indx_schema;

    if ( NOT myDebugFlag ) then
        ------------------------------------------------------------------------
        -- check for healthy index and only rebuild from scratch if necessary --
        ------------------------------------------------------------------------
        select count(1)  into mycount
        from  all_indexes
        where owner = 'APPLSYS'
        and   index_name = 'FND_LOBS_CTX'
        and   table_name = 'FND_LOBS'
        and   status = 'VALID';

        if (mycount = 1) then
            begin
                select count(1) into mycount
                from fnd_lobs
                where contains(file_data, 'cat')>0;

                ----------------------------------------------------
                -- Looks like a healthy index.  Skip ahead to the --
                -- "refresh index" section below                  --
                ----------------------------------------------------
                -- dbms_output.put_line('Index exists - Going straight to refresh');
                goto l_Refresh;

            exception
                --  Need to rebuild from scratch so proceed to drop
                when others then null;
            end;
        end if;
    end if;

    -----------------------------
    -- drop index if necessary --
    -----------------------------

    -----------------------------
    for dropit in oldIndex loop
        -- dbms_output.put_line('Dropping Index ...');
        execute immediate 'drop index '|| dropit.owner ||'.fnd_lobs_ctx force';
    end loop;

    delete from fnd_lobs where file_id = -1;
    fnd_imutl.help_cleanup();

    -- we need at least one blob to index it ...
    select count(file_id) into mycount from fnd_lobs;

    if (mycount = 0) then
        insert into fnd_lobs (file_id,file_content_type,oracle_charset,file_format)
        values (-1,'text/html','UTF8','TEXT');
    end if;
    commit;

    begin
        ----------------------
        -- create the index --
        ----------------------
        -- dbms_output.put_line('Create the Index ...');
        stmt := ' create index fnd_lobs_ctx on fnd_lobs(file_data) '||
              ' indextype is ctxsys.context '||
              ' parameters(''lexer ' || exec_schema || '.fnd_lobs_gbl_lexer_2 '||
                  ' language column language '||
                  ' filter ' || exec_schema || '.fnd_lobs_charset_filter_2 '||
                  ' format column   file_format '||
                  ' charset column  oracle_charset '||
                  ' storage ' || exec_schema || '.fnd_lobs_basic_storage_2 '||
                  ' wordlist  ' || exec_schema || '.fnd_lobs_basic_wordlist_2'')';
        execute immediate stmt;
        --
        -- This added as per BDE suggestion JEStone for improved performance
        --
        -- dbms_output.put_line( 'Rebuild it compressed ...' );
        execute immediate 'alter index DR$FND_LOBS_CTX$X rebuild compress 2';

    exception
        when others then
            ----------------------------------------------------------------
            -- Remove incomplete index.  Otherwise, it may lock the table --
        when others then
            ----------------------------------------------------------------
            -- Remove incomplete index.  Otherwise, it may lock the table --
            ----------------------------------------------------------------
            execute immediate 'drop index applsys.fnd_lobs_ctx force';
            raise;
    end;

-- ***************************************
-- **                                                                 **
-- **  END "create index" section                         **
-- **                                                                  **
-- ** The FND_LOBS_CTX index now exists                      **
-- ***************************************
    return;

---------------------------------------------------------------------------

-- **********************************************************************
-- **                                                                                                                             **
-- **               BEGIN "refresh index" SECTION                                                    **
-- **                                                                                                                             **
-- ** This section refreshes the existing FND_LOBS_CTX index.                                          **
-- ** As part of this refresh, we first remove any orphaned Help rows                                 **
-- **********************************************************************

<<l_Refresh>>

    -----------------------------------------------------------
    -- Change session back to APPS to run the refresh script --
    -----------------------------------------------------------
    execute immediate 'alter session set current_schema = ' || exec_schema;

    -- dbms_output.put_line('Refresh the Index ...');
    fnd_imutl.maintain_index(p_index_name     => 'fnd_lobs_ctx',
                             p_callback       => 'fnd_imutl.help_cleanup',
                             p_app_short_name => 'FND',
                             p_mode           => 'sync');

end;
/
commit;
exit;

Delete Asset in FA Using Script



Copy the code below


REM  -----------------------------------------------------------------------
REM 
REM  Name : del_asset.sql 
REM  Release : 10.4 or later 
  
REM  This script deletes all data for one asset in all the books. 
REM  To run from command line, do:  
REM   sqlplus fa/ @del_asset 
REM  and enter the asset number. 
REM  CAUTION : 
REM  1) This is an IRREVERSIBLE procedure. 
REM  2) If the asset has been posted to General Ledger, manual adjustments in   
REM     GL are needed to maintain data integrity. 
REM  3) The audit trail for this asset will be PERMANENTLY lost.  The reports 
REM     produced prior to running this script should not be used anymore. 
REM  4) If the asset was created from Account Payables via Mass Additions, the  
REM     link between the asset and the invoice in AP will be LOST. 
REM  5) You may do ROLLBACK if you feel that something was not done correctly.  
REM 
PROMPT CAUTION : 
PROMPT 1) This is an IRREVERSIBLE procedure. 
PROMPT 2) If the asset has been posted to General Ledger, manual adjustments in 
PROMPT    GL are needed to maintain data integrity. 
PROMPT 3) The audit trail for this asset will be PERMANENTLY lost.  The reports 
PROMPT    produced prior to running this script should not be used anymore. 
PROMPT 4) If the asset was created from Account Payables via Mass Additions, 
the 
PROMPT    link between the asset and the invoice in AP will be LOST. 
PROMPT 5) You may do ROLLBACK if you feel that something was not done 
correctly. 
PROMPT    You may also use Control-C anytime to interrupt the script. 
SELECT ASSET_ID FROM FA_ADDITIONS_B 
WHERE ASSET_NUMBER = '&ASSET_NUMBER'; 
DELETE FROM FA_INVOICE_TRANSACTIONS 
WHERE INVOICE_TRANSACTION_ID IN ( SELECT INVOICE_TRANSACTION_ID_IN 
                                    FROM FA_ASSET_INVOICES 
                                   WHERE ASSET_ID = &&ASSET_ID ) 
  OR INVOICE_TRANSACTION_ID IN ( SELECT INVOICE_TRANSACTION_ID_OUT 
                                   FROM FA_ASSET_INVOICES 
                                  WHERE ASSET_ID = &&ASSET_ID ); 
DELETE FROM FA_TRANSFER_DETAILS 
WHERE DISTRIBUTION_ID IN ( SELECT FDH.DISTRIBUTION_ID 
                             FROM FA_DISTRIBUTION_HISTORY FDH 
                            WHERE ASSET_ID = &&ASSET_ID ); 
DELETE FROM FA_ACE_BOOKS WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_ADDITIONS_B WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_ADJUSTMENTS WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_ASSET_HISTORY WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_ASSET_INVOICES WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_BALANCES_REPORT WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_BOOKS WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_CAPITAL_BUDGET WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_DEFERRED_DEPRN WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_DEPRN_DETAIL WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_DEPRN_SUMMARY WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_DISTRIBUTION_HISTORY WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_MASS_REVALUATION_RULES WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_PERIODIC_PRODUCTION WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_RESERVE_LEDGER WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_RETIREMENTS WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_TRANSACTION_HEADERS WHERE ASSET_ID = &&ASSET_ID; 

DELETE FROM FA_BOOKS_SUMMARY WHERE ASSET_ID = &&ASSET_ID;

-- mc

DELETE FROM FA_MC_ADJUSTMENTS WHERE ASSET_ID = &&ASSET_ID; 
  
DELETE FROM FA_MC_ASSET_INVOICES WHERE ASSET_ID = &&ASSET_ID; 
  
DELETE FROM FA_MC_BOOKS WHERE ASSET_ID = &&ASSET_ID; 
  
DELETE FROM FA_MC_DEPRN_DETAIL WHERE ASSET_ID = &&ASSET_ID; 
DELETE FROM FA_MC_DEPRN_SUMMARY WHERE ASSET_ID = &&ASSET_ID; 
    
DELETE FROM FA_MC_BOOKS_SUMMARY WHERE ASSET_ID = &&ASSET_ID;
DELETE FROM FA_MC_RETIREMENTS WHERE ASSET_ID = &&ASSET_ID; 


undef asset_id