P2K_SMERL#

Functionality#

P2K_SMERL is a utility procedure that is called from a variety of PL/SQL procedures, packages and functions. Its purpose is to write a message out to the P2K_AM_EXECUTION_RUN_LOGS table, for reporting or any other purpose.

This routine is used for issuing trace messaging, as well as for outputting messages that will then be reported using the generic report template UMEX.

Parameters#

P_MEX_IDNumberThe Execution ID that the run logs will be written against
P_MODULE_NAMEVarchar(30)Shown on UMEX in the second column
P_TRACE_LEVELVarchar(1)A numeric value from 0 to 9, defaulted to "0", if left as NULL
P_CONTEXT_1Varchar(4000)A text area to put any contextual information. Shown on UMEX in the third column
P_CONTEXT_2Varchar(4000)A text area to put any contextual information. Shown on UMEX in the third column
P_MESSAGE_CODEVarchar(4000)If you provide a message code from IMMS this will be shown on the UMEX report
P_ERROR_LEVELVarchar(1)Usually set to "0"
P_RUN_LOG_TEXTVarcharThis is the message that is shown in the VMEX grid or on the UMEX report, if you have not specified a MESSAGE_CODE

Errors:#

  • TRACE_LEVEL lexicon values are checked for validity. If invalid, an ORA-20000 error is raised and the trace level is set to 1
  • Any data base errors are output and an ORA-20000 error is raised

Examples:#

From UVASSIGNMENTS
p2k_smerl(v_mex_id, v_function,'0',r_crs1.entity_code, 'P2K_CM_ENTITIES','CV#-10001#1ENTITY_CODE#2' ||r_crs1.entity_code ||'#3P2K_CM_ENTITIES','2', NULL);
Minimal call
p2k_smerl(v_mex_id, NULL,'0',NULL, NULL,'My Message for UMEX',NULL, NULL);