You are on page 1of 24

http://oracleapps88.blogspot.

com/ Raju Ch

Introduction:
There are basically two ways to enter data into Oracle: by typing it into a user interface (Java
Form or Web Page) or by taking a file and programmatically interfacing the data. Web ADI falls
into the second category in that it takes an Excel file and programmatically loads the data into
Oracle. If you find it easier to enter data into Excel than Oracle forms, you should look into
using Web ADI.

Downloading a Web ADI


The first step in downloading a template is to locate the responsibility and menu that is linked to

M
that template. Some templates can be downloaded from the Desktop Integration menu and
others must be downloaded from a specific responsibility. For security, some templates are
linked to specific responsibilities. For example, we can download the GL Journals template from O
.C
the Desktop Integration responsibility but we cant download the Project Transaction Import
template from the same responsibility.
T
To download a template you will use the following components: integrator, viewer, layout, and

O
content. Based on how the menu is setup, some of these components may default for you.

P
S
Integrator
The integrator defines what data you will be uploading to Oracle. Each integrator serves a
specific purpose and cannot be used to enter other data.
G
O
L
Viewer
The viewer is the Microsoft program you will use to enter data into the template

.B
8
Layout

8
The layout is how the data columns are organized on the template. You have two main sections
to a template: a header and lines. The header information applies to all the lines when the data is
uploaded to Oracle. S
P
Content
P
A
The content is a text file that you can import into your template. You can use this feature if you
have an external system that outputs text file and you want to import that into the template.
E
L
C
Pre-requisites for working on Development or use of WEBADIs

A 1.Check the value for profile option named BNE Allow No Security Rule and set the value to
Yes
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
2. Enable the Macros options for your excel sheet
8
8
S
P
P
A
E
L
C
A
R
O

Select Excel option to set the properties


http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
Click on Trust Centre -> Trust center Settings
O
L
Select Macro Settings -> Enable all macros and check the option Trust access to the VBA Project

.B
object model

8
8
S
P
P
A
E
L
C
A
R
O

Apply and save your settings


http://oracleapps88.blogspot.com/ Raju Ch

Assign responsibility Oracle WEBADI or Desktop Integrator to do the development of new


WEBADIs

Step by Step Procedure for Uploading data through Web ADI

Business requirement :

We need to insert a new supplier details through API in supplier table

M
Attached sample code for reference

CREATE OR REPLACE PACKAGE BODY APPS.xx_supplier_creation O


.C
AS
PROCEDURE supplier_import_pr (
p_vendor_number VARCHAR2,
T
p_vendor_name VARCHAR2,
O
P
p_enabled_flag VARCHAR2,

S
p_vendor_type_code VARCHAR2,
p_invoice_currency VARCHAR2,
p_payment_currency VARCHAR2,
G
O
p_term_id NUMBER,

L
p_payment_method VARCHAR2
)
AS
.B
8
l_vendor_rec ap_vendor_pub_pkg.r_vendor_rec_type;

8
-- l_vendor_rec l_vendor;
l_return_status VARCHAR (10);
l_msg_count NUMBER; S
l_msg_data
P
VARCHAR2 (240);
l_vendor_id
P
NUMBER;

A
l_party_id NUMBER;
error_exp EXCEPTION;
E
err_payment EXCEPTION;
BEGIN L
C
l_vendor_rec.segment1 := p_vendor_number;

A l_vendor_rec.vendor_name := p_vendor_name;
l_vendor_rec.ext_payee_rec.default_pmt_method := pi_payment_method;
R l_vendor_rec.enabled_flag := p_enabled_flag;
O l_vendor_rec.vendor_type_lookup_code := p_vendor_type_code;
l_vendor_rec.start_date_active := SYSDATE;
l_vendor_rec.invoice_currency_code := p_invoice_currency;
l_vendor_rec.terms_id := p_term_id;
l_vendor_rec.payment_currency_code := p_payment_currency;
fnd_msg_pub.initialize;
ap_vendor_pub_pkg.create_vendor (p_api_version => 1.0,
p_init_msg_list => 'F',
http://oracleapps88.blogspot.com/ Raju Ch

p_commit => 'F',


x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_vendor_rec => l_vendor_rec,
x_vendor_id => l_vendor_id,
x_party_id => l_party_id
);

