This document outlines the steps to create a value set in Oracle for organizations, add a new parameter to a concurrent program using that value set, and modify the executable to accept the new parameter. It includes detailed instructions on navigating the Oracle interface, entering necessary information, and testing the concurrent program to ensure it runs successfully with the new parameter. The process involves creating a value set, adding a parameter, modifying the package, and running the program to verify functionality.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views
Oracle Creating a Value Set
This document outlines the steps to create a value set in Oracle for organizations, add a new parameter to a concurrent program using that value set, and modify the executable to accept the new parameter. It includes detailed instructions on navigating the Oracle interface, entering necessary information, and testing the concurrent program to ensure it runs successfully with the new parameter. The process involves creating a value set, adding a parameter, modifying the package, and running the program to verify functionality.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
Creating a value set
In this recipe, we are going to add o parameter that uses a value set. A value set isa list of values ond they are.
commonly used to extend e-Business Suite and in this recipe we are going to create a value sot that is a
organizations.
‘We are going to perform the following tasks:
Create a value set
Create a new parameter for the concurrent program
Modiy th
xcutable to aecopt the new parameter
Run the concurrent program
Create a value set
‘Wo are now going to create the value sot that we will use as a Ist of values for our noxt parameter. The volue sot will
contain alist of organizations.
How to do it.
To create a value set complete the following tasks:
1. 1. Log in to Oracle with the Application Developer responsibility.
2, 2. Navigate to Application | Validation | Set, ond the Values Sets window will open as shown in the following
screenshot:
8. 8, Enter the following details as per the following tabl
Hom name Item value
Valve Set Name xHR_ORG_LIST_VS.
Description List of HR Organisations
List Type List of Values
Security Type No Seourity
Format Type Chartem name em value
Maximum Size 20
Validation Type Table
'4. 4. Click on the Edt Information button and the Validation Table Information form will appear, as shown in the
following sereenshot:
=
5. 5. Enter the following details as per the following tabl
tem name Value Type Ste
Tabie Human Resources
Application
Table Name ¥R_ALL_ORGANTZATION_UNITS
Value (ORGANTZATION_1D Varchan2 22
Meaning Nae Varchar2 248
1D ORGANIZATION_1D Number 22
Where/Order SVSOATE BETWEEN NVL(date_fron, SYSOATE) AND NVL
by (date_to, SYSDATE) ORDER BY nane
6. 6. Click on the Save button in the toolbar (or Ctrl+ $) to save the record.
7. 7-Click on the Test button to test the code entered.
How it works.
‘We have erected a lookup that we can use In our concurrent program when we define the next param:
will contain alist of organizations from the HR_ALL_ORGANIZATION_UNITS tabl
Thelist,
‘There's more.
‘We are just going to explore what happens to the information we store in this sereen and how It performs at
runtime.
‘What happens to the data entered?
Essentially this sereen dynamically creates en SOL statement which is used to generate the list of values. The table
columns region defines the values that are visible to the user and the value that Is passed to the concurrent
program. The ane value is what is displayed to the user. f there is no value entered for ID then itis passed as the
parameter value, otherwise the value in IDis passed. The ID field is hidden from the user. In addition, if the value sat
Is already used, that is, already mapped to a concurrent program, it cannot be modified.
Create a new parameter for the concurrent program
‘We are now going to add a new parameter and use the value set we have just created in the previous recipe,How to do it.
‘To create a new parameter, perform the following steps
41, 1. Log in to Oracle with the Application Developer responsiblity.
2. 2. Navigate te Concurrent | Program and the Concurrent Programs window will open.
3. 8. Pross the Fit key to enter a query.
‘4. 4. Query back the XXHR First Concurrent Program concurrent program and click the parameters button.
5. 5. Add a new parameter with the following details:
Rem name
Seq
Parameter
Description
Enablec
Value Set
Default Type
Required
Display
Display Size
Description Size
Concatenated Description Size
Prompt
Value
20
P_onG_10
Organization 1D
4
xh_ORG_LIST_VS
4
4
20
58
25
Organization
16. 6, Click the Save button in the toolbar (or Ctr/+ §) to save the record.
7. 7.The completed sereen wil look lie the following screenshot:
a etch ete
=|will use the list of
‘We have added a new parameter that will be passed to our concurrent program. The parame
organizations we created in the previous task. We must now add the parameter to the PL/SQL package, which we
will do next.
Modify the executable to accept the new parameter
‘Wo are now going to add the parameter to the executable, whichis the package called
YXHREESS..First_Concurrent_Progran. If you wish to view the code then it ean be found in the files
YOHREEBS_1_3.pks and XXHREEBS_1_3.pkb. You ean compile the package provided or add the parameter to the
code manually below.
How to do it
‘To add the parameter, take the following steps:
1. 1, Open SQL Developer and connect to the apps user
2. 2. Navigate to Packages and select the XXHREESS package.
3. 8.In the code editor, serall down the package specification until you reach the Firs
procedure definition.
Concurrent_Progras
'4. 4. Now add the parameter to the code AFTER the p_run_date parameter. The program dof
Tike the followin
PROCEDURE First_Concurrent_Progran (errbuf OUT VARCHAR2,
rretcode OUT NUMBER,
_run_date IN VARCHAR2,
_org_{d IN VARCHAR);
5. 5. Compile the package specification and ensure It compiles without error.
6. 6.Now we need to make the same addition to the package body. Open the package body.
7. 7.Serell down to the Finst_Concurrent_Program procedure definition and add p_org_id tothe list of
parameters, as shown inthe following code:
PROCEDURE First_Concurrent_Progran (errbuf OUT VARCHAR2,
retcode OUT NUMBER,
p_run.date IN VARCHAR2,
p_org_{d IN VARCHAR2) IS
8. 8. Compile the First_concurrent_Progran package body.
9. 9. The program specification will look lke the following:
10. 10. The program body will look like the following:
How it works.
‘We have now added the parameter p_org_id to the coneurrent program definition and also amended the code to
‘add the parameter to the package specification and body.
Run the concurrent program
Now we want to run the concurrent program testing that the concurrent program still runs successfully f the
‘organization parameter is pasted in
How to do it.
‘To test the changes perform the following:
4, 1+ Log in to Oracle with the XXEBS Extending e-Business Suite responsibility7,
2, Navigate to Submit Requests and submit single request.
3. Select the XXHR First Concurrent Program concurrent program and leave the Run Date parameter to the
dofault date (which is the current date).
4, Select an organization from thelist of values for the Organization parameter and than click OK,
5. Click on the Submit button ond when prompted to submit a new request, select No and the form will close
down.
6. Navigate to View Requests and click on the find button (to find all requests).
7. You should see thatthe concurrent program we have just submitted hos complated successfully, (Hii sil
Pending then clik the refresh button until the statu is Completed)
1 you now look at the following seraenshat at the raquest once it has completed, the parameters field has an extra
value which is the ID (your ID may well be different to the one In the screenshot dependent upon the organization
{you selected) of the parameter we have added:
How it works
‘We have tested that the parameter we have added has been passed to the procedure, We don't at present do
‘anything with it ut we just want to ensure that the organization identifier is being passed.
Unlock full access
Continue reading for free
stant online accoss to our brary of over 7000
1, constantly updated with the latest in toch
A Packt free tral gives you
practical eBooks and vi
tart a 7-day FREE trial