You are on page 1of 4

This document should be used to develop custom integrators.

Custom integrators will be used for a case of having a requirement of launching an excel template from apps and fill the values in the excel file and we will get an option to upload the values into the database table. At the time of uploading the data we can define that where the data should go and we can manipulate the entered data and insert into the database table.

Develop an Integrator for your own excel template and assign it to the user.

<!--[if !supportLists]-->2) <!--[endif]-->User login and launch the excel from Web ADI and enters
the values in excel directly (he can enter the values, choose the values from Poplist or List of Values.

<!--[if !supportLists]-->3) <!--[endif]-->Choose oracle->upload option in excel and upload the


data into the database. When the data gets uploads you can write a PL/SQL to insert the data directly into database or you can do some process of the entered data and then update the database table accordingly.

. Creation of the custom integrator Usage of custom integrator Custom integrator will be used to upload the excel values into database tables. For Example the user wants to upload the data from an excel sheet with a formatted way, and when it uploads the data should be validated and should be returned back if any error occurs or data should do some other calculation with other tables, that can be done. The template excel can have defaulted values, LOV values and POPList values to select the values. Once we have the custom integrator we can define as a function and assign to the FND_USER.

Steps to create the custom integrator. Step 1. Using bne_integrator_utils.CREATE_INTEGRATOR package create the custom integrator Step 2. Using bne_integrator_utils.CREATE_INTERFACE_FOR_API package create the interface for the created integrator. Step 3. Using bne_integrator_utils.CREATE_DEFAULT_LAYOUT package create the default layout for the created integrator with the interface. Step 4. Adding POPList for the required columns. Step 5. Change the excel column prompts, by default the column headers will come as Database column name.

Now lets see the above steps in detail Step 1. Create Integrator Using the standard package bne_integrator_utils.CREATE_INTEGRATOR we can create the integrator, with the following parameters, PROCEDURE CREATE_INTEGRATOR (P_APPLICATION_ID IN NUMBER, P_OBJECT_CODE IN VARCHAR2, P_INTEGRATOR_USER_NAME IN VARCHAR2,

P_LANGUAGE IN VARCHAR2, P_SOURCE_LANGUAGE IN VARCHAR2, P_USER_ID IN NUMBER, P_INTEGRATOR_CODE OUT NOCOPY VARCHAR2); P_APPLICATION_ID --Is the application Id of the application where we are going to create the integrator. --Use the query, SELECT application_id FROM fnd_application WHERE application_short_name = '<CUSTOM_SHORT_NAME>'; P_OBJECT_CODE Integrator Code, which will be used internally. P_INTEGRATOR_USER_NAME Integartor Name, which will be displayed in the application. P_LANGUAGE, P_SOURCE_LANGUAGE are the language codes, (US for english). P_USER_ID FND_USER id, (0 for sysadmin) P_INTEGRATOR_CODE Return parameter, which will be used for the furter steps.