If pi_payment_method NOT IN ('Check','Clearing','Electronic','Wire','Pre-Purchase M


Aggrement') O
.C
then
RAISE err_payment;
END IF;
T
O
P
IF l_return_status = 'E'

S
THEN
RAISE error_exp;
END IF;
G
O
L
EXCEPTION
WHEN err_payment
THEN
.B
8
raise_application_error ( -20000, 'Please check the Payment Method in the List of

8
values');
WHEN error_exp
THEN S
P
raise_application_error (-20000, l_msg_data);
WHEN OTHERS
P
A
THEN
raise_application_error (-20000, SQLERRM);
END; E
END; L
/
C
A
R 1. Creating Integrator:
O
Navigate to ResponsibilityHRMS Web ADICreate Document
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
In that select Integrator has HR Integrator SetupL
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Choose the Excel Options has 2003, 2007 etc which is relevant to your desktop

M
O
.C
T
O
P
S
G
O
L
.B
8
Select the Layout has Integrator Setup for creating new Integrator

8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Select the Content has NONE

M
O
.C
T
O
P
S
G
O
L
Then Select Create Document
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Give Open to open the file

M
O
.C
T
O
P
S
G
O
L
.B
8
Please wait until your document has been created

8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Now the document has been created, Click Close button

M
O
.C
T
O
P
S
G
O
L
.B
This is how the excel file looks like for creating integrator in this EXCEL sheet some of
8
the fields are LOV , to see which of the fields double click on the each column List of
Values will be displayed
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

By using WEB ADI we can Upload, Download and Update the records into the system.
We should create our custom integrator according to our business requirement. Here we
need to upload data so Choose CREATE has Metadata Type.

M
O
.C
T
O
P
S
G
O
L
.B
8 columns
8
Similarly enter the below details for other

S
Enter below Details and click on Oracle -> Upload available under toolbar

Filed Name PCREATE


Value
Metadata Type P CUSTOM
A
Application Short Name
E
Integrator User Name Supplier Details
View Name
L
API C
Form Name GENERAL

A
Package Name xx_supplier_creation
API Procedure Name supplier_import_pr
R Interface User Name Supplier Details
O Interface Parameter List Name Supplier_details
API Type PROCEDURE

Once you enter the details Go to AddInsOracleUpload


http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
Now you successfully created your Integrator.
L
.B
8
8
S
P
P
A
E
L
C
A
R
O

4. Define the Layout for the integrator


http://oracleapps88.blogspot.com/ Raju Ch

Navigation -> Desktop Integrator -> Define Layout -> Select your custom integrator
name

M
O
.C
T
O
P
S
G
O
L
.B
8
Click on Create for creating a new layout.

8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Give any name for the Layout

M
O
.C
T
O
P
S
G
O
L
.B
8
Now all the available fields will be displayed which has been used in the Procedure
parameters
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

The layout is divided into two important sections-


1. Required fields, where all mandatory parameters need to be aligned as per the
requirement.
Instruct parameters can be used to provide some tips to users who are using this
WEBADI for uploading data
2. Optional fields are non mandatory fields, we need to select the ones which needs to be
available in our custom integrator

M
Click Next To define certain important layout features This functionality is available only to
R12 users
O
.C
Data Entry Rows Using this property we can define the default number of rows which
the ADI will create when initialized, in 11i we user had to insert the new row in case of
access data
T
O
Read Only Using this feature we can define that which of the columns in our integrator

P
will be available as read only
Width Using this option we can define the width of each of the columns which will be
available under the custom ADI S
G
Move Up/Down we can re-arrange the order of display of column in our integrator

O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
Layout is Successfully Created
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
Now you WEBADI will be available for use using seeded WEB ADI responsibility
8
Navigation -> Desktop Integrator-> Create Document -> Search for the custom integrator
which you created
8
S
P
Click next and click on create the document which will now download your custom
integrator
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
Click on Create Document and please wait till the document has been created.

.B
Our document has been created with the needed fields
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Once the document has been created, please enter the details for creating new vendor.
We can also create exception in the procedure for validating any of the data.
For example

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
In the above example Payment method should be entered only within the mentioned list ,
which we described in the procedure. If user enters any of the other values it has been
P
captured and the error message has been notified to user for that particular row
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
Now the error has been cleared by changing the payment type has Check and

1 Row has been successfully uploaded


8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

We can check the inserted row in the below table

AP_SUPPLIERS or PO_VENDORS(View)

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
Pbe derived from bne_integrators_vl table with help of following
P
Integrator user name can
query:
A
E
L select integrator_code, user_name
C where 1 = 1
from bne_integrators_vl
A
R
and user_name like 'Supplier%Details'
order by creation_date desc
O 5.Defining the Form Function for Integrator

1. Define the custom Form Function

Navigation -> Application Developer -> Application -> Function


http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
Type - SSWA servlet function
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Parameters
bne:page=BneCreateDoc&bne:viewer=BNE:EXCEL2007&bne:reporting=N&bne:integr
ator=USER_NAME:Supplier Details&bne:noreview=Yes

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Save it.

6. Assign Function to Custom Menu


Go and add the function into the custom responsibility
Navigation-> Application Developer -> Application -> Menu -> Search for your menu
where you want to add this ADI

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
Now you can Navigate to your custom responsibility to see the ADI which you have

L
assigned.

CClick next and Create document and your custom integrator is available to user for
A uploading data

R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O

You might also like