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.
bsId=3489815

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
> adstpall.sh
start all services from $ADMIN_SCRIPTS_HOME
> adstrtall.sh


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%';

Saturday, June 18, 2016

Why Target instance name is not shown in Publication LOV?

Many times, in CZGOLD instance environment, it is observed that cloned CZGOLD instance will not show cloned target instance while creating publication. Configurator uses below query to check if the remote instance should be visible in Publication LOV or not. You can check data based on this and correct as required.

In simple words, in cloned target instance's cz_servers table, if any server is having source_server_flag as 1, then that server's name in target must match with CZ instance's LOCAL server name. If there are multiple records with source_server_flag as 1, then it might create issue as well.

SELECT local_name, server_local_id
  FROM cz_servers
 WHERE server_local_id >= 0
   AND cz_model_migration_pvt.target_open_for ('P', fndnam_link_name, local_name)='1'


FUNCTION target_open_for (
   p_migration_or_publishing   IN   VARCHAR2,
   p_link_name                 IN   VARCHAR2,
   p_local_name                IN   VARCHAR2
)  RETURN VARCHAR2
IS
   target_open            VARCHAR2 (1)    := '1';
   target_not_open        VARCHAR2 (1)    := '0';
   l_source_server_flag           VARCHAR2 (1);
   l_source_server_flag_for_pub   VARCHAR2 (1);
   l_sql_str              VARCHAR2 (2000);
   l_sql_str_for_pub      VARCHAR2 (2000);
   target_instance_for_pub VARCHAR2(2000);
   local_instance_name VARCHAR2(2000);

BEGIN

   IF (p_migration_or_publishing = MODE_PUBLICATION) THEN
       IF (p_local_name='LOCAL') THEN
         RETURN target_open;
       END IF;
   END IF;

   IF p_link_name IS NULL THEN
      RETURN target_not_open;
   END IF;

   l_sql_str :=
         'SELECT NVL(source_server_flag,''0''), local_name FROM cz_servers@' || p_link_name || ' ' ||
         'WHERE source_server_flag = ''1'' ';

   EXECUTE IMMEDIATE l_sql_str
                INTO l_source_server_flag, target_instance_for_pub;


   IF (p_migration_or_publishing = MODE_PUBLICATION) THEN

      SELECT instance_name
       INTO local_instance_name
      FROM cz_servers
       WHERE local_name = 'LOCAL';

       IF (local_instance_name=target_instance_for_pub) THEN
         RETURN target_open;
       END IF;
   END IF;

   RETURN target_not_open;

EXCEPTION
   WHEN NO_DATA_FOUND THEN
      RETURN target_open;
   WHEN OTHERS THEN
      RETURN target_not_open;
END;

Saturday, May 21, 2016

ojspCompile.pl is not compiling jsp files - not generating class files

Refer tree.dep in _pages directory.
Delete your file entries from this file and re-run ojspCompile.pl file.

Saturday, May 14, 2016

Oracle Configurator - Publication Enabled Properties

Oracle Configurator build 12.1.3.31.9 has introduced a new flag for PROPERTY object - PUBLICATION ENABLED. This property indicates whether the property and its values should be copied to target publication instance during model publication or not. This is introduced mainly for performance reasons because in certain cases, properties in OCD are not required in published target model data. By default, new build sets this property to False for all properties stopping them being published to target instance. This is sudden change by Oracle in 31.9 build, which many customers are not aware of. This causes customers wonder by model not working correctly in target instance after publication and upgrade to 31.9. I have seen persons debugging a log around this for days finally to figure out properties are not copied in target instance. Thanks to Oracle that there exists a note that can help customer identify the issue quickly if anyone has searched metalink. 

After Upgrading To Build 31.9, Unable to Access Properties in Published Models (Doc ID 2084634.1)

