Wednesday, July 25, 2012

Creating Inventory Items and Bills of material

interface tables for creating inventory and category.


MTL_SYSTEM_ITEMS_INTERFACE
MTL_ITEM_CATEGORIES_INTERFACE

apply below insert query to get your item details in to interface tables.

INSERT INTO inv.mtl_system_items_interface (TRANSACTION_TYPE,
                                            SEGMENT1,
                                            DESCRIPTION,
                                            TEMPLATE_NAME,
                                            CUSTOMER_ORDER_ENABLED_FLAG,
                                            ITEM_TYPE,
                                            CONFIG_MODEL_TYPE,
                                            COMMS_NL_TRACKABLE_FLAG,
                                            SERVICEABLE_PRODUCT_FLAG,
                                            SERV_REQ_ENABLED_CODE,
                                            SERIAL_NUMBER_CONTROL_CODE,
                                            ATTRIBUTE1,
                                            ATTRIBUTE2,
                                            ATTRIBUTE3,
                                            ATTRIBUTE4,
                                            ATTRIBUTE5,
                                            ATTRIBUTE6,
                                            ATTRIBUTE7,
                                            ATTRIBUTE8,
                                            ATTRIBUTE9,
                                            ATTRIBUTE10,
                                            ATTRIBUTE11,
                                            ATTRIBUTE12,
                                            ATTRIBUTE13,
                                            ATTRIBUTE14,
                                            ATTRIBUTE15,
                                            PROCESS_FLAG,
                                            CREATED_BY,
                                            ORGANIZATION_ID,
                                            SET_PROCESS_ID)
     VALUES ('CREATE',
             'your item name',
            'your item desc',
             'your template name',
             'Y',
             'PTO',
             '',
             'Y',
             'Y',
             'E',
             1,
             'N',
             'N',
             'name',
             '',
             '',
             'N',
             'IP',
             'Y',
             'Y',
             'Y',
             'code',
             'value',
             'value',
             '',
             'item_name',
             1,
             1052,
             value,
             1);



for creating category apply below query

INSERT INTO inv.MTL_ITEM_CATEGORIES_INTERFACE (TRANSACTION_TYPE,
                                               CATEGORY_SET_NAME,
                                               CATEGORY_NAME,
                                               ITEM_NUMBER,
                                               ORGANIZATION_ID,
                                               SET_PROCESS_ID,
                                               PROCESS_FLAG)
     VALUES ('CREATE',
             'set name',
             'name',
             'cat name',
             value,
             6,
             1);


Run Import Items concurrent program with the parameters

provide set_process_id as per your query.

inventory items and category should be created now.

Creating BOM

interface table

BOM_BILL_OF_MTLS_INTERFACE 
BOM_INVENTORY_COMPS_INTERFACE 

INSERT INTO BOM_BILL_OF_MTLS_INTERFACE (transaction_type,
                                        item_number,
                                        organization_code,
                                        process_flag)
     VALUES ('CREATE',
             'item name',
             'value',
             1);

create BOM component.




INSERT INTO bom_inventory_comps_interface (transaction_type,
                                           ASSEMBLY_ITEM_NUMBER,
                                           component_item_number,
                                           component_quantity,
                                           optional,
                                           effectivity_date,
                                           operation_seq_num,
                                           organization_code,
                                           process_flag)
     VALUES ('CREATE',
             'comp name',
             'item name',
             1,
             1,
             SYSDATE,
             1,
             'value',
             1);


run the concurrent programs for Bills.

it will create bills of material for your items.


Wednesday, May 9, 2012

Oracle Configurator

Topics to Learn in Oracle Configurator

Introduction
   
    Getting Started with Configurator Developer
   
Data

    Preparing Inventory Data
    Preparing BOM Model and Rule Data
    Importing Data
    Verifying Data

Model Structure

    About Configuration Models
    About Properties
    Creating Model Structure
    Working with Model Structure
    Testing Model Structure

