The following lines contain the word 'select', 'insert', 'update' or 'delete':
locked", "validations completed", "document updated". EVENT-level
messages should surround all COMMITs, SAVEPOINTS, and ROLLBACKs.
4-EXCEPTION - PO_LOG.exc()
An EXCEPTION-level message should be logged any time an "exception"
occurs in the code. In PL/SQL, such a message should be logged at
the beginning of every (EXCEPTION) WHEN xxx THEN block unless the
exception is expected as part of the normal code flow, such as
NO_DATA_FOUND queries that are expected. If the PL/SQL exception is
expected, it should have a STATEMENT-level log message at the
beginning of the block instead of an EXCEPTION-level message.
EXCEPTION-level messages should also be recorded if the code
encounters a condition that was not expected from a programming
perspective. This may include the default section of a switch
statement or the ELSE clause of a series of IF-ELSE IF
conditions. Furthermore, an EXCEPTION-level message should be logged
by any code that silently recovers from an unexpected
condition. Examples of this include fixing API parameters, like
setting the parameter to 'N' if it was NULL, or turning null into
the empty String "" to make code more robust.
EXCEPTION-level messages can be monitored and used to improve an
application's performance and robustness.
******************************************************************************
******************************************************************************
*/
/******************************************************************************
Debug logging notes
(from Oracle Applications Logging Framework Guide, 8/21/03):
...
In some rare circumstances, for example, if you are debugging an
issue, you may need to manually initialize the PL/SQL layer logging
for the current session. From the SQL*Prompt, you could do this by
calling:
FND_GLOBAL.APPS_INITIALIZE(fnd_user_id, fnd_resp_id, fnd_appl_id);
select module,message_text,timestamp, log_sequence
from fnd_log_messages
where log_sequence
between
( select max(log_sequence)
from fnd_log_messages
where module = 'po.plsql.SBULL.TEST.BEGIN'
)
and
( select max(log_sequence)
from fnd_log_messages
where module = 'po.plsql.SBULL.TEST.END'
)
order by log_sequence
;
SELECT rowid
BULK COLLECT INTO l_rowid_tbl
FROM PO_SESSION_GT
WHERE key = p_key
;
update_po_log_tbl po_tbl_number;
update_po_log_tbl:=po_tbl_number();
SELECT psgt.key
BULK COLLECT INTO update_po_log_tbl
FROM po_session_gt psgt
WHERE psgt.index_char1=p_record_identifier ;
FOR i in 1..update_po_log_tbl.COUNT LOOP
stmt_session_gt( p_module_base => p_module_base,
p_position => p_position ,
p_key => update_po_log_tbl(i));
SELECT
tab.column_name
, tab.data_type
BULK COLLECT INTO
l_column_name_tbl
, l_data_type_tbl
FROM
ALL_TAB_COLUMNS tab,
ALL_SYNONYMS syn
WHERE tab.TABLE_NAME = syn.table_name
AND tab.owner=syn.owner
AND tab.owner = l_table_owner
AND syn.synonym_name= l_table_name
ORDER BY tab.column_id
;
OPEN l_rowid_csr FOR 'SELECT rowid FROM '||l_table_name ;
l_sql := 'SELECT SUBSTR(' || l_sql || ',1,3900)'
||' FROM ' || l_table_name
||' WHERE rowid = :b_rowid';