Saturday, February 18, 2017

Viewing BML print statements in log

While working with complex BML, I have always been wondering if I can see print statements for debugging that we write in BML code in some log file during quote process. Finally, found there is a way to do it and its released in 2016 R1 release.

How to enable?
Admin > General Site Options  > Enable BML Print Logging = Yes

Where to see?
Admin > Error Logs > bm.log

Use it for debugging or performance monitoring purpose. Very useful!

Don't forget to disable logging in production, it affects performance. Conditionalize your print statements using some debug flag variable in BML code.

Happy BMLing!

Saturday, February 11, 2017

Oracle CPQ - Debug Configuration rule which is using Commerce transaction data

Oracle Metalink has created a very good note on how to use commerce transaction data in Configuration rules.

How To Query Transaction Data from Commerce Into a Configuration Rule (Doc ID 1660743.1)

But it has one important not-so-highlighted point which can be very useful for debugging purpose in Configuration rule. If you want to debug such kind of rule, you can specify your transaction id in context parameters key/value pair as below and it will set this transaction in context for your bmql query.

Some snippet from above metalink note:
To test the code in the debugger, get a transaction ID from an existing quote first. Then in the debuggers Context Parameters:field, enter the following key=value pair:
bsId = (your transactionID)

Example query code from metalink note. Here quote_process is a commerce process variable name.

ret = "";

records = bmql("select quoteNumber_quote, quoteDescription_quote from commerce.quote_process");

print records;

for record in records {
     ret = ret + get (record, "quoteDescription_quote") + " " + get(record, "quoteNumber_quote") + "|^|";

records = bmql("select _group_sequence_number from commerce.line_process");

for record in records {
     print "_group_sequence_number: " + get(record, "_group_sequence_number");

return ret;

Thursday, December 8, 2016

Restart EBS instance if everything is down

Start EBS Instance
Manually restart server if nothing is working like SSH, DB etc

Check if database listener is up or not
> lsnrctl status

Start listener if required using following
> lsnrctl start <DBID>
Connect to database using sysdb
> sqlplus / as sysdba
> startup

stop all services from $ADMIN_SCRIPTS_HOME
start all services from $ADMIN_SCRIPTS_HOME

Wednesday, July 6, 2016

JRAD doc queries

Very useful which can help you find lot of issues related to missing intl txt or publication issue or identify corrupted ui template

--Debug the missing intl_text_id, find it in attribute values
select * from JDR_ATTRIBUTES where att_value like '%8581175%';

--use above component id to get document name
select jdr_mds_internal.getdocumentname(95614) from dual;

--use this to find the template element causing issue by checking sequence id
select * from jdr_components where comp_docid in (95614);

--use above jdr document name to find the content template
select * from cz_ui_templates where jrad_doc='/oracle/apps/cz/runtime/oa/webui/templates/regions/6448_162';

--check which page is referring this template
select * from cz_ui_page_elements where ctrl_template_id=6448;

select * from cz_localized_texts where localized_str like '%';

select * from cz_ui_defs where ui_Def_id in (62791);

select * from cz_ui_templates where ui_Def_id in (62791);

select * from fnd_new_messages where message_text like '%Message Text Here%';