Configuration Rules

    About Configuration Rules
    Rule Creation
    Logic Rules
    Testing Configuration Rules
    Numeric Rules
    Compatibility Rules
    Comparison Rules
    Statement Rules

Connectivity

    Connectivity and Network Models

User Interfaces

    About Configurator User Interfaces
    User Interface Templates
    Creating User Interfaces
    Testing User Interfaces
    Editing User Interfaces

Publishing

    Publishing Configuration Models

Configurator Extensions

    About Configurator Extensions
    Configurator Extension Programming
    Configurator Extension Archives
    Configurator Extension Rules
    Configurator Extension Event Bindings
    Configurator Extension Command Events

check my blog for more information.

Wednesday, March 28, 2012

Configurator: Add Infromation Message

Add below code to add information message to the page on some ac tion.

 InformationalMessage message= new InformationalMessage("message",runtimeNode);
        runtimeNode.getConfiguration().addInformationalMessage(message);


Tuesday, February 14, 2012

Redirect Configurator Extension to new Window

Use below method         
Attach it to the [on command] event of any button.

 public void generateOutput(IRuntimeNode rtNode, HttpServletResponse response)
 {
                        PrintWriter out = response.getWriter();
                        response.setContentType("text/html");
                        response.sendRedirect("www.google.com");
}


or you can embed HTML response in the page.

public void generateOutput(IRuntimeNode rtNode, HttpServletResponse response)
 {

                        PrintWriter out = response.getWriter();
                        response.setContentType("text/html");
                                     sHTML = "<html>\n" +
                                                            "<head>\n " +
                                                            "<title>Information</title><script language='javascript' type='text/javascript'>\n " +
                                                            "function closeWindow(){" +
                                                            "alert('closedd');" +
                                                            "}" +
                                                            "</script></head>\n " +
                                                            "<body onunload='closeWindow()'> " +
                                                            "</body>\n"+
                                                            "</html>\n";
                                                            out.println(sHTML);
}

Monday, February 13, 2012

Call oracle sql functions and procedures form the Java

Call function from the Java

     ConnectionManager cmCon;
     Connection connCon = null;
     CallableStatement cspro = null;
     cmCon = new ConnectionManager(rtNode);
     connCon = cmCon.getConnection();
       
    CallableStatement cs = connCon.prepareCall("{? = call fnd_request.submit_request(varchar2,number)}");
    cs.registerOutParameter(1, Types.INTEGER);
    cs.setString(2, "application name");
    cs.setInt(3, 896);
    cs.execute();
    requestId = cs.getString(1);


Call Procedure from a Java

CallableStatement cs = connection.prepareCall("call my_proc(?,?)");
cs.setString(1,"address");
cs.setInt(2,654);
cs.execute();

Thursday, February 9, 2012

set profile options from pl sql

Procedure to set the profile options form backend. PL SQL

create or replace procedure my_proc(profile_name varchar2,profile_value varchar2)
as
stat BOOLEAN;
begin
result:= fnd_profile.SAVE (profile_name, profile_value, 'USER',0);
--IF result THEN
--DBMS_OUTPUT.put_line ('result= TRUE - profile updated');
--ELSE
--DBMS_OUTPUT.put_line ('result= FALSE - profile NOT updated');
--END IF;
COMMIT;
end;



You can use below method also.


begin
APPS.FND_PROFILE.PUT('profile_name', profile_value);
end; 

Regards
Kaushal Bhati
kosal01bhati@gmail.com



Tuesday, February 7, 2012

Configurator Extension to get Profile Options

First create a profile option through Application Developer

DOWNLOAD Profile option

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct yourLdtfilename.ldt PROFILE PROFILE_NAME="your_profile_name" APPLICATION_SHORT_NAME="application_short_name"


UPLOAD Profile option

FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct yourLdtfilename.ldt

