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