Web Adi
Web Adi
html
We need to develop a new integrator which will be used to upload data into person EIT. Assume we have
defined one EIT to store Training test details in Oracle which was one of the important inputs for
Confirmation of employees. Creating data for each employee for each training using the seeded form was
a time consuming task and as a result of which we had provided them an excel interface to upload data
into system.
1.
1.
1. Business requirement
We need to develop a new integrator which will be used to upload data into person EIT.
2. Create the Wrapper Package
We will have to define/create a wrapper package which will act as middle layer between your ADI excel
sheet and Oracle to perform the desired action.
I have attached a sample code which will create record into EIT for your reference
create or replace PACKAGE xx_hr_webadi_pkg
AS
PROCEDURE upload_training_details (
p_employee_number VARCHAR2,
p_test_name VARCHAR2,
p_test_status VARCHAR2,
p_test_score VARCHAR2 DEFAULT NULL,
p_hear_rating VARCHAR2 DEFAULT NULL,
p_exam_date VARCHAR2 DEFAULT NULL,
p_exam_expiry_date VARCHAR2 DEFAULT NULL,
p_instruct_1 VARCHAR2,
p_instruct_2 VARCHAR2,
p_instruct_3 VARCHAR2,
p_instruct_4 VARCHAR2,
p_instruct_5 VARCHAR2,
p_instruct_6 VARCHAR2,
p_instruct_7 VARCHAR2 DEFAULT NULL,
p_instruct_8 VARCHAR2 DEFAULT NULL,
p_instruct_9 VARCHAR2 DEFAULT NULL,
p_instruct_10 VARCHAR2 DEFAULT NULL,
p_instruct_11 VARCHAR2 DEFAULT NULL,
p_instruct_12 VARCHAR2 DEFAULT NULL,
p_instruct_13 VARCHAR2 DEFAULT NULL,
p_instruct_14 VARCHAR2 DEFAULT NULL,
p_instruct_15 VARCHAR2 DEFAULT NULL,
p_instruct_16 VARCHAR2 DEFAULT NULL,
p_instruct_17 VARCHAR2 DEFAULT NULL,
p_instruct_18 VARCHAR2 DEFAULT NULL,
p_instruct_19 VARCHAR2 DEFAULT NULL,
p_instruct_20 VARCHAR2 DEFAULT NULL
);
END xx_hr_webadi_pkg;
/
Package Body Definition
create or replace PACKAGE BODY xx_hr_webadi_pkg
AS
PROCEDURE upload_training_details (
p_employee_number VARCHAR2,
p_test_name VARCHAR2,
p_test_status VARCHAR2,
p_test_score VARCHAR2 DEFAULT NULL,
p_hear_rating VARCHAR2 DEFAULT NULL,
p_exam_date VARCHAR2 DEFAULT NULL,
I have added these instruct parameter to add some instructions to my integrator. We will see the significance of it in
the later part of the document
p_exam_expiry_date VARCHAR2 DEFAULT NULL,
p_instruct_1 VARCHAR2,
p_instruct_2 VARCHAR2,
p_instruct_3 VARCHAR2,
p_instruct_4 VARCHAR2,
p_instruct_5 VARCHAR2,
p_instruct_6 VARCHAR2,
p_instruct_7 VARCHAR2 DEFAULT NULL,
p_instruct_8 VARCHAR2 DEFAULT NULL,
p_instruct_9 VARCHAR2 DEFAULT NULL,
p_instruct_10 VARCHAR2 DEFAULT NULL,
p_instruct_11 VARCHAR2 DEFAULT NULL,
p_instruct_12 VARCHAR2 DEFAULT NULL,
p_instruct_13 VARCHAR2 DEFAULT NULL,
p_instruct_14 VARCHAR2 DEFAULT NULL,
p_instruct_15 VARCHAR2 DEFAULT NULL,
p_instruct_16 VARCHAR2 DEFAULT NULL,
p_instruct_17 VARCHAR2 DEFAULT NULL,
p_instruct_18 VARCHAR2 DEFAULT NULL,
p_instruct_19 VARCHAR2 DEFAULT NULL,
p_instruct_20 VARCHAR2 DEFAULT NULL
)
IS
l_person_extra_info_id NUMBER;
l_object_version_number NUMBER;
l_information_type VARCHAR2 (100) := 'XX_TRAINING_DTLS';
l_person_id NUMBER;
l_error_flag VARCHAR2 (10) := 'NO';
e_emp_no_null EXCEPTION;
e_invalid_emp EXCEPTION;
e_year_null EXCEPTION;
BEGIN
IF p_employee_number IS NULL
THEN
l_error_flag := 'YES';
RAISE e_emp_no_null;
ELSE
BEGIN
SELECT person_id
INTO l_person_id
FROM per_all_people_f
WHERE employee_number = p_employee_number
AND business_group_id = fnd_global.per_business_group_id
AND TRUNC (SYSDATE) BETWEEN effective_start_date
AND effective_end_date;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
l_error_flag := 'YES';
RAISE e_invalid_emp;
END;
END IF;
IF l_error_flag = 'NO'
THEN
hr_person_extra_info_api.create_person_extra_info
(p_validate => FALSE,
p_person_id => l_person_id,
p_information_type => l_information_type,
p_pei_information_category => l_information_type,
p_pei_information1 => p_test_name,
p_pei_information2 => p_test_status,
p_pei_information4 => p_test_score,
p_pei_information5 => p_hear_rating,
p_pei_information6 => p_exam_date,
p_pei_information7 => p_exam_expiry_date,
p_person_extra_info_id => l_person_extra_info_id,
p_object_version_number => l_object_version_number
);
END IF;
EXCEPTION
WHEN e_emp_no_null
THEN
raise_application_error (-20000, 'Employee Number is a Mandatory Parameter.'
);
WHEN e_invalid_emp
THEN
raise_application_error (-20000, 'Employee Number provided doesnt exists,
Please check and reload.');
WHEN e_year_null
THEN
raise_application_error
(-20000, 'Test Name and Status parameter is Mandatory. Please re-enter and
upload again');
END upload_training_details;
END xx_hr_webadi_pkg;
/
Compile the Package and Body definition
Navigation -> Desktop Integrator -> Create Document -> Integrator -> HR Integrator Setup
HR Integrator setup is a pre-defined integrator which is provided by Oracle to create new custom
integrators
Content as None
Click on Create Document
Enter below Details and click on Oracle -> Upload available under toolbar
Filed Name Value
Metadata Type CREATE
Application Short Name PER
Integrator User Name XX - Upload Training Details
View Name
Form Name GENERAL
API Package Name XX_hr_webadi_pkg
API Procedure Name upload_training_details
Interface User Name XX - Upload Training Details
Interface Parameter List Name training_details
API Type PROCEDURE
The system will show a Confirmation stating the upload of definition is successful
4. Define the Layout for the integrator
Navigation -> Desktop Integrator -> Define Layout -> Select your custom integrator name
Click on Create and give a Layout name with some naming convention, which may be used later for
reference
The instruct parameters added in the wrapper package will be available during the Layout definition and we can add
user friendly tips which will be available for user reference
Click Next To define certain important layout features This functionality is available only to R12
users
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
Read Only Using this feature we can define that which of the columns in our integrator 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
Move Up/Down we can re-arrange the order of display of column in our integrator
Once you are done click on Apply to save the Layout definition, system will give a confirmation message
as below
Now you WEBADI will be available for use using seeded WEB ADI responsibility
Navigation -> Desktop Integrator-> Create Document -> Search for the custom integrator which you
created
Click next and click on create the document which will now download your custom integrator
Now this ADI is available for use under the seeded responsibility, In order to give the access of the same
to users through custom responsibility, follow the following steps:
1. Define the custom Form Function
Parameter -
bne:page=BneCreateDoc&bne:viewer=BNE:EXCEL2003&bne:reporting=N&bne:integrator=US
ER_NAME:XX - Upload Training Details&bne:noreview=Yes
Integrator user name can be derived from bne_integrators_vl table with help of following query:
Add, Prompt and Form function created and save. To check the availability of the function,
navigate to the responsibility where its been added
Click next and Create document and your custom integrator is available to user for uploading data
1.
1. Business Requirement
The Column prompts of any Custom integrator will have the names of the parameter which you have
used in the wrapper package. Most of the times these prompts are not user friendly and let say we have a
requirement to change the Column prompt to make them more users friendly. We can achieve it very
easily using the following steps:
2.
2. Setup Steps
Navigation -> Desktop Integrator -> Create Document
Select Integrator name as Web ADI Update Interface Column Prompts, this is a seeded integrator
provided by Oracle to change the prompts for any define integrator (we can also achieve this by doing an
update directly to base tables but that option is not a recommended one)
Click next and enter below details
Click next and click on create document this will download the Integrator data along with the prompts
which are currently in use for the integrator
Now remember the ADI which we had created in our earlier section
Now there is a requirement that we want to hide the prompts INSTRUCT and change the prompts like
EMPLOYEE_NUMBER to Employee Number, etc
I will be changing the Prompt left property for INSTRUCT to NULL and Prompt Above property of other
as per requirement.
Once done Upload the change prompt by using the Oracle -> Upload option in toolbar
1.3 Create the wrapper package to update the checklist task status 4
1.4 Define the Custom Integrator 5
1. PART 3 - Download/Upload
Integrator
1.
1. Business requirement
The business is using Checklist feature to track the tasks for on-boarding, confirmation, transfer
and Off-boarding. There are multiple stake-holders who play different roles in completion of the
entire process and HR centrally uses the checklist option to track the status of each of the tasks.
Now lets take an example of On-boarding and if there are 10 new joining then as per the
standard feature the system will send notification and mails to each task owner for each of these
new joinees. If as an HR person you are responsible for doing 3-4 on-boarding tasks, then the
system would have sent you 30-40 notification for action.
Pain Area Currently under Notification we cannot filter the Open notification based on
Employee or any particular date. Also, asking the user to go and click 30-40 notification one by
one and saying completed was a time consuming task. So the user asked us to build a mechanism
using which once they are done with the respective tasks, they should have an option to do mass
completion of the task
Based on this requirement we proposed an ADI which will allow user to automatically download
all the tasks which are still pending and user can mark the tasks which he/she has completed and
upload the status into system. This helped the users to mark the completion of the task easily
resulting in having the tracker updated
Prerequisites
2.
2. Create View to download the data in your
integrator
I have attached a sample view which will download all the tasks for which needs users action
CREATE OR REPLACE FORCE VIEW "APPS"."XX_INCOMPLETE_TASKS"
("EMPLOYEE_NUMBER", "FULL_NAME", "EMAIL_ADDRESS", "TASK_NAME",
"TARGET_START_DATE", "TARGET_END_DATE", "STATUS",
"ALLOCATED_TASK_ID") AS
select papf.employee_number
, papf.full_name
, papf.email_address
, pat.task_name
, pat.target_start_date
, pat.target_end_date
, pat.status
,pat.allocated_task_id
from per_allocated_checklists pac
, per_allocated_tasks pat
, per_all_people_f papf
where 1 = 1
and pac.allocated_checklist_id = pat.allocated_checklist_id
and pac.person_id = papf.person_id
and pat.status = 'INI'
and pat.performer_orig_sys_id = xx_hr_custom_pkg.get_user_person_id(fnd_global.user_id)
and trunc(sysdate) BETWEEN papf.effective_start_date and papf.effective_end_date
order by papf.employee_number;
3.
3. Create the wrapper package to update the checklist
task status
I have attached a sample code for procedure which updates the status of checklist task
PROCEDURE update_checklist_task_status(
p_status_pkg VARCHAR2
,p_allocated_task_id_pkg NUMBER
,p_instruct_2 VARCHAR2
,p_instruct_3 VARCHAR2
,p_instruct_4 VARCHAR2
,p_instruct_5 VARCHAR2
,p_instruct_6 VARCHAR2
,p_instruct_7 VARCHAR2 DEFAULT NULL
,p_instruct_8 VARCHAR2 DEFAULT NULL
,p_instruct_9 VARCHAR2 DEFAULT NULL
,p_instruct_10 VARCHAR2 DEFAULT NULL
,p_instruct_11 VARCHAR2 DEFAULT NULL
,p_instruct_12 VARCHAR2 DEFAULT NULL
,p_instruct_13 VARCHAR2 DEFAULT NULL
,p_instruct_14 VARCHAR2 DEFAULT NULL
,p_instruct_15 VARCHAR2 DEFAULT NULL
,p_instruct_16 VARCHAR2 DEFAULT NULL
,p_instruct_17 VARCHAR2 DEFAULT NULL
,p_instruct_18 VARCHAR2 DEFAULT NULL
,p_instruct_19 VARCHAR2 DEFAULT NULL
,p_instruct_20 VARCHAR2 DEFAULT NULL
)
AS
cursor c_get_task_details (c_allocated_task_id NUMBER)
IS
SELECT * FROM per_allocated_tasks
where allocated_task_id = c_allocated_task_id;
rec_task_details c_get_task_details%ROWTYPE;
l_object_version_number NUMBER;
begin
OPEN c_get_task_details(p_allocated_task_id_pkg);
FETCH c_get_task_details INTO rec_task_details;
l_object_version_number := rec_task_details.object_version_number;
CLOSE c_get_task_details;
PER_ALLOCATED_TASK_API.UPDATE_ALLOC_TASK
(p_effective_date => SYSDATE
,p_allocated_task_id => p_allocated_task_id_pkg
,p_allocated_checklist_id => rec_task_details.allocated_checklist_id
,p_task_name => rec_task_details.task_name
,p_performer_orig_sys_id => XX_hr_custom_pkg.get_user_person_id(fnd_global.user_id)
,p_target_start_date => rec_task_details.target_start_date
,p_target_end_date => rec_task_details.target_end_date
,p_status => p_status_pkg
,p_task_sequence => rec_task_details.task_sequence
,p_actual_start_date => rec_task_details.actual_start_date
,p_actual_end_date => rec_task_details.actual_end_date
,p_action_url => rec_task_details.action_url
,p_mandatory_flag => rec_task_details.mandatory_flag
,p_object_version_number => l_object_version_number
);
end update_checklist_task_status;
4.
4. Define the Custom Integrator
Navigation -> Desktop Integrator -> Create Document -> Integrator -> HR Integrator Setup
HR Integrator setup is a pre-defined integrator which is provided by Oracle to create new custom
integrators
Content as None
Click on Create Document
Enter below Details and click on Oracle -> Upload available under toolbar
5.
5. Define Integrator Mapping
This is very important step for a download/upload integrator. This is the step in which we tell the
system that which of the integrator columns get mapped to the wrapper package input parameter.
Navigation -> Desktop Integrator -> Define Mappings-> Select your custom integrator name
The system by default will have already created a mapping for you. We have an option of
deleting and creating a new one. But I have always use the same, so click on update to check the
mapping and make the changes as per you requirement
Once you are done with the mapping, Click on apply to save
6.
6. Define the Layout for the integrator
Once you are done with the mapping, define you layout of the integrator
Navigation -> Desktop Integrator -> Define Layout -> Select your custom integrator name
Click on Create and give a Layout name with some naming convention, which may be used later
for reference
The instruct parameters added in the wrapper package will be available during the Layout
definition and we can add user friendly tips which will be available for user reference
Click Next To define certain important layout features This functionality is available only to
R12 users
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
Read Only Using this feature we can define that which of the columns in our integrator
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
Move Up/Down we can re-arrange the order of display of column in our integrator
Once you are done click on Apply to save the Layout definition, system will give a confirmation
message as below
7.
7. Defining the Form Function for Integrator
Create a form function; please refer the earlier section which explains in detail how to create a
form function for your custom Integrator
8.
8. 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
Add, Prompt and Form function created and save. To check the availability of the function,
navigate to the responsibility where its been added
Click on the function and press continue to open your integrator and your custom integrator is
available to user for uploading data
You can see that all other columns apart from status column are available as read-only so that
users cant change any data for those columns. Now user can update the status of tasks which
he/she has completed and upload the data into Orcale.
2. Create a Letter Integrator as follows. N.B. Form Name must be set to LETTER.
1. Navigate to Oracle Web ADI responsibility.
5. Select Excel 2003 as viewer and uncheck the Reporting button as you will be uploading
a new integrator
definition to the database. Click on Next button.
6. Select the content as None and click on Next button.
7. On the review page, check the details and click on Create Document button.
8. A file download popup opens. Click on Open.
10. In the blank spreadsheet enter a value for each of the columns as follows. Remaining
columns are
blank for a download integrator.
Upl - ignore
Metadata Type Double click on the filed and Choose DOWNLOAD from list of
values.
13. Once the information successfully uploaded, you get the following confirmation message.
3. Navigate to Work Structures -> Recruitment Letter Type. Define a letter and link
it to Applicant Assignment Status - Accepted.
In this example, call the Letter, App. Letter Contract Site (must be same as layout
name), and associate it to the Accepted status.
Youll need to enter a concurrent program name even though it isnt used.
4. Now Define Layout, and select the fields that you wish to be included in the letter.
The Layout Name must be same as the Letter Type Name in 3. i.e. App. Letter
Contract Site.
1. Navigate to Oracle Web ADI Responsibility, Define Layout function.
2. Select the integrator Appointment Letter Contract Site and click on Go.
4. Enter the layout name same as the recruitment letter type, App. Letter Contract Site here
and click on Next.
5. Click on Select All to get all these information in your document
and click on apply.
5. Navigate to Recruitment -> Request Recruitment Letter. Enter Letter Name, and
pick in Applicants to generate
Appointment letters for. Save work. This will have created rows on the table
PER_LETTER_REQUEST_LINES, and
therefore the view, MBE_APP_LETTER_CONTRACT_SITE, should now pick up the
rows that Web ADI will
download to Word. Click on the export icon to download the information.
1. Navigate to Recruitment -> Request Recruitment Letter.
2. Select the letter type and applicants in the assignment status and
save the work. Click on the export icon.
3. Select the viewer as Word 2003 and check the Reporting option.
4. Click on Create Document on the review page.
7. Required information gets downloaded in the excel file. Save this as the data source
document such as
6. Create a Template Letter using Word, and associate this with the data source file saved
above.
1. Go to Mailings tab ->Start Mail Merge ->Step by Step Mail Merge
Wizard.
5. Select the sheet from the list. Check First row of data contains column headers.
6. It shows the rows of data. Select/deselect the ones as per your requirement.
7. Go to Mailings -> Insert Merged Field to select the fields you want in your letter.
8. Create the letter template and save it as a document, here in this case as App Letter
Contract Site.doc.
7. If you now upload the Template Letter document created in 6. to the database, the Mail
Merge process can be performed
seamlessly when clicking on the Export Data icon in the Request Recruitment Letter form.
1. Add the HRMS ADI Document Manager submenu to your Web ADI
menu and give it a prompt of Document Management.
2. Navigate to Oracle Web ADI -> Document Management -> Document
Management.
3. Click on Upload New Document button.
4. Browse the file from your local machine and select the category as Recruitment. Click on
Apply.
4. Click on the Link icon to link the document with this integrator.
5. Select the document from the list and click on the Select button.
3. Check the details in review page and click on Create Document button.
4. Downloads the letters for all selected applicants in the format below.
Setting in Excel for WebAdi :
3. Kindly click on Trust Center in Excel Option and then click on Trust Center
Setting Button
4. In This Select Macros Setting Option :
3. In this Enabled option for "Allow status bar updates via script"
3. Click on OK , It will show you warning message Click 'Yes' to change setting.
By using above two setup now we can use WebAdi functionality in Oracle apps.