Let's discuss about scenarios when this flag should be enabled.
  • Set Publication Enabled to True, when the property is used in UI or CX code. This means you are accessing property value in CX code OR have display/enable condition in UI based on property or have UI node caption based on property.
  • Set Publication Enabled to False, when property is used only in CDL Rules like property based rules Or property is imported in Configurator from BOM model catalog/APC and not used anywhere. This is most likely the case and is major concern in publication process performance for customers who use large amount of attribute based classification (from APC or Catalog or OCD created) for rule. Whenever you generate logic, all logic rule details are translated to rule engine language and stored in cz_lce% tables. Hence, actual rule texts and rule data are not required for rule execution in target instance.

Tuesday, May 3, 2016

Configurator: AltBatchValidateUrl parameter in CZ_DB_SETTINGS

If you are getting error while Book Order process in Order Management, then you can look at debugging details here.

When we click on Configurator button in OM, Configurator uses BOM:Configurator URL of UI Manager profile option to find URL where configurator instance is hosted.

Book Order/Batch Validation uses same URL for batch validation purpose. If this URL is secured one (with https protocol), DBA can configure Alternate URL (usually non-secure, plain http) using cz_db_settings for quick validation process  - non-secure URL does not require wallet setup in db tier.

So, AltBatchValidateURL is not mandatory when we are using plain http URL for configurator UI launch. If not specified (cz_db_settings does not have entry for AltBatchValidateURL), configurator will use above profile URL for it. But when specified, it must be valid URL to find configurator host.


In current case, AltBatchValidateURL should match with BOM:Configurator URL of UI Manager profile option on the instance – that will be the correct entry for any host.

If BOM:Configurator URL of UI Manager is incorrect, then user will not be able to launch Configurator UI at all and will be quickly identified by any user.

Using Batch Validation and AltBatchValidateURL Correctly in an SSL Environment (Doc ID 458587.1)

Friday, February 19, 2016

Oracle Applications ERP Ebiz Authentication

Validate user/password for Ebiz Session

import oracle.apps.cz.common.CZWebAppsContext;
import oracle.apps.fnd.common.Const;


public class AppsAuth {
    public AppsAuth() {
        super();
    }

    public static void main(String[] args) {
        //debug("Java System Properites : " + System.getProperties());
        String dbcFileName = System.getProperty(Const.DBCFILE);
        if (dbcFileName == null) {
            dbcFileName = System.getProperty(Const.JTFDBCFILE);
        }
        debug("DBCFILE found : " + dbcFileName);
        if (dbcFileName == null) {
            dbcFileName = "/u02/VIS1213/inst/apps/VIS1213_ebs/appl/fnd/12.0.0/secure/VIS1213.dbc";
            System.setProperty(Const.DBCFILE, dbcFileName);
            System.setProperty(Const.JTFDBCFILE, dbcFileName);
            debug("DBCFILE set to : " + dbcFileName);
        }


        CZWebAppsContext context = null;
        long startTime = System.currentTimeMillis();

        try {
            debug("Creating context");
            context = new CZWebAppsContext(dbcFileName);
            boolean valid = context.getSessionManager().validateLogin(args[0], args[1]);
            System.out.println("is valid : " + valid);
        } catch (Exception e) {
            debug("Error " + e.getStackTrace());
            e.printStackTrace();
        } finally {
            if (context != null) {
                context.freeContext();
                debug("Context Released");
            }
            debug("Time taken to for the process : " + (System.currentTimeMillis() - startTime) + " ms");
        }
    }

    private static void debug(String message) {
        System.out.println(message);
    }
}

Sunday, January 31, 2016

Using Custom styles in Configurator UI

You can define custom css classes in UI and use it anywhere in UI Element as style.

Add Raw text in the Page and add following in Text Expression. Notice the dot in beginning of class name. This is same as how you define style in standard HTML page using CSS.

<style>
.xxhighlight {
    font-weight: bold;
    background-color: yellow;
}
</style>

Now use above class in style class anywhere in UI element. You will only put xxhighlight in it.
Style = xxhighlight
You can learn more about adding custom style classes in google. You can add more attributes to classes as you want.