Use Below code to get the profile option value.

        String appsProfile = null;
        CZWebAppsContext ctx = (CZWebAppsContext)pRuntimeNode.getConfiguration().getContext();
        Profiles profiles = new Profiles(ctx);
        appsProfile = profiles.getSiteLevelProfile(profileName);
        if (appsProfile == null) {
          appsProfile = profiles.getProfile(profileName);
        }
        return appsProfile;




Email:kosal01bhati@gmail.com

Tuesday, January 31, 2012

TSO Configurator Extensions

CX that will Assign Line Type to the Quote According to the Properties that exists in the Configurator Structure.

Java class "AssignItemLineTypeCX" is used to assign Line Type to the Quote according to the Properties.

it is in the package oracle.apps.cz.cx.tso

Java class "CZIBAttributeCX" is used to create the IB Attributes of the BOM Item.

it is in the package oracle.apps.cz.cx.tso

Wednesday, January 25, 2012

Call Concurrent Program with Configurator Extension

First you need to intialize Apps parameter.

             CallableStatement cspro =
             connection.prepareCall("{call FND_GLOBAL.APPS_INITIALIZE(?,?,?)}");
             cspro.setString(1, "0");
             cspro.setString(2, "20420");
             cspro.setString(3, "1");
             cspro.executeUpdate();
             cspro.close();

After that Use ConcurrentRequest class to submit request from the you java class.

             ConcurrentRequest cr = new ConcurrentRequest(connection);
             int requestId = cr.submitRequest("Application Name",
"Prog short Name", "Prog Description", null, false, parameter in vector);
             System.out.println(requestId);

check the status of the concurrent program.


SELECT * FROM FND_CONCURRENT_REQUESTS WHERE   REQUEST_ID=your request id.



mail me for any further info.




Monday, January 16, 2012

Commands for Bouncing Apache after Change in Java file or Jserv.properties


first you have to stop the apache server.
$COMMON_TOP/admin/scripts/"your instance name"/adapcctl.sh stop

then you have to start the apache server.
$COMMON_TOP/admin/scripts/"your instance name"/adapcctl.sh start

your changes will be reflected now.

Configurator: Logic Rules


1. Relate model nodes on Side A to other model nodes on Side B using a logic relation
2. Logic rules determine logic state of model nodes
Logic Rules can impact both ways. Side 1 can impact the logic state of Side 2, and Side 2 can impact the logic state of Side 1.
Either side of the rule can contain one or more Features, Options, and more
 Available Logic Rules

Requires
Implies
Negates
Excludes
Defaults  
  
Requires
Imapct both ways. if you set either side to true or false, the other side is set to the same state.
Additionally, the selection of one item requires selection of another item.


 
Implies
 Sets up a one-way relationship. the selection of one item selects another item, but not the reverse.
 
  
Negates
Sets up a relationship that impacts both ways. If you set either side to True or False, the other
side is set to the opposite state. The selection of an item prohibits selection of another item.

 
  
Excludes
Sets up a one-way relationship.the selection of one item prohibits another item, but not the
reverse.


Defaults 
Sets a specified Feature or Option to true as a result of another
selection. A specified Feature or Option is set to true only if it is available.
Defaults rules are useful if you want to drive initial values at the beginning of a configuration
session from customer requirements selections

For Testing Above Rules,do not forget to Generate the Logic and Refreshing UI.


Thursday, January 12, 2012

CZ Tables and Description

CZ Table Name Descripton


cz_config_ext_attributes Store the Attributes which needs to be passed on to IB
cz_config_hdrs Stores the Header Information for a Configuration. 
cz_config_items Stores the each and every detail of the configuration. All the inv items, text features etc are stored in this table. It’s a Runtime table . 
cz_config_messages Store the messages associated with a configuration.
cz_db_logs Stores the errors occurred with doing a configuration. 
cz_db_setting Not to touch. Setup Table. Generally manipulation by CZ DBA.
cz_item_types Design time table, give the information about different types of Nodes. 
cz_model_publications  Stores the publications created for a configuration model. 
cz_ps_nodes Design time table, stores the node information, node linkages of a Model hierarchy.




http://www.indylogix.com