The process for debugging any operation for Order Management module is given below.
Set the value of profile option, OM: Debug Level to 5. The highest level for debugging is 5. This means that all levels of statements will be logged.
Set the value of profile option, OM: Debug Log Directory to the a directory in Unix where the debug file will be generated. We shall set the directory to /usr/tmp.
Test the change
Now we can conduct any operation in Order Management and the debug details will be stored in a file at the debug log directory.
Let us check the Oracle session id
Click on Help > Diagnostics > Examine
Now you will get the following
Select Block: $PROFILES$ and Field: DB_SESSION_ID
You will get the value of the database session.
We shall open a Sales Order
Click on Actions button and select Cancel
Press OK
Enter a reason and press OK to cancel this order.
Now log in to Unix and go to the directory that you have setup as the debug directory. This has been set to /usr/tmp
In this directory check the files with extension, *.dbg
Open the file using view editor
/usr/tmp>view l0051611.dbg
You will get the debug details.
Once you have got the debug file you should set the debug level back to 0 or else all Order Management programs/process will generate debug logs and it will be an additional load on Oracle.
Using a pl/sql script to debug Order management application
Oracle supplies a seeded package named, OE_DEBUG_PUB, for writing the debug log messages. If you are executing OE_ORDER_PUB using a PL/SQL script, you need to add the following lines to your script to see the Order management debug messages.
OE_DEBUG_PUB.debug_on();
OE_DEBUG_PUB.Start_ONT_Debugger(‘/usr/tmp’,'skm1′,null);
Cheers!