Now look and feel of customization and style will be limited to your imagination and not what Configurator UI is offering.

Thursday, November 26, 2015

Configurator model logic, UI update and re publication block

DECLARE
  l_model_id NUMBER;
  l_user_id number;
  CURSOR ui_name_cur
  IS
    SELECT ui_def_id,
      name
    FROM cz_ui_Defs
    WHERE devl_project_id=l_model_id
    AND deleted_flag     =0
    AND name LIKE 'MODEL%SUBTAB_UI';
  CURSOR pub_data_cur
  IS
    SELECT publication_id,
      cs.instance_name
    FROM cz_model_publications mp,
      cz_servers cs
    WHERE object_id       =l_model_id
    AND source_target_flag='S'
    AND deleted_Flag      =0
    AND disabled_flag     =0
    AND mp.server_id      =cs.server_local_id
    AND cs.instance_name  ='MYINSTANCE' ;
 
    CURSOR fnd_user_data_cur
  IS
    SELECT user_id from fnd_user where user_name = 'PANKAJ_MANDALIYA';
 
  CURSOR model_data_cur
  IS
    SELECT pn.name model_name,
      dp.name Description,
      dp.checkout_time,
      dp.checkout_user,
      rp.enclosing_folder folder_id,
      pn.devl_project_id model_id
    FROM cz_ps_nodes pn,
      cz_rp_entries rp,
      cz_devl_projects dp
    WHERE pn.ps_node_id   = rp.object_id
    AND rp.deleted_flag   = 0
    AND rp.object_type    = 'PRJ'
    AND dp.devl_project_id=pn.devl_project_id
    AND dp.devl_project_id=rp.object_id
    AND dp.deleted_flag   =0
    AND dp.name NOT LIKE 'Copy%'
    AND rp.name NOT LIKE 'Copy%'
    AND (pn.name LIKE 'MODEL1%')
    AND pn.deleted_flag = 0
    ORDER BY pn.name;
  v_model_data model_data_cur%rowtype;
  v_ui_data ui_name_cur%rowtype;
  v_pub_data pub_data_cur%rowtype;

  l_request_id   NUMBER;
  v_return_status VARCHAR2(10);
  v_msg_count number;
  v_msg_data      VARCHAR2(255);
  v_output_line   VARCHAR2(512);
  v_ui_def_id     NUMBER;
  v_new_pub_id number;
BEGIN
  -- Initialize Apps
  OPEN fnd_user_data_cur;
  FETCH fnd_user_data_cur INTO L_USER_ID;
  fnd_global.apps_initialize (L_USER_ID ,22687 ,708 );
  OPEN model_data_cur;
  FETCH model_data_cur INTO v_model_data;
  WHILE model_data_cur%FOUND
  LOOP
    l_model_id    := v_model_data.model_id;
    v_output_line := v_model_data.Model_Name || ',' || REPLACE(v_model_data.Description,',',' ') ||',' || v_model_data.Folder_ID || ',' || v_model_data.Model_ID ||',' || NVL(v_model_data.checkout_user, 'Unlocked') || ',' || v_model_data.checkout_time;
    --DBMS_OUTPUT.PUT ('Model name '||v_model_data.Model_Name);
    --DBMS_OUTPUT.PUT (', Folder '||v_model_data.Folder_ID);
    --DBMS_OUTPUT.PUT_LINE (', Model ID is '||v_model_data.Model_ID);
    --    l_request_id := fnd_request.submit_request ('CZ' ,--IN VARCHAR2 DEFAULT NULL,                -- application
    --    'CZBOMSIM',                                        -- IN VARCHAR2 DEFAULT NULL,-- program short name
    --    '',                                                -- description
    --    '',                                                -- start time
    --    FALSE,                                             -- IN BOOLEAN DEFAULT FALSE,                -- sub request
    --    'MYINSTANCE',                                         -- IN VARCHAR2 DEFAULT CHR (0),          -- argument1
    --    v_model_data.Folder_ID,                                          -- IN VARCHAR2 DEFAULT CHR (0),          -- argument2
    --    v_model_data.Model_ID,                                -- IN VARCHAR2 DEFAULT CHR (0),                  -- argument3
    --    CHR (0)                                            -- represents end of arguments
    --    );
    --    COMMIT;
    CZ_PB_MGR.IS_MODEL_UPTO_DATE( P_MODEL_ID =>l_model_id, X_RETURN_STATUS =>v_return_status, X_MSG_DATA =>v_msg_data);
    IF v_return_status ='1' THEN
      v_output_line   := v_output_line || ',' || 'Logic is upto date';
    ELSE
      v_output_line := v_output_line || ',' || 'Generate Logic is Required';
    END IF;
    OPEN ui_name_cur;
    FETCH ui_name_cur INTO v_ui_data;
    IF ui_name_cur%NOTFOUND THEN
      v_output_line := v_output_line || ',' || 'UI Not Found';
    ELSE
      CZ_PB_MGR.is_ui_upto_date (p_ui_def_id => v_ui_data.ui_def_id, X_RETURN_STATUS =>v_return_status, X_MSG_DATA =>v_msg_data);
      IF v_return_status<>'0' THEN
        v_output_line   := v_output_line || ',' || v_ui_data.name || ' Requires UI Refresh';
      ELSE
        v_output_line := v_output_line || ',' || v_ui_data.name || ' is upto date';
      END IF;
    END IF;
    CLOSE ui_name_cur;
 
    OPEN pub_data_cur;
    FETCH pub_data_cur INTO v_pub_data;
    IF pub_data_cur%NOTFOUND THEN
      v_output_line := v_output_line || ',' || 'No Existing Publication Found';
    ELSE
      --cz_pb_mgr.create_republish_publication(p_publication_id=> v_pub_data.publication_id, x_new_publication_id=> v_new_pub_id, x_return_status=>v_return_status, x_msg_count=>v_msg_count, x_msg_data=>v_msg_data);
      IF v_return_status<>FND_API.G_RET_STS_SUCCESS THEN
        v_output_line   := v_output_line || ',' || 'Republish Failed:' || v_msg_data;
      ELSE
        v_output_line := v_output_line || ',' || v_new_pub_id;
        --run publication concurrent
     
      END IF;
    END IF;
    CLOSE pub_data_cur;
 
 
    dbms_output.put_line(v_output_line);
    FETCH model_data_cur INTO v_model_data;
  END LOOP;
  CLOSE model_data_cur;
END;
------------------------------------------------------------------------------------------

Thursday, August 13, 2015

check model bill similarity check in bulk

---------Block to submit BOM SIM and publication concurrent reqst-----------------
DECLARE
  CURSOR BOMSIM_PUBLCTN_CURSOR
  IS
    SELECT pn.name model_name,
      rp.name Description,
      rp.enclosing_folder folder_id,
      pn.devl_project_id model_id
    FROM cz_ps_nodes pn,
      cz_rp_entries rp
    WHERE pn.ps_node_id = rp.object_id
    AND rp.deleted_flag = 0
    AND rp.object_type  = 'PRJ'
    AND rp.name NOT LIKE 'Copy%'
    AND (pn.name        like 'MODEL-%')
    AND pn.deleted_flag = 0
    order by pn.name;
  V_inputdata BOMSIM_PUBLCTN_CURSOR%rowtype;
  ln_request_id NUMBER;
BEGIN
  -- Initialize Apps
  fnd_global.apps_initialize (1848 ,22687 ,708 );
  OPEN BOMSIM_PUBLCTN_CURSOR;
  FETCH BOMSIM_PUBLCTN_CURSOR INTO V_inputdata;
  WHILE BOMSIM_PUBLCTN_CURSOR%FOUND LOOP
    --DBMS_OUTPUT.PUT ('Model name '||V_inputdata.Model_Name);
    --DBMS_OUTPUT.PUT (', Folder '||V_inputdata.Folder_ID);
    --DBMS_OUTPUT.PUT_LINE (', Model ID is '||V_inputdata.Model_ID);
    ln_request_id := fnd_request.submit_request ('CZ' ,--IN VARCHAR2 DEFAULT NULL,                -- application
    'CZBOMSIM',                                        -- IN VARCHAR2 DEFAULT NULL,-- program short name
    '',                                                -- description
    '',                                                -- start time
    FALSE,                                             -- IN BOOLEAN DEFAULT FALSE,                -- sub request
    'PROD',                                         -- IN VARCHAR2 DEFAULT CHR (0),          -- argument1
    V_inputdata.Folder_ID,                                          -- IN VARCHAR2 DEFAULT CHR (0),          -- argument2
    V_inputdata.Model_ID,                                -- IN VARCHAR2 DEFAULT CHR (0),                  -- argument3
    CHR (0)                                            -- represents end of arguments
    );
    COMMIT;
    dbms_output.put_line ('l' ||ln_request_id || '.req' || ',' || V_inputdata.Model_Name || ',' || V_inputdata.Description ||',' ||
      V_inputdata.Folder_ID || ',' ||
      V_inputdata.Model_ID ||',' || ln_request_id );
    IF ln_request_id = 0 THEN
      dbms_output.put_line ('Concurrent request failed to submit');
    END IF;
    FETCH BOMSIM_PUBLCTN_CURSOR into V_inputdata;
  END LOOP;
  END;
  ------------------------------------------------------------------------------------------


Sunday, January 26, 2014

Oracle Configurator CIO and dependent jar files

Here are the some of the jar files required to build Configurator CX extensions and few other test cases around that.

It contains old com.sun.java.util.collections jar along with JDBC, FND, OC4J and other related jars. Its link to dropbox. These jars are from Oracle applications 12.1.x version.

Although these files are here for reference purpose, its always good to get them from your instance where you are going to deploy your changes. You can get all of the following classes from $JAVA_TOP directory on instance middle-tier.

UPDATE: Link to jar file is removed now. Jar file can be created with following commands from middletier unix box.

bash>cd $JAVA_TOP
bash>jar cvf oracle.apps.cz.jar oracle/apps/cz
bash>jar cvf oracle.apps.fnd.jar oracle/apps/fnd

Saturday, November 30, 2013

Update Java Extension ClassName for Configurator CX rules using query

Following query will update the java classname (from xxcz.cx.MyOldClass to xxcz.cx.MyNewClass ) for all the models which are under repository folder name 'Models - In Process'

UPDATE cz_rules ru
SET ru.class_name        = 'xxcz.cx.MyNewClass'
WHERE exists(SELECT
  rpf.name folder_name,
  p.name model_name,
  p.devl_project_id,
  r.name rule_name,
  r.rule_id,
  r.class_name
FROM cz_rules r,
  cz_devl_projects p,
  cz_rp_entries rpp,
  cz_rp_entries rpf
WHERE r.devl_project_id=p.devl_project_id
AND r.rule_type = 300 -- CX rules
AND rpp.object_id       =p.devl_project_id
and rpp.enclosing_folder = rpf.object_id
AND rpp.object_type     ='PRJ'
AND R.DISABLED_FLAG=0  --update only enabled rules
AND rpf.object_type = 'FLD'
--AND P.DEVL_PROJECT_ID=1037298 --add this if you want to update specific model only
AND class_name LIKE 'xxcz.cx.MyOldClass'
AND RPF.NAME LIKE 'Models – In Process'
AND r.rule_id=ru.rule_id
);

Sunday, October 6, 2013

Configurator: Deploying CX class in archive vs file system

CZ Extension java classes uploaded directly on middletier / unix box:
  1. Java extension classes are placed in middle-tier/unix file system
  2. jserv.properties (11.5.10) or oc4j.properties (R12) file should be updated to add extension classes in classpath.
  3. All published Configurator models will use same extension classes
  4. Any new change in code will require a Jserv/OC4J bounce to take effect, no model republish required
  5. Any code change will affect all published models using extension classes
  6. Any application in the EBIZ running on Jserv/OC4J will have access to all CZ Extension classes through java classpath
CZ Extension java classes uploaded through archive
  1. No changes required on middletier/unix box
  2. Classes are stored in binary format in database table
  3. Any change in CX requires archive upload on Configurator Model Development instance and ALL MODELS referring the archive needs to be published again,  no server bounce required
  4. Code change will be effective on model basis - whichever model is published will have new code.
  5. Only CZ models which are using the archive will have access to java classes, no other application of EBIZ will have access to these extension classes.
  6. These classes are loaded dynamically by Runtime Configurator 

Thursday, September 26, 2013

Configurator: Check for Model Logic Status using Plsql API

Sometimes its useful to find how many model's logic is not upto date using plsql API. One simple example would be for during republish of the model - if model logic is not upto date at the time of publication processing, publication program will fail and model will not be published. Following block can be handy before running any publication or locally creating configuration for the model using CIO API.

DECLARE
  p_model_id      NUMBER := 1774920;
  x_return_status VARCHAR2(10);
  x_msg_data      VARCHAR2(256);
BEGIN
  CZ_PB_MGR.IS_MODEL_UPTO_DATE( P_MODEL_ID =>p_model_id, X_RETURN_STATUS =>x_return_status, X_MSG_DATA =>x_msg_data);
  dbms_output.put_line('X_RETURN_STATUS = ' || X_RETURN_STATUS);
  dbms_output.put_line('X_MSG_DATA = ' || X_MSG_DATA);
END;

If x_return_status=1 then logic is not upto date, 0 value means logic is upto date.

Friday, August 30, 2013

BOM: Enable/Disable Bill Item Deletion Constraint

When we want to delete some times from BOM structure, we may get error that BOM is actively used in open orders and cannot be deleted. There are few constraints which restricts BOM item deletion. Once you get that constraint name, you can disable them temporarily from back-end using SQL queries and enable them again once deletion is complete. Of course it will create problems when the orders are referring them, but who cares when you are really in testing phase and want to delete few items from BOM before going live. This will be handy in such cases.

UPDATE  BOM_DELETE_SQL_STATEMENTS 
SET ACTIVE_FLAG=1
WHERE (SQL_STATEMENT_NAME LIKE 'CMP_CON5');

Set ACTIVE FLAG=1 for Enabling the constraint
Set ACTIVE FLAG=2 for Disabling the constraint
You can get sql_statement_name from the constraint error that you have received.

Saturday, July 13, 2013

Configurator: What is CZGOLD instance?

In Oracle Configurator world, CZGOLD terminology is coined very frequently by Oracle or experienced Configurator implementors and new guys are usually confused by this term.

CZGOLD is an instance strategy which many implementors may already be following in their implemention. CZGOLD is an instance where you import models from one BOM instance, do Configuration model development and publish to multiple different instances.

Not a picture perfect, but something similar to --

         <---------- IMPORT BOM -----<------------BOM INSTANCE
        /                                           ^
       /                                            |
CZGOLD/------->----PUBLISH BOM MODEL(Optional)--->-->
      \
       \
        \----->----PUBLISH BOM MODEL--->--ANOTHER BOM INSTANCE1
         \
          \---->----PUBLISH BOM MODEL-->--ANOTHER BOM INSTANCE2
           \
            \-->----PUBLISH BOM MODEL-->--ANOTHER BOM INSTANCE3


Benefit of having a dedicated CZ instance (CZGOLD) verses maintaining BOM/CZ along with your transactional data (Quote/OM) within a single instance:

Its always good to have a separate dedicated instance for CZ, usually referred as CZGOLD.

Configurator model development is different and standalone process. It does not have any need of transactional environment when BOM is already imported to CZ and until testing of the functionality is required in order line.
Configurator development environment will require exposure to testing of Java CX - which has killer ability to do server crash when its not fully tested or due to malfunction of code or inappropriate model setup. Definitely you would not prefer your transactional processing to be affected by model development/testing.

For Configurator development, you may need to expose unix box access, database access to Configurator model/CX developer.

When you have SR/issue in Configurator and Oracle gives fix for it, you may want to test it first in CZ test env, and not directly on the instance where transaction data is getting processed to ensure fix will work for you, and if any problem, you can report back to Oracle.

You will not prefer to affect transaction data processing performance with model development process. Keeping both of them on separate instance will be better utilization of resource and will avoid performance issues due to hardware bottleneck (agree that you need additional CZ instance but its worth doing it).

Usually companies maintain CZGOLD PROD and CZGOLD TEST instance. First do changes on Test instance and then migrate change on Prod. Now R12 Configurator has functionality called model migration, which makes it very easy to migrate model from one instance to another instance. Multiple divisions can work on their own CZGOLD Test instance and then finally migrate the model on CZGOLD Prod instance for model release.

Sunday, June 2, 2013

Configurator: Query to get list of published models

In Configurator publication target instance, we can use following query to get list of all models published to this instance which are currently active.

SELECT si.segment1 item_name, 
   mp.publication_id,
   mp.remote_publication_id,
   mp.model_id,
   mp.top_item_id,
   mp.organization_id,
   mp.last_update_date,
   mp.product_key,
   round((sysdate - mp.last_update_date), 2) as days_ago,
   round((sysdate - mp.last_update_date)*24, 2) as hours_ago,
   round((sysdate - mp.last_update_date)*24*60, 2) as mins_ago
FROM cz_model_publications mp,
   mtl_system_items_b si
WHERE 1 =1
   AND mp.top_item_id = si.inventory_item_id
   AND si.organization_id = mp.organization_id
   AND deleted_flag =0
   AND disabled_flag =0
   AND sysdate BETWEEN applicable_from AND applicable_until
   AND export_status ='OK'
   AND object_type ='PRJ'
   AND source_target_flag ='T'  --only target publications
   AND publication_mode ='p'  --list publications in Production model, replace with 't' for Test mode
   --and mp.server_id=1700  --you would need this if multiple sources were publishing to current instance in past
   --and round((sysdate - mp.last_update_date)*24, 2) < 5 --to restrict the result to last N days publications
   --and si.segment1 like 'Laptop55%' --uncomment to get details for specific models
ORDER BY last_update_date desc;

Saturday, May 11, 2013

Rename Item and Reflect change in Configurator

In  implementation, there would be scenarios when some items (option class/standard item/model) are named wrongly and need to be corrected. Usually the problem will worsen if the model is already imported into Configurator and there are lot of rules for that particular item. If you delete the item and create new one with correct name, next Configurator Model Refresh will cause issues for existing configurator rules for item. Rule will become invalid because its participant node would have been deleted. But there is a better simple alternate. Check following settings that will be helpful in similar scenarios.

Inventory Profile INV: Updateable Item Name
Oracle documentation says: This profile option controls whether the system enables you to change the item name after you save it. Setting the value to No prevents you from altering the item name after the initial save.
Inventory predefines a value of No for this profile option for all levels upon installation.
This profile option is updateable at all levels.

One more hurdle could be while refreshing the model in Configurator. Usually Configurator does not import/refresh item name change in Configurator Model.

Check following query.
select noupdate 
from cz_xfr_fields
where xfr_group='IMPORT' and dst_field='REF_PART_NBR';

If above query returns 1 means item name change import is not enabled. You can enable it by changing this field to 0 using following query.

update cz_xfr_fields
set noupdate=0
where xfr_group='IMPORT' and dst_field='REF_PART_NBR';

There are more parameters in this table cz_xfr_fields which can be of your interest depending on issue/requirement you have. Check it out by looking at all entries in this table.