Step 2. Create Interface PROCEDURE CREATE_INTERFACE_FOR_API ( P_APPLICATION_ID IN NUMBER, P_OBJECT_CODE IN VARCHAR2, P_INTEGRATOR_CODE IN VARCHAR2, P_API_PACKAGE_NAME IN VARCHAR2, P_API_PROCEDURE_NAME IN VARCHAR2, P_INTERFACE_USER_NAME IN VARCHAR2, P_PARAM_LIST_NAME IN VARCHAR2, P_API_TYPE IN VARCHAR2, P_API_RETURN_TYPE IN VARCHAR2 DEFAULT NULL, P_UPLOAD_TYPE IN NUMBER, P_LANGUAGE IN VARCHAR2, P_SOURCE_LANG IN VARCHAR2, P_USER_ID IN NUMBER, P_PARAM_LIST_CODE OUT NOCOPY VARCHAR2, P_INTERFACE_CODE OUT NOCOPY VARCHAR2); P_APPLICATION_ID Application Id, which we are creating the custom integrator. P_OBJECT_CODE Interface Code for internal use. P_INTEGRATOR_CODE Code for the integrator, which we created in the step1. P_API_PACKAGE_NAME - When the user uploads the excel sheet this package being called. P_API_PROCEDURE_NAME - When the user uploads the excel sheet this procedure being called. In this procedure the columns will be mapped with the excel sheet. From this procedure the data needs to be inserted into the database table. P_INTERFACE_USER_NAME Name of the Interface, which we are creating now. P_PARAM_LIST_NAME - Parameter list. P_API_TYPE - API type, PROCEDURE or FUNCTION. P_API_RETURN_TYPE - What is being returned from the API P_UPLOAD_TYPE Type of upload, (Set to 0, 1 or 2. 0 = Custom Upload Type (uses BNE_INTERFACES_B.UPLOAD_OBJ_NAME to obtain class name to load). 1= upload to Table. 2 = Upload to PL/SQL API) P_LANGUAGE, P_SOURCE_LANG - Language being used in the upload(US-English) P_USER_ID - User Id for the reference (0 Sysadmin) P_PARAM_LIST_CODE - Return code for the parameter list. P_INTERFACE_CODE - Return code for the created Integrator.

Step 3. Creating default layout. PROCEDURE CREATE_DEFAULT_LAYOUT ( P_APPLICATION_ID IN NUMBER, P_OBJECT_CODE IN VARCHAR2, P_INTEGRATOR_CODE IN VARCHAR2, P_INTERFACE_CODE IN VARCHAR2, P_USER_ID IN NUMBER, P_FORCE IN BOOLEAN, P_ALL_COLUMNS IN BOOLEAN, P_LAYOUT_CODE IN OUT NOCOPY VARCHAR2); P_APPLICATION_ID Application Id, which we are creating the custom integrator. P_OBJECT_CODE Default Layout code, for internal use. P_INTEGRATOR_CODE - Integrator code which we have created in the step1. P_INTERFACE_CODE - Interface code, which we have created in the step2. P_USER_ID - User Id (0 Sysadmin) P_FORCE - If the layout name exists over write or error out(true or false).. P_ALL_COLUMNS - Layout to be created for all the columns (true or false). P_LAYOUT_CODE - Out parameter for the created default layout.

Step 4. Creating POPLIST for the required columns. Now we are ready with the custom integrator, if we want to create POPLIST, User hint for any of the created integrator columns, use the following sql, Create POPLIST for a column UNIT_OF_MEASURE UPDATE bne_interface_cols_b SET val_id_col = 'UNIT_OF_MEASURE', val_mean_col = 'UNIT_OF_MEASURE', val_type = 'TABLE', lov_type = 'POPLIST', val_obj_name = 'MTL_UNITS_OF_MEASURE_VL', val_addl_w_c = 'DISABLE_DATE > sysdate or DISABLE_DATE is null' WHERE interface_col_name = 'P_UNIT_OF_MEASURE' AND application_id = lc_application_id_result AND interface_code = lc_interface_code; val_obj_name is the table name where the values should come from and val_addl_w_c is the where clause for the POPLIST restriction. Check bne_integrator_utils for more details about creating LOV, Calender LOV and Chapter 5 of Web ADI Integrator Developers Guide for Java LOV. Adding User Hints UPDATE bne_interface_cols_tl SET user_hint = '*(Eg.Miscellaneous)' WHERE prompt_left IN ('CATEGORY_NAME')

AND application_id = <CUSTOM_APPLICATION_ID> AND interface_code = <CREATED_INTERFACE_CODE>;

Step 5. Changing the PROMPTS for the columns UPDATE bne_interface_cols_tl SET prompt_above = 'Item Description', prompt_left = 'Item Description' WHERE prompt_above = 'ITEM_DESCRIPTION' AND application_id = lc_application_id_result AND interface_code = lc_interface_code; bne_interface_cols_tl, bne_interface_cols_b are the main tables used for the above changes and for holding integrators info.

You might also like