SlideShare ist ein Scribd-Unternehmen logo
1 von 286
AppsLead for Consultation and Training
January 16th
, 2013
www.AppsLead.com
Oracle Applications Framework Business Cases
Cell phone 002/010 900 160 23
Prepared By: Mostafa El-Roby
We guide you to the right
path in Oracle
Applications
2013
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
OAF Hello World Tutorial
Create OAF Search Page
Create Auto Customization Criteria OAF Search Page
Clear/ Reset Result Table of Search page in OAF
Create Data Entry OAF Page
Update Records in OAF Page
Create and Update on one click in OA Framework
Delete records in OAF Page
Implement Master Detail Relationship in OAF Page
Working with Key Flex Fields in OAF
Implement Dependent LOV in OAF
Implement External LOV in OAF
Set default Value for messageTextInput item
Implement PopList in OA Framework
Partial Page Rendering in OAF
Execute parameterized PL SQL procedure from OAF page
Implement Train in OAF Page
D2k to OAF Transformation
Call D2K Form from OAF Page
Call OAF Page From D2K Form
Get Host Name and URL of OAF Page
OAF Page to Upload Files into Server from Local Machine
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Deploy JAR File into R12 in OA Server
Import Data from Excel sheet to DB Table
Import Data from *.xlsx file to DB Table
Deploy OAF page
Bounce Apache Server
Enable Personalization Link for OAF Pages
Enable Personalization Link for OAF Pages
Deploy JAR File into R12 in OA Server
Controller Extension in OAF
Application Module Extension in OAF
EO based VO Extension in OAF
Entity Object Extension in OAF
OA Framework Best Practices
OAException Message and Dialog Page in OA Framework
Deploying OAF Personalizations Using the Import/Export Command Line Tools
Best Blog :-
1- http://iwidi.org/index.php/oaf
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Basic Installation Steps -
1. Download JDeveloper 10.1.3.3.0. Available Oracle patch is
p8431482_R12_GENERIC.zip
Unzip the patch p8431482_R12_GENERIC.zip i.e. in D:
2. Specify the path of jdev in following location
My Computer>Properties>Advanced>Environment Variables as given below screen
shot
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
3. Download dbc file of Oracle application instance from $FND_TOP/secure
( it is like a tnsnames.ora file having connection detail )
Place the file at location
D:p8431482_R12_GENERICjdevhomejdevdbc_filessecure
4. Open JDeveloper and set database connection goto Connection Navigator > Database
and create a new connection
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Note Give user name and password do not give any role and do not check Deploy
Password checkbox
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Note Give Host Name, JDBC port, and SID. Keep driver as thin.
Now JDeveloper is ready to use
5. Create a sample workspace and project to know setting during creation of project
1. Goto Application Navigator right click > New > General > Workspace
Configured for Oracle Applications
2. Give workspace name
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
3. Give project name and Default package
Note Default package is
<3rd
party identifier>.oracle.apps.<application_short_name>.<component>.
[<subcomponent>]
Example: mycompany.oracle.apps.po.requisition.webui
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
4. Give database connection detail
5. Give your dbc file location, application username, application password,
application short name, and responsibility key
i.e. Application short key and responsibility key is nothing but assigned
responsibility detail to the application user for example if application user has
System Administrator responsibility then Application short name will be
“SYSADMIN” and responsibility key will be “SYSTEM_ADMINISTRATOR”.
These values are required to compile and run the page because page required
context during run time so it will login the application with given username
and password and it will take context from assigned responsibility
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
6. Click Next. Creation of Workspace and project has finished
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
OAF Hello World Tutorial
1. Create a New OA Workspace and Empty OA Project
File> New > General> Workspace Configured for Oracle Applications
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
2. Set Run Options in OA Project Setting
Select Your Project in the Navigator and choose Project Properties
Select Oracle Applications > Run Options
Select OADeveloperMode and OADiagnostic, and move them to selected Options List
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
3. Create Application Module AM
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
4. Create a OA components Page
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
5. Modify the Page Layout (Top-level) Region
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Attribute Property
ID PageLayoutRN
Region Style pageLayout
Form Property True
Auto Footer True
Window Title Hello World Window Title
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Title Hello World Page Header
AM Definition prajkumar.oracle.apps.ak.hello.server.HelloAM
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
6. Create the Second Region (Main Content Region)
Attribute Property
ID MainRN
Region Style messageComponentLayout
7. Create the first Item (Empty Field)
MainRN > New > messageTextInput
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Attribute Property
ID HelloName
Style Property messageTextInput
Prompt Name
Length 20
Maximum Length 50
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
8. Create a container Region for Go-Button
MainRN > messageLayout
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Attribute Property
ID ButtonLayout
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
9. Create a Second Item (Go Button)
Select ButtonLayout > New > Item
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Attribute Property
ID Go
Item Style submitButton
Attribute /oracle/apps/fnd/attributesets/Buttons/Go
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
10. Save Your Work
11. Run Your Page UI is ready
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
12. Add a Controller
MainRN > Set New Controller
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
13. Edit Your Controller
Add Following OA Exception as a last line in import section
import oracle.apps.fnd.framework.OAException;
Add Following Code in processFormRequest
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("Go") != null)
{
String userContent = pageContext.getParameter("HelloName");
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
String message = "Hello, " + userContent + "!";
throw new OAException(message, OAException.INFORMATION);
}
}
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
14. Build Your Controller
15. Test Your Work Your Hello World Page is Ready
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Create OAF Search Page
1. Create a New Workspace and Project
Right click Workspaces and click create new OAworkspace and name it as
PRajkumarSearch. Automatically a new OA Project is also created. Name the project as
SearchDemo and package as prajkumar.oracle.apps.fnd.searchdemo
2. Create a New Application Module (AM)
Right Click on SearchDemo > New > ADF Business Components > Application Module
Name -- SearchAM
Package -- prajkumar.oracle.apps.fnd.searchdemo.server
3. Enable Passivation for the Root UI Application Module (AM)
Right Click on SearchAM > Edit SearchAM > Custom Properties >
Name – RETENTION_LEVEL
Value – MANAGE_STATE
Click add > Apply > OK
4. Create Test Table and insert data some data in it (For Testing Purpose)
CREATE TABLE xx_search_demo
( -- --------------------
-- Data Columns
-- --------------------
column1 VARCHAR2(100),
column2 VARCHAR2(100),
-- --------------------
-- Who Columns
-- --------------------
last_update_date DATE NOT NULL,
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
last_update_login NUMBER
);
INSERT INTO xx_search_demo VALUES (‘val1’, ’val2’, SYSDATE, 0, SYSDATE, 0, 0);
INSERT INTO xx_search_demo VALUES (‘val1’, ’val2’, SYSDATE, 0, SYSDATE, 0, 0);
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
INSERT INTO xx_search_demo VALUES (‘val3’, ’val4’, SYSDATE, 0, SYSDATE, 0, 0);
INSERT INTO xx_search_demo VALUES (‘val5’, ’val6’, SYSDATE, 0, SYSDATE, 0, 0);
Now we have 4 records in our custom table
5. Create a New Entity Object (EO)
Right click on SearchDemo > New > ADF Business Components > Entity Object
Name – SearchEO
Package -- prajkumar.oracle.apps.fnd.searchdemo.schema.server
Database Objects -- XX_SEARCH_DEMO
Note – By default ROWID will be the primary key if we will not make any column to be
primary key Check the Accessors, Create Method, Validation Method and Remove
Method
6. Create a New View Object (VO)
Right click on SearchDemo > New > ADF Business Components > View Object
Name -- SearchVO
Package -- prajkumar.oracle.apps.fnd.searchdemo.server
In Step2 in Entity Page select SearchEO and shuttle them to selected list
In Step3 in Attributes Window select columns Column1, Column2 and shuttle them to
selected list
In Java page Select Generate Java file for View Object Class: SearchVOImpl and Generate
Java File for View Row Class: SearchVORowImpl
7. Add Your View Object to Root UI Application Module
Select Right click on SearchAM > Edit SearchAM > Data Model >
Select SearchVO and shuttle to Data Model list
8. Create a New Page
Right click on SearchDemo > New > Web Tier > OA Components > Page
Name -- SearchPG
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Package -- prajkumar.oracle.apps.fnd.searchdemo.webui
9. Select the SearchPG and go to the strcuture pane where a default region has been
created
10. Select region1 and set the following properties:
ID -- PageLayoutRN
Region Style -- PageLayout
AM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM
Window Title -- Search Page Window
Title -- Search Page
Auto Footer -- True
11. Add a Query Bean to Your Page
Right click on PageLayoutRN > New > Region
Select new region region1 and set following properties
ID – QueryRN
Region Style – query
Construction Mode – resultBasedSearch
Include Simple Panel – True
Include Views Panel – True
Include Advanced Panel – True
12. Add a Result Data Table to your QueryRN
Select QueryRN right click > New > Region using Wizard
In BC4J Objects page, Select your SearchAM and then select your SearchVO1
Note – DO NOT select Use this as Application Module Definition for this
region checkbox
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
In Region Properties page, set Region ID value to ResultsTable and Region
Style to table
In view Attributes page, select attributes from Available View Attributes list and shuttle
them to
Selected View Atributes list:
Column1
Column2
In Region Items Page, you can set ID, Style and Attributes Set. Currently we are going to
set only Style as messageStyledText
13. Set and verify Your Results Table Region Properties
ID – ResultsTable
Region Style – table
AM – Please Donot put any AM
Rendered – True
Records Displayed – 10
Width – 100%
User Personalization – True
14. Set or Verify Column1 Item Properties
Search Allowed -- True
Sort Allowed – ascending
Initial Sort Seqence – first
Selective Search Criteria – True
User Personalization – True
15. Set or Verify Column2 Item Properties
Search Allowed – True
Sort Allowed -- ascending
Selective Search Criteria – True
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
User Personalization – True
16. Congratulation you have successfully finished Search page. Run Your SearchPG
page and Test Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Create Auto Customization Criteria OAF Search Page
1. Create a New Workspace and Project
Right click Workspaces and click create new OAworkspace and name it as
PRajkumarCustSearch. Automatically a new OA Project will also be created. Name the
project as CustSearchDemo and package as prajkumar.oracle.apps.fnd.custsearchdemo
2. Create a New Application Module (AM)
Right Click on CustSearchDemo > New > ADF Business Components > Application
Module
Name -- CustSearchAM
Package -- prajkumar.oracle.apps.fnd.custsearchdemo.server
3. Enable Passivation for the Root UI Application Module (AM)
Right Click on CustSearchAM > Edit SearchAM > Custom Properties >
Name – RETENTION_LEVEL
Value – MANAGE_STATE
Click add > Apply > OK
4. Create Test Table and insert data some data in it (For Testing Purpose)
CREATE TABLE xx_custsearch_demo
( -- ---------------------
-- Data Columns
-- ---------------------
column1 VARCHAR2(100),
column2 VARCHAR2(100),
column3 VARCHAR2(100),
column4 VARCHAR2(100),
-- ---------------------
-- Who Columns
-- ---------------------
last_update_date DATE NOT NULL,
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
last_update_login NUMBER
);
INSERT INTO xx_custsearch_demo
VALUES('v1','v2','v3','v4',SYSDATE,0,SYSDATE,0,0);
INSERT INTO xx_custsearch_demo
VALUES('v1','v3','v4','v5',SYSDATE,0,SYSDATE,0,0);
INSERT INTO xx_custsearch_demo
VALUES('v2','v3','v4','v5',SYSDATE,0,SYSDATE,0,0);
INSERT INTO xx_custsearch_demo
VALUES('v3','v4','v5','v6',SYSDATE,0,SYSDATE,0,0);
Now we have 4 records in our custom table
5. Create a New Entity Object (EO)
Right click on SearchDemo > New > ADF Business Components > Entity Object
Name – CustSearchEO
Package -- prajkumar.oracle.apps.fnd.custsearchdemo.schema.server
Database Objects -- XX_CUSTSEARCH_DEMO
Note – By default ROWID will be the primary key if we will not make any column to be
primary key
Check the Accessors, Create Method, Validation Method and Remove Method
6. Create a New View Object (VO)
Right click on CustSearchDemo > New > ADF Business Components > View Object
Name -- CustSearchVO
Package -- prajkumar.oracle.apps.fnd.custsearchdemo.server
In Step2 in Entity Page select CustSearchEO and shuttle them to selected list
In Step3 in Attributes Window select columns Column1, Column2, Column3, Column4,
and shuttle them to selected list
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
In Java page deselect Generate Java file for View Object Class: CustSearchVOImpl and
Select Generate Java File for View Row Class: CustSearchVORowImpl
7. Add Your View Object to Root UI Application Module
Select Right click on CustSearchAM > Application Modules > Data Model
Select CustSearchVO and shuttle to Data Model list
8. Create a New Page
Right click on CustSearchDemo > New > Web Tier > OA Components > Page
Name -- CustSearchPG
Package -- prajkumar.oracle.apps.fnd.custsearchdemo.webui
9. Select the CustSearchPG and go to the strcuture pane where a default region has
been created
10. Select region1 and set the following properties:
ID -- PageLayoutRN
Region Style -- PageLayout
AM Definition -- prajkumar.oracle.apps.fnd.custsearchdemo.server.CustSearchAM
Window Title – AutoCustomize Search Page Window
Title – AutoCustomization Search Page
Auto Footer -- True
11. Add a Query Bean to Your Page
Right click on PageLayoutRN > New > Region
Select new region region1 and set following properties
ID – QueryRN
Region Style – query
Construction Mode – autoCustomizationCriteria
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Include Simple Panel – False
Include Views Panel – False
Include Advanced Panel – False
12. Create a New Region of style table
Right Click on QueryRN > New > Region Using Wizard
Application Module – prajkumar.oracle.apps.fnd.custsearchdemo.server.CustSearchAM
Available View Usages – CustSearchVO1
In Step2 in Region Properties set following properties
Region ID – CustSearchTable
Region Style – Table
In Step3 in View Attributes shuttle all the items (Column1, Column2, Column3,
Column4) available in “Available View Attributes” to Selected View Attributes:
In Step4 in Region Items page set style to “messageStyledText” for all items
13. Select CustSearchTable in Structure Panel and set property Width to 100%
14. Include Simple Search Panel
Right Click on QueryRN > New > simpleSearchPanel
Automatically region2 (header Region) and region1 (MessageComponentLayout Region)
created
Set Following Properties for region2
Id – SimpleSearchHeader
Text -- Simple Search
15. Now right click on message Component Layout Region (SimpleSearchMappings)
and create two message text input beans and set the below properties to each
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Message TextInputBean1
Id – SearchColumn1
Search Allowed – True
Data Type – VARCHAR2
Maximum Length –
CSS Class – OraFieldText
Prompt – Column1
Message TextInputBean2
Id – SearchColumn2
Search Allowed -- True
Data Type – VARCHAR2
Maximum Length – 100
CSS Class – OraFieldText
Prompt – Column2
16. Now Right Click on query Components and create simple Search Mappings. Then
automatically SimpleSearchMappings and QueryCriteriaMap1 created
17. Now select the QueryCriteriaMap1 and set the below properties
Id – SearchColumn1Map
Search Item – SearchColumn1
Result Item – Column1
18. Now again right click on simpleSearchMappings -> New -> queryCriteriaMap, and
then set the below properties
Id – SearchColumn2Map
Search Item – SearchColumn2
Result Item – Column2
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
19. Congratulation you have successfully finished Auto Customization Search page.
Run Your CustSearchPG page and Test Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Clear/ Reset Result Table of Search page in OAF
Normally problem faced by developers after creating Search Page is how to Clear/
Reset Result Table when developer open search page first time or after search when
developer redirecting back to same search page from any other page (say delete page
or update page)
Add following Code in your Search page Controller where you have constructed your
Query Region
import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean;
...
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
OAQueryBean queryBean =
(OAQueryBean)webBean.findChildRecursive("QueryRN");
// Here QueryRN is your Query Region Name as shown in following snap shot
queryBean.clearSearchPersistenceCache(pageContext);
}
Note –
After add this code, no need to worry about state of Application Module (AM). This code
will clean up result table automatically every time when you will open Search page first
time and when you are redirecting back to search page. But still as per good coding
standard while redirecting back to search page always keep AM state to FALSE
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Create Data Entry OAF Page
By PRajkumar on Apr 22, 2012
1. Create a New Workspace and Project
Right click Workspaces and click create new OAworkspace and name it as
PRajkumarInsert. Automatically a new OA Project is also created. Name the project as
InsertDemo and package as prajkumar.oracle.apps.fnd.insertdemo
2. Create a New Application Module (AM)
Right Click on InsertDemo > New > ADF Business Components > Application Module
Name -- InsertAM
Package -- prajkumar.oracle.apps.fnd.insertdemo.server
3. Enable Passivation for the Root UI Application Module (AM)
Right Click on InsertAM > Edit InsertAM > Custom Properties >
Name – RETENTION_LEVEL
Value – MANAGE_STATE
Click add > Apply > OK
4. Create Test Table in which we will insert data (For Testing Purpose)
CREATE TABLE xx_insert_demo
( -- ---------------------
-- Data Columns
-- ---------------------
column1 VARCHAR2(100),
column2 VARCHAR2(100),
-- ---------------------
-- Who Columns
-- ---------------------
last_update_date DATE NOT NULL,
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
last_update_login NUMBER
);
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
5. Create a New Entity Object (EO)
Right click on InsertDemo > New > ADF Business Components > Entity Object
Name – InsertEO
Package -- prajkumar.oracle.apps.fnd.insertdemo.schema.server
Database Objects -- XX_INSERT_DEMO
Note – By default ROWID will be the primary key if we will not make any column to be
primary key.
Check the Accessors, Create Method, Validation Method and Remove Method
6. Create a New View Object (VO)
Right click on InsertDemo > New > ADF Business Components > View Object
Name -- InsertVO
Package -- prajkumar.oracle.apps.fnd.insertdemo.server
In Step2 in Entity Page select InsertEO and shuttle them to selected list
In Step3 in Attributes Window select columns Column1, Column2 and shuttle them to
selected list
In Java page deselect Generate Java file for View Object Class: InsertVOImpl and Select
Generate Java File for View Row Class: InsertVORowImpl
7. Add Your View Object to Root UI Application Module
Right click on InsertAM > Edit InsertAM > Data Model >
Select InsertVO in Available View Objects list and shuttle to Data Model list
8. Create a New Page
Right click on InsertDemo > New > Web Tier > OA Components > Page
Name -- InsertPG
Package -- prajkumar.oracle.apps.fnd.insertdemo.webui
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
9. Select the InsertPG and go to the strcuture pane where a default region has been
created
10. Select region1 and set the following properties:
ID -- PageLayoutRN
Region Style -- PageLayout
AM Definition -- prajkumar.oracle.apps.fnd.insertdemo.server.InsertAM
Window Title -- Date Entry Page Window
Title -- Data Entry Page
Auto Footer -- True
11. Right click PageLayoutRN > New > Region
ID -- MainRN
Region Style -- defaultSingleColumn
12. Create Text Input Items
Right click on MainRN > New > Item
Set following properties for New Item
ID -- COLUMN1
Item Style -- messageTextInput
Maximum Length -- 100
Length -- 20
Prompt -- Column1
View Instance -- InsertVO1
View Attribute -- Column1
Again Right click on MainRN > New > Item
Set following properties for New Item
ID -- COLUMN2
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Item Style -- messageTextInput
Maximum Length -- 100
Length -- 20
Prompt -- Column2
View Instance -- InsertVO1
View Attribute – Column2
13. Add Apply and Cancel Buttons
Right click on PageLayoutRN > New > Region
ID -- PageButtons
Region Style -- pageButtonBar
Right click on PageButtons > New > Item
ID -- Cancel
Item Style -- submitButton
Attribute Set -- /oracle/apps/fnd/attributesets/Buttons/Cancel
Disable Server Side Validation -- True
Prompt -- Cancel
Warm About Changes -- False
Additional Text – Select to cancel this transaction.
Right click on PageButtons > New > Item
ID -- Apply
Item Style -- submitButton
Attribute Set -- /oracle/apps/fnd/attributesets/Buttons/Apply
Prompt -- Apply
Additional Text – Select to save this transaction.
14. Implement Row Initialization (Create a View Object Row)
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Add createRecord method to your InsertAMImpl class
import oracle.jbo.Row;
import oracle.apps.fnd.framework.OAViewObject;
...
public void createRecord()
{
OAViewObject vo = (OAViewObject)getInsertVO1();
if (!vo.isPreparedForExecution())
{
vo.executeQuery();
}
Row row = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
}
15. Create Controller for Page
PageLayoutRN > Set New Controller >
Package Name: prajkumar.oracle.apps.fnd.insertdemo.webui
Class Name: InsertCO
16. Add Create Page Initialization to your Controller
Add following code to your processRequest()
import oracle.apps.fnd.framework.OAApplicationModule;
...
public void processRequest(OAPageContext pageContext,OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
if (!pageContext.isFormSubmission())
{
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("createRecord", null);
}
}
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
17. Add below method in InsertAMImpl Class to handle Apply Button action
import oracle.jbo.Transaction;
...
public void apply()
{
getTransaction().commit();
}
18. Add below Logic in InsertCO to handle Apply Button
Add following code to your processFormRequest()
import oracle.jbo.domain.Number;
import oracle.apps.fnd.common.MessageToken;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
...
public void processFormRequest(OAPageContext pageContext, OAWebBean
webBean)
{super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
// Pressing the "Apply" button means the transaction should be
// validated and committed.
if (pageContext.getParameter("Apply") != null)
{
OAViewObject vo = (OAViewObject)am.findViewObject("InsertVO1");
String column1 = (String)vo.getCurrentRow().getAttribute("Column1");
String column2 = (String)vo.getCurrentRow().getAttribute("Column2");
am.invokeMethod("apply");
// Create a FND Message with name "TEST_CREATE_CONFIRM" with two
// tokens
MessageToken[] tokens = { new MessageToken("COLUMN1", column1),
new MessageToken("COLUMN2", column2)
};
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
OAException confirmMessage = new OAException( "FND",
"TEST_CREATE_CONFIRM", tokens,
OAException.CONFIRMATION, null);
pageContext.putDialogMessage(confirmMessage);
pageContext.forwardImmediately(
"OA.jsp?page=/prajkumar/oracle/apps/fnd/insertdemo/webui/InsertPG",
null, OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
}
}
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
19. Congratulations you have successfully created data insert page. Run InsertPG page
to test Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Update records in OAF Page
1. Create a Search Page to Create a page please go through the following link
https://blogs.oracle.com/prajkumar/entry/create_oaf_search_page
2. Implement Update Action in SearchPG
Right click on ResultTable in SearchPG > New > Item
Set following properties for New Item
Attribute Property
ID UpdateAction
Item Style image
Image URI updateicon_enabled.gif
Atribute Set /oracle/apps/fnd/attributesets/Buttons/Update
Prompt Update
Additional Text Update record
Height 24
Width 24
Action Type fireAction
Event update
Submit True
Parameters Name – PColumn1
Value -- ${oa.SearchVO1.Column1}
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Name – PColumn2
Value -- ${oa.SearchVO1.Column2}
3. Create a Update Page
Right click on SearchDemo > New > Web Tier > OA Components > Page
Name – UpdatePG
Package – prajkumar.oracle.apps.fnd.searchdemo.webui
4. Select the UpdatePG and go to the strcuture pane where a default region has been
created
5. Select region1 and set the following properties:
Attribute Property
ID PageLayoutRN
Region Style PageLayout
AM Definition prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM
Window Title Update Page Window
Title Update Page
Auto Footer True
6. Create the Second Region (Main Content Region)
Select PageLayoutRN right click > New > Region
ID – MainRN
Region Style – messageComponentLayout
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
7. Create first Item (Empty Field)
MainRN > New > messageTextInput
Attribute Property
ID Column1
Style Property messageTextInput
Prompt Column1
Data Type VARCHAR2
Length 20
Maximum Length 100
View Instance SearchVO1
View Attribute Column1
8. Create second Item (Empty Field)
MainRN > New > messageTextInput
Attribute Property
ID Column2
Style Property messageTextInput
Prompt Column2
Data Type VARCHAR2
Length 20
Maximum Length 100
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
View Instance SearchVO1
View Attribute Column2
9. Create a container Region for Apply and Cancel Button in UpdatePG
Select MainRN of UpdatePG
MainRN > messageLayout
Attribute Property
Region ButtonLayout
10. Create Apply Button
Select ButtonLayout > New > Item
Attribute Property
ID Apply
Item Style submitButton
Attribute /oracle/apps/fnd/attributesets/Buttons/Apply
11. Create Cancel Button
Select ButtonLayout > New > Item
Attribute Property
ID Cancel
Item Style submitButton
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Attribute /oracle/apps/fnd/attributesets/Buttons/Cancel
12. Add Page Controller for SearchPG
Right Click on PageLayoutRN of SearchPG > Set New Controller
Name – SearchCO
Package -- prajkumar.oracle.apps.fnd.searchdemo.webui
Add Following code in Search Page controller SearchCO
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");
queryBean.clearSearchPersistenceCache(pageContext);
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if ("update".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?
page=/prajkumar/oracle/apps/fnd/searchdemo/webui/UpdatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
13. Add Page Controller for UpdatePG
Right Click on PageLayoutRN of UpdatePG > Set New Controller
Name – UpdateCO
Package -- prajkumar.oracle.apps.fnd.searchdemo.webui
Add Following code in Update Page controller UpdateCO
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.OAApplicationModule;
import java.io.Serializable;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
String Column1 = pageContext.getParameter("PColumn1");
String Column2 = pageContext.getParameter("PColumn2");
Serializable[] params = { Column1, Column2 };
am.invokeMethod("updateRow", params);
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("Apply") != null)
{
am.invokeMethod("apply");
pageContext.forwardImmediately("OA.jsp?
page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
false, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
}
else if (pageContext.getParameter("Cancel") != null)
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
{
am.invokeMethod("rollback");
pageContext.forwardImmediately("OA.jsp?
page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
false, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
}
}
14. Add following Code in SearchAMImpl
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
public void updateRow(String Column1, String Column2)
{
SearchVOImpl vo = (SearchVOImpl)getSearchVO1();
vo.initQuery(Column1, Column2);
}
public void apply()
{
getTransaction().commit();
}
public void rollback()
{
getTransaction().rollback();
}
15. Add following Code in SearchVOImpl
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
public void initQuery(String Column1, String Column2)
{
if ((Column1 != null) && (!("".equals(Column1.trim()))))
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
{
setWhereClause("column1 = :1 AND column2 = :2");
setWhereClauseParams(null); // Always reset
setWhereClauseParam(0, Column1);
setWhereClauseParam(1, Column2);
executeQuery();
}
}
16. Congratulation you have successfully finished. Run Your Search page and Test
Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Create and Update on one click in OA Framework
We will try to implement Search Page with one text item as ID. Based on ID
control will go to second page. Second page contain three text rows. ID will be
displayed on second page as Styled Text in all three rows
If match will be found based on ID then search result will come. If not found then
empty rows will come. Based on that new data can be inserted there and existing
data can be updated directly with one button click ‘Apply’
1. Create a New Workspace and Project
Right click Workspaces and click create new OAworkspace.
File Name – PrajkumarSearch
Project Name -- SearchDemo
package -- prajkumar.oracle.apps.fnd.searchdemo
2. Create a New Application Module (AM)
Right Click on SearchDemo > New > ADF Business Components > Application Module
Name -- SearchAM
Package -- prajkumar.oracle.apps.fnd.searchdemo.server
3. Enable Passivation for the Root UI Application Module (AM)
Right Click on SearchAM > Edit SearchAM > Custom Properties >
Name – RETENTION_LEVEL
Value – MANAGE_STATE
Click add > Apply > OK
4. Create Test Table and insert data some data in it (For Testing Purpose)
CREATE TABLE xx_create_upd_demo
( -- ---------------------
-- Data Columns
-- ----------------------
column1 VARCHAR2(100),
column2 VARCHAR2(100),
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
column3 VARCHAR2(100),
column4 NUMBER,
-- ---------------------
-- Who Columns
-- ---------------------
last_update_date DATE NOT NULL,
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
last_update_login NUMBER
);
5. Create a New Entity Object (EO)
Right click on SearchDemo > New > ADF Business Components > Entity Object
Name – SearchEO
Package -- prajkumar.oracle.apps.fnd.searchdemo.schema.server
Database Objects -- xx_create_upd_demo
Note – By default ROWID will be the primary key if we will not make any column to be
primary key.
Check the Accessors, Create Method, Validation Method and Remove Method
6. Create a New View Object (VO)
Right click on SearchDemo > New > ADF Business Components > View Object
Name -- SearchVO
Package -- prajkumar.oracle.apps.fnd.searchdemo.server
In Step2 in Entity Page select SearchEO and shuttle them to selected list
In Step3 in Attributes Window select columns Column1, Column2, Column3, Column4
and shuttle them to selected list
In Java page select Generate Java File for View Object Class: SearchVOImpl and Generate
Java File for View Row Class: SearchVORowImpl
7. Add Your View Object to Root UI Application Module
Select Right click on SearchAM > Application Modules > Data Model >
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Select SearchVO and shuttle to Data Model list
8. Create a New Page
Right click on SearchDemo > New > Web Tier > OA Components > Page
Name -- SearchPG
Package -- prajkumar.oracle.apps.fnd.searchdemo.webui
9. Select the SearchPG and go to the strcuture pane where a default region has been
created
10. Select region1 and set the following properties:
ID – PageLayoutRN
Scope -- Public
Region Style -- PageLayout
AM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM
Window Title –Page Window
Title – Page Header
Auto Footer – True
11. Create the Second Region (Main Content Region)
ID – MainRN
Region Style -- messageComponentLayout
Auto Footer – True
12. Create the first Item (Empty Field)
MainRN > New > messageTextInput
Set Following properties for new item
ID – MyId
Style Property – messageTextInput
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Prompt – Id
Data Type – Number
Length – 20
Maximum Length – 100
13. Create a container Region for Go-Button
MainRN > messageLayout
Set ID -- ButtonLayout
14. Create a Item (Go Button)
Select ButtonLayout > New > Item
ID – Go
Item Style – submitButton
Attribute -- /oracle/apps/fnd/attributesets/Buttons/Go
15. Create a New Second Page
Right click on SearchDemo > New > Web Tier > OA Components > Page
Name -- CreateUpdPG
Package -- prajkumar.oracle.apps.fnd.searchdemo.webui
16. Select the CreateUpdPG and go to the strcuture pane where a default region has
been created
17. Select region1 and set the following properties:
ID – PageLayoutRN
Scope -- Public
Region Style -- PageLayout
AM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM
Window Title –Page Window
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Title – Page Header
Auto Footer – True
18. Create the Second Region (Main Content Region)
ID – MainRN
Region Style -- table
Auto Footer – True
Records Displayed – 3
19. Create the first Item (Empty Field)
MainRN > New > item
Set Following properties for new item
ID – Column1
Style Property – messageTextInput
Prompt – Column1
Data Type – VARCHAR2
Length – 20
Maximum Length – 100
View Instance -- SearchVO1
View Attribute -- Column1
Create Second Item
MainRN > New > item
Set Following properties for new item
ID – Column2
Style Property – messageTextInput
Prompt – Column2
Data Type – VARCHAR2
Length – 20
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Maximum Length – 100
View Instance -- SearchVO1
View Attribute -- Column2
Create Third Item
MainRN > New > item
Set Following properties for new item
ID – Column3
Style Property – messageTextInput
Prompt – Column3
Data Type – VARCHAR2
Length – 20
Maximum Length – 100
View Instance -- SearchVO1
View Attribute -- Column3
Create Fourth Item
MainRN > New > item
Set Following properties for new item
ID – Column4
Style Property – messageStyledText
Prompt – Column4
Data Type – NUMBER
View Instance -- SearchVO1
View Attribute -- Column4
20. Add Controller for Page SearchPG Select PageLayoutRN right click Set
New Controller
Package Name -- prajkumar.oracle.apps.fnd.searchdemo.webui
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Class Name -- SearchCO
Add Following code in that controller
import com.sun.java.util.collections.HashMap;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("Go") != null)
{
String userContent = pageContext.getParameter("MyId");
HashMap hmap = new HashMap();
hmap.put("MyId", userContent);
pageContext.setForwardURL(
"OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/CreateUpdPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hmap,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}
21. Add Return Link to come back to SearchPG from CreateUpdPG
Select CreateUpdPG in Structure Panel Select PageLayoutRN > New > returnNavigation
ID – ReturnLink
Destination URI – OA.jsp?
page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG&retainAM=Y
Text – Return to SearchPG
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
22. Add pageButtonBar region to implement Apply Button
Right click on PageLayout > New > Region
Set following properties for new region
ID -- ButtonBar
Region Style – pageButtonBar
Select ButtonBar right click > New > Item
Select newly created item and set following properties –
ID – Apply
Item Style – submitButton
Attribute Set -- /oracle/apps/fnd/attributesets/Buttons/Apply
23. Add Controller for Page CreateUpdPG Select PageLayoutRN right click Set
New Controller
Package Name -- prajkumar.oracle.apps.fnd.searchdemo.webui
Class Name -- CreateUpdCO
Add Following code in that controller
import java.io.Serializable;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{ super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
String val = pageContext.getParameter("MyId");
Serializable[] params = { val };
am.invokeMethod("createRow", params);
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{ super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
if (pageContext.getParameter("Apply") != null)
{ am.getTransaction().commit();
pageContext.setForwardURL(
"OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}
24. Add Following code in SearchAMImpl.java
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.Row;
public void createRow(String Val)
{
SearchVOImpl vo = getSearchVO1();
vo.initQuery(Val);
int rowCount = vo.getRowCount();
if ( rowCount < 3 )
{
for(int i = 3; i != rowCount ; rowCount++)
{
Row studrow = vo.createRow();
vo.last();
vo.next();
vo.insertRow(studrow);
vo.setCurrentRow(studrow);
vo.getCurrentRow().setAttribute("Column4",Val);
studrow.setNewRowState(Row.STATUS_INITIALIZED);
}
}
}
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
25. Add Following code in SearchVOImpl.java
import oracle.jbo.domain.Number;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
public void initQuery(String Val)
{
if ((Val != null) && (!("".equals(Val.trim()))))
{
// Do the following conversion for type consistency.
Number Val2 = null;
try
{
Val2 = new Number(Val);
}
catch(Exception e)
{
throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
}
setWhereClause("Column4 = :1");
setWhereClauseParams(null); // Always reset
setWhereClauseParam(0, Val2);
executeQuery();
}
}
26. Congratulation you have successfully finished. Run Your SearcgPG page and Test
Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Delete Records in OAF Page
1. Create a Search Page to Create a page please go through the following link
https://blogs.oracle.com/prajkumar/entry/create_oaf_search_page
2. Implement a Delete in your SearchEOImpl Class
public void remove()
{ super.remove();
} // end remove()
3. Create a Delete Image
Select ResultsTable right click > New > Item
Set following properties for New Item
ID – DeleteAction
Item Style – image
Image URI – deleteicon_enabled.gif
Atribute Set -- /oracle/apps/fnd/attributesets/Buttons/Delete
Prompt -- Delete
Additional Text – Delete record action enabled
Height – 24
Width – 24
Action Type – fireAction
Event – delete
Submit – True
Select Parameter Properties define parameter name as Column1 and whose value is
${oa.SearchVO1.Column1}
Select Parameter Properties define parameter name as Column2 and whose value is
${oa.SearchVO1.Column2}
Select OK button to create your request parameters
4. Add Page Controller
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Add a New Contoller for SearchPG
Name – SearchCO
Package -- prajkumar.oracle.apps.fnd.searchdemo.webui
Implement Delete Action
5. Add deleteRecord() method to SearchAMImpl
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.domain.Number;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
import oracle.jbo.RowSetIterator;
...
public void deleteRecord(String Column1)
{ OAViewObject vo = (OAViewObject)getSearchVO1();
SearchVORowImpl row = null;
int fetchedRowCount = vo.getFetchedRowCount();
RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
if (fetchedRowCount > 0)
{ deleteIter.setRangeStart(0);
deleteIter.setRangeSize(fetchedRowCount);
for (int i = 0; i < fetchedRowCount; i++)
{
row = (SearchVORowImpl)deleteIter.getRowAtRangeIndex(i);
row.remove();
getTransaction().commit();
break;
}
}
deleteIter.closeRowSetIterator();
} // end deleteRecord
Note – Create Standard FND Messages DELETE_RECORD_WARN and
DELETE_CONFIRM
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
6. Add DeleteSelection Handler Code to SearchCO.processFormRequest()
import com.sun.java.util.collections.HashMap;
import oracle.apps.fnd.framework.webui.OADialogPage;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.common.MessageToken;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.OAApplicationModule;
...
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vo =(OAViewObject)am.findViewObject("SearchVO1");
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
String rowRef =
pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFEREN
CE);
OARow row = (OARow)am.findRowByRef(rowRef);
if ("delete".equals(pageContext.getParameter(EVENT_PARAM)))
{
String Column1 = (String)row.getAttribute("Column1");
String Column2 = (String)row.getAttribute("Column2");
String Column3 = pageContext.getParameter("Column1");
String Column4 = pageContext.getParameter("Column2");
MessageToken[] tokens = { new MessageToken("COLUMN1", Column1),
new MessageToken("COLUMN2", Column2)};
OAException mainMessage = new OAException("FND",
"DELETE_RECORD_WARN", tokens);
OADialogPage dialogPage = new OADialogPage(OAException.WARNING,
mainMessage, null, "", "");
String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
dialogPage.setOkButtonItemName("DeleteYesButton");
dialogPage.setOkButtonToPost(true);
dialogPage.setNoButtonToPost(true);
dialogPage.setPostToCallingPage(true);
dialogPage.setOkButtonLabel(yes);
dialogPage.setNoButtonLabel(no);
java.util.Hashtable formParams = new java.util.Hashtable(1);
formParams.put("Column1", Column3);
formParams.put("Column2", Column4);
dialogPage.setFormParameters(formParams);
pageContext.redirectToDialogPage(dialogPage);
}
7. Add Delete Confirmation Handler Code to SearchCO.processFormRequest()
import java.io.Serializable;
import oracle.apps.fnd.framework.OAApplicationModule;
...
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
else if (pageContext.getParameter("DeleteYesButton") != null)
{
String Column1 = (String)row.getAttribute("Column1");
String Column2 = (String)row.getAttribute("Column2");
Serializable[] parameters = { Column1 };
OAApplicationModule am =
pageContext.getApplicationModule(webBean);
am.invokeMethod("deleteRecord", parameters);
OAException message = new OAException("FND",
"DELETE_CONFIRM", null,
OAException.CONFIRMATION, null);
pageContext.putDialogMessage(message);
}
8. Congratulation you have successfully finished. Run Your page and Test Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Implement Master Detail Relationship in OAF Page
Let us try to implement Master Detail Relationship in advanceedTable. We will create
two tables master table and child table. Both have relationship with each other with
Column1
(Note - Column1 is a primary key in both tables)
1. Create a New OA Workspace and Empty OA Project
File> New > General> Workspace Configured for Oracle Applications
File Name -- MasterDetailProj
Project Name – MasterDetailDemo
Default Package -- prajkumar.oracle.apps.fnd.masterdetaildemo
2. Create Application Module AM
MasterDetailDemo right click > New > ADF Business Components > Application
Module
Name -- MasterdetailDemoAM
Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server
Check Generate JavaFile(s)
3. We need two tables one table will be act as Master table and second table
will be act as Child or detail table. Lets Create two tables
-- Master Table
CREATE TABLE master_table_demo
( -- ---------------------
-- Data Columns
-- ---------------------
Column1 VARCHAR2(100),
Column2 VARCHAR2(100),
-- ----------------------
-- Who Columns
-- ----------------------
last_update_date DATE NOT NULL,
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
last_update_login NUMBER
);
-- Detail Table
CREATE TABLE detail_table_demo
( -- ---------------------
-- Data Columns
-- ---------------------
Column1 VARCHAR2(100),
Column2 VARCHAR2(100),
-- ----------------------
-- Who Columns
-- ----------------------
last_update_date DATE NOT NULL,
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
last_update_login NUMBER
);
Note – Consider Master Table is Linked to Detail Table with Column1
4. Lets put some data in the tables
-- Insert Data into Master Table
INSERT INTO master_table_demo VALUES ( ‘VAL1’, ‘VAL2’, SYSDATE, 0, SYSDATE,
0, 0);
INSERT INTO master_table_demo VALUES ( ‘VAL3’, ‘VAL4’, SYSDATE, 0, SYSDATE,
0, 0);
-- Insert Data into Detail Table
INSERT INTO detail_table_demo VALUES ( ‘VAL1’, ‘VAL6’, SYSDATE, 0, SYSDATE, 0,
0);
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
INSERT INTO detail_table_demo VALUES ( ‘VAL3’, ‘VAL8’, SYSDATE, 0, SYSDATE, 0,
0);
5. Create a New Entity Object (EO) for Master Table
Right click on MasterDetailDemo > New > ADF Business Components > Entity Object
Name – MasterEO
Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.schema.server
Database Objects -- master_table_demo
Note -- Make Column1 as a primary key
Check the Accessors, Create Method, Validation Method and Remove Method
6. Create a New Entity Object (EO) for Detail Table
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Right click on MasterDetailDemo > New > ADF Business Components > Entity Object
Name – DetailEO
Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.schema.server
Database Objects -- detail_table_demo
Note -- Make Column1 as a primary key
Check the Accessors, Create Method, Validation Method and Remove Method
Note – Column1 in both tables is common Column to make parent child
relationship
7. Lets Create View Object for Master Table
Right click on MasterDetailDemo > New > ADF Business Components > View Object
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Name -- MasterVO
Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server
In Step2 in Entity Page select MasterEO and shuttle them to selected list
Create transient item by clicking on New
Name – DetailFlag
Type -- Boolean
In Step3 in Attributes Window select columns Column1, Column2, DetailFlag and
shuttle them to selected list
In Java page deselect Generate Java file for View Object Class: MasterVOImpl
8. Lets Create View Object for Detail Table
Right click on MasterDetailDemo > New > ADF Business Components > View Object
Name -- DetailVO
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server
In Step2 in Entity Page select DetailEO and shuttle them to selected list
In Step3 in Attributes Window select columns Column1, Column2 and shuttle them to
selected list
In Java page deselect Generate Java file for View Object Class: DetailVOImpl
9. Create View Link Add Your View Object to Root UI Application Module
Right click on MasterDetailDemo > New > ADF Business Components > View Link
Name – MasterdetailDemoVL
Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
10. Add Your View Object to Root UI Application Module
Right click on MasterdetailDemoAM > Application Modules > Data Model >
Select MasterVO, DetailVO via ViewLink, DetailVO and shuttle to Data Model list
11. Create a New Page
Right click on MasterdetailDemo > New > Web Tier > OA Components > Page
Name -- MasterdetailDemoPG
Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.webui
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
12. Select MasterdetailDemoPG and go to the strcuture pane where a default region
has been created
13. Select region1 and set the following properties:
ID -- PageLayoutRN
Region Style -- PageLayout
AM Definition --
prajkumar.oracle.apps.fnd.masterdetaildemo.server.MasterdetailDemoAM
Window Title – Master Detail Demo Page Window
Title – Master Detail Demo Page Header
Auto Footer – True
14. Add a New Region MainRN
Select PageLayoutRN right click > New > Region
ID -- MainRN
Region Style – header
15. Create a Master Table Region
Select MainRN > New > Region
ID – MainTableRN
Region Style -- advancedTable
View Instance -- MasterVO1
Detail View Attribute – DetailFlag
Child View Attribute -- Column1
View Link Instance -- MasterdetailDemoVL1
Width – 100%
Rendered – True
16. Create Columns and their items for MainTableRN
Create Column1
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Select MainTableRN > New > column
Select column1 > New > Item
ID – item1
Item Style – messageStyledText
View Attribute – Column1
Create Column2
Select MainTableRN > New > column
Select column2 > New > Item
ID – item2
Item Style – messageStyledText
View Attribute – Column2
17. Create a Detail Region
Select MainTableRN > New > detail
A new Region will be get created under detail set following properties for that region
ID – DetailRN
Region Style – header
18. Create a DetailTable Region
Select DetailRN > New > Region
For New region set following Properties
ID – DetailTableRN
Region Style – advancedTable
View Instance -- DetailVO2
View Link Instance -- MasterdetailDemoVL1
Width – 100%
Rendered – True
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
19. Create Columns and their items for DetailTableRN
Create Column3
Select DetailTableRN > New > column
Select column3 > New > Item
ID – item3
Item Style – messageStyledText
View Instance – DetailVO2
View Attribute – Column1
Create Column4
Select DetailTableRN > New > column
Select column4 > New > Item
ID – item4
Item Style – messageStyledText
View Instance – DetailVO2
View Attribute – Column2
20. Add Controller for Page MasterdetailDemoPG Select PageLayoutRN right click Set
New Controller
Package Name -- prajkumar.oracle.apps.fnd.masterdetaildemo.webui
Class Name -- MasterdetailDemoCO
Set Following Code in CO
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import prajkumar.oracle.apps.fnd.masterdetaildemo.server.MasterdetailDemoAMImpl;
...
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
MasterdetailDemoAMImpl AM =
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
(MasterdetailDemoAMImpl)pageContext.getApplicationModule(webBean);
pageContext.writeDiagnostics(this, "Calling Method", 1);
AM.MasterDetails(pageContext,webBean);
}
21. Add Following Code in your AMImpl Class (MasterdetailDemoAMImpl.java)
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
...
public void MasterDetails(OAPageContext pageContext,OAWebBean webBean)
{
MasterVOImpl pvo = getMasterVO1();
pvo.executeQuery();
}
22. Final Structure pane will look like following picture
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
23. Congratulation you have successfully finished. Run
Your MasterdetailDemoPG page and Test Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Key Flex Fields, KFF in OAF
1. Create a New Workspace and Project
Right click Workspaces and click create New OA Workspace and name it as
PRajkumarKFFDemo. Automatically a new OA Project will also be created. Name the
project as KFFDemo and package as prajkumar.oracle.apps.fnd.kffdemo
2. Create a New Application Module (AM)
Right Click on KFFDemo > New > ADF Business Components > Application Module
Name -- KFFAM
Package -- prajkumar.oracle.apps.fnd.kffdemo.server
Check Application Module Class: KFFAMImpl Generate JavaFile(s)
3. Create a New View Object (VO)
Right click on KFFDemo > New > ADF Business Components > View Object
Name -- KFFVO
Package -- prajkumar.oracle.apps.fnd.kffdemo.server
Note - The VO is not based on any EO so click next and go to the query section and paste
the query
SELECT code_combination_id
FROM gl_code_combinations_kfv
In Step8 Check Object Class: KFFVOImpl -> Generate Java File -> Bind Variable
Accessors
4. Add View Object to Root UI Application Module
Right Click on KFFAM > Edit KFFAM > Data Model and shuttle KFFVO from
Available View Objects to Data Model
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
5. Create a New Page
Right click on KFFDemo > New > Web Tier > OA Components > Page
Name -- KFFPG
Package -- prajkumar.oracle.apps.fnd.kffdemo.webui
6. Select the KFFPG and go to the strcuture pane where a default region has been
created
7. Select region1 and set the following properties:
Attribute Property
ID PageLayoutRN
AM Definition prajkumar.oracle.apps.fnd.kffdemo.server.KFFAM
Window Title Key Flex Field Demo Window
Title Key Flex Field Demo
8. Create Stack Layout Region Under Page Layout Region
Right click PageLayoutRN > New > Region
Attribute Property
ID MainRN
AM Definition stackLayout
9. Create a New Item of type Flex under the Stack Layout Region
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Right click on MainRN > New > Item
Set Following Properties for New Item --
Attribute Property
ID KeyFlexItem
Item Style Flex
Prompt Accounting Key Flex Field
Appl Short Name SQLGL
Name GL#
Type Key
View Instance KFFVO1
10. Create Controller for page KFFPG
Right Click on PageLayoutRN > Set New Controller
Package Name: prajkumar.oracle.apps.fnd.kffdemo.webui
Class Name: KFFCO
Write Following Code in KFFCO processRequest
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
OAKeyFlexBean kffId =
(OAKeyFlexBean)webBean.findIndexedChildRecursive("KeyFlexItem");
// Set the code combination lov
kffId.useCodeCombinationLOV(true);
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
//set the structure code for the item key flex
kffId.setStructureCode("FED_AFF");
//Set the attribute name to the item
kffId.setCCIDAttributeName("CodeCombinationId");
//Execute the Query
KFFAMImpl am = (KFFAMImpl)pageContext.getApplicationModule(webBean);
KFFVOImpl vo = (KFFVOImpl)am.findViewObject("KFFVO1");
if(!vo.isPreparedForExecution())
{
vo.executeQuery();
}
}
Note -- If you do not want to see the key flex field is merging one then change the
code in the controller class as below
kffId.useCodeCombinationLOV(false);
11. Use the below Query to find the Structure Code
SELECT fif.application_id,
fif.id_flex_code,
fif.id_flex_name,
fif.application_table_name,
fif.description,
fifs.id_flex_num,
fifs.id_flex_structure_code,
fifse.segment_name,
fifse.segment_num,
fifse.flex_value_set_id
FROM fnd_id_flexs fif,
fnd_id_flex_structures fifs,
fnd_id_flex_segments fifse
WHERE fif.application_id = fifs.application_id
AND fif.id_flex_code = fifs.id_flex_code
AND fifse.application_id = fif.application_id
AND fifse.id_flex_code = fif.id_flex_code
AND fifse.id_flex_num = fifs.id_flex_num
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
AND fif.id_flex_code LIKE 'GL#'
AND fif.id_flex_name LIKE 'Accounting Flexfield';
12. Congratulation you have successfully finished. Run Your page and Test Your
Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Implement Dependent LOV in OA Framework
Let us try to create a Dependent LOV. In this exercise first Lov Input is “Employee
Name” based on Employee Name Second Lov Input will give “Dependent Name”
1. Create a New Workspace and Project
Right click Workspaces and click create new OAworkspace and name it as
PRajkumarDependentLovDemo.
Automatically a new OA Project will be created. Name the project as
DependentLovDemo and package as prajkumar.oracle.apps.fnd.dependentlovdemo
Note -- Check Run Option Property for Project.
Right Click on DependentLovDemo > Oracle Applications > Run Options. Check OADeveloperMode should
not be inSelected Options if it is there in Selected Options list then shuttle it back to Available Options
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
2. Create a New Application Module (AM)
Right Click on DependentLovDemo > New > ADF Business Components > Application
Module
Name -- DependentLovAM
Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.server
3. Create a New View Object (VO)
Right click on DependentLovDemo > New > ADF Business Components > View Object
Name – DependentLovVO1
Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.server
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Note - The VO is not based on any EO so click next and go to the query section and paste
the query
SELECT person_id, full_name
FROM per_all_people_f
WHERE SYSDATE BETWEEN effective_start_date AND effective_end_date
4. Create a New View Object for Second Lov (VO)
Right click on DependentLovDemo > New > ADF Business Components > View Object
Name – DependentLovVO2
Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.server
Note - The VO is not based on any EO so click next and go to the query section and paste
the query
SELECT pcr.person_id, papf.full_name
FROM per_contact_relationships pcr,
per_all_people_f papf
WHERE papf.person_id = pcr.contact_person_id
AND SYSDATE BETWEEN pcr.date_start AND NVL(pcr.date_end,SYSDATE)
AND SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
5. Add Your View Objects to Root UI Application Module
Select Right click on DependentLovAM > Edit DependentLovAM > Data Model >
Select DependentLovVO1 and DependentLovVO2 and shuttle to Data Model list
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Create First LOV Region for VO DependentLovVO1
6. Create First LOV Region
Right click on DependentLovDemo > New > Web Tier > OA Components > Region
Name -- FirstLovRN
Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.webui
Region Style -- listOfValues
Scope -- Public
Note - The property Scope is the key property which makes the LOV region public and
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
makes it usable in multiple pages
7. Right click on FirstLovRN and click table using wizard. In the wizard choose the
prajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAM and select
DependentLovVO1_1. Click Next
Region Id – FirstLovRN
Region style – table
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
8. Shuttle the two attributes to the right side.That is PersonId and FullName
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
9. Set Region Item properties as below –
ID Prompt Style Datatype
PersonId_LOV PersonId formValue NUMBER
FullName_LOV FullName messageStyledText VARCHAR2
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
10. Click Next and Finish
11. Select PersonId_LOV and Set Following Properties –
Attribute Property
Search Allowed False
Selective Search Criteria False
12. Select FullName_LOV and Set Following Properties –
Attribute Property
Search Allowed True
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Selective Search Criteria False
Now Same way Create Second LOV Region for VO DependentLovVO2
13. Create Second LOV Region
Right click on DependentLovDemo > New > Web Tier > OA Components > Region
Name -- SecondLovRN
Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.webui
Region Style -- listOfValues
Scope -- Public
Note - The property Scope is the key property which makes the LOV region public and
makes it usable in multiple pages
14. Right click on SecondLovRN and click table using wizard. In the wizard choose
the prajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAM and
select DependentLovVO2_1. Click Next
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Region Id – SecondLovRN
Region style – table
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
15. Shuttle the two attributes to the right side.That is PersonId and FullName
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
16. Set Region Item properties as below –
ID Prompt Style Datatype
Second_PersonId_LOV PersonId messageStyledText NUMBER
Second_FullName_LOV FullName messageStyledText VARCHAR2
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
17. Click Next and Finish
18. Select Second_PersonId_LOV and Set Following Properties –
Attribute Property
Search Allowed False
Selective Search Criteria True
19. Select Second_FullName_LOV and Set Following Properties –
Attribute Property
Search Allowed True
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Selective Search Criteria False
20. Create a New Page
Right click on DependentLovDemo > New > Web Tier > OA Components > Page
Attribute Property
Name DependentLovPG
Package prajkumar.oracle.apps.fnd.dependentlovdemo.webui
21. Select the DependentLovPG and go to the strcuture pane where a default region
has been created
22. Select region1 and set the following properties:
Attribute Property
ID PageLayoutRN
AM
Definition
prajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAM
Window
Title
Dependent List of values Demo Window
Title Dependent List of values Demo
23. Right click PageLayoutRN and click new Region
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Attribute Property
ID MainRN
Region Style messageComponentLayout
24. Create a New item to store Return result of First LOV and to give Search Criteria to
second LOV
Select PageLayoutRN > New > Item
Set following Properties for New Item –
Attribute Property
ID ParentPersonId
Item Style formValue
Data Type Number
Build First LOV on Page:
25. Right click the MainRN and click new messageLovInput
Set Following Properties for Newly Created messageLovInput
Attribute Property
ID Employee_Name
External Lov /prajkumar/oracle/apps/fnd/dependentlovdemo/webui/FirstLovRN
Search Allowed False
Selective Search
Criteria
True
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Prompt Employee Name
Select LovMap1 and set following properties --
Attribute Property
Lov Region Item FullName_LOV
Return Item Employee_Name
Criteria Item Employee_Name
Create LovMap2 and set following properties for that --
Select Employee_Name > lovMappings right click New > lovMap
Set following properties for lovMap2 --
Attribute Property
Lov Region Item PersonId_LOV
Return Item ParentPersonId
Build Second LOV on Page:
26. Right click the MainRN and click new messageLovInput
Set Following Properties for Newly Created messageLovInput
Attribute Property
ID Dependent_Name
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
External Lov /prajkumar/oracle/apps/fnd/dependentlovdemo/webui/SecondLovRN
Search Allowed True
Selective Search
Criteria
True
Prompt Dependent Name
Select LovMap3 and set following properties --
Attribute Property
Lov Region Item Second_FullName_LOV
Return Item Dependent_Name
Programmatic Query True
Create LovMap4 and set following properties for that --
Select Dependent_Name > lovMappings right click New > lovMap
Set following properties for lovMap4 --
Attribute Property
Lov Region Item Second_PersonId_LOV
Criteria Item ParentPersonId
Required True
27. Congratulation you have successfully finished. Run Your page and Test Your
Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Implement External LOV in OA Framework
1. Create a New Workspace and Project
Right click Workspaces and click create new OAworkspace and name it as
PRajkumarLovDemo. Automatically a new OA Project is also created. Name the project
as LovDemo and package as prajkumar.oracle.apps.fnd.lovdemo
2. Create a New Application Module (AM)
Right Click on LovDemo > New > ADF Business Components > Application Module
Name -- LovAM
Package -- prajkumar.oracle.apps.fnd.lovdemo.server
3. Create a New View Object (VO)
Right click on LovDemo > New > ADF Business Components > View Object
Name -- LovVO
Package -- prajkumar.oracle.apps.fnd.lovdemo.server
Note - The VO is not based on any EO so click next and go to the query section and paste
the query
SELECT employee_number, full_name
FROM per_all_people_f
WHERE SYSDATE BETWEEN effective_start_date AND effective_end_date
4. Add View Object to Root UI Application Module
5. Create a New Page
Right click on LovDemo > New > Web Tier > OA Components > Page
Name -- LovPG
Package -- prajkumar.oracle.apps.fnd.lovdemo.webui
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
6. Select the LovPG and go to the strcuture pane where a default region has been
created
7. Select region1 and set the following properties:
ID -- PageLayoutRN
AM Definition -- prajkumar.oracle.apps.fnd.lovdemo.server.LovAM
Window Title -- List of values Demo Window
Title – List of values Demo
8. Right click PageLayoutRN and click new Region
ID -- MainRN
Region Style – messageComponentLayout
Note - Style is given as messageComponentlayout because we are going to create only
message components that is messageLovInput item in that region
9. Create a New Region
Right click on LovDemo > New > Web Tier > OA Components > Region
Name -- EmployeeLovRN
Package -- prajkumar.oracle.apps.fnd.lovdemo.webui
Region Style -- listOfValues
Scope -- Public
Note - The property Scope is the key property which makes the LOV region public and
makes it usable in multiple pages
10. Select EmployeeLovRN. Right click on EmployeeLovRN in Structure pane and
click table using wizard. In the wizard choose the
prajkumar.oracle.apps.fnd.lovdemo.server.LovAM and select the LovVO1. Click Next
Region Id -- LovRN
Region style -- table
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
11. Shuttle the two attributes to the right side.That is EmployeeNumber and FullName
12. Click next, check the mapping and then finish
13. Select the field FullName and set the following properties:
Search Allowed -- True
Selective Search Criteria – True
Note - The first property lets users search on these values in the LOV, and the second
property ensures that the users specify search criteria for at least one of these values to
avoid a blind query
Attaching External LOV to Page:
14. Click on LovPG and right click the MainRN and click new messageLovInput
External Lov -- /prajkumar/oracle/apps/fnd/lovdemo/webui/EmployeeLovRN
Lov Region Item -- FullName
Return Item -- item1
Criteria Item -- item1
Prompt -- Employee Name
15. Congratulation you have successfully finished. Run Your page and Test Your
Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Set Default Value for messageTextInput in OAF
1. Create a New OA Workspace and Empty OA Project
File > New > General > Workspace Configured for Oracle Applications
File Name – PrajkumarSetDefaultValDemo
Automatically a new OA Project will also be created
Project Name -- SetDefaultProj
Default Package -- prajkumar.oracle.apps.fnd.setdefaultproj
2. Create Application Module AM
Right Click on SetDefaultProj > New > ADF Business Components > Application
Module
Name -- SetDefaultAM
Package -- prajkumar.oracle.apps.fnd.setdefaultproj.server
Check Application Module Class: SetDefaultAMImpl Generate JavaFile(s)
3. Create a OA components Page
Right click on SetDefaultProj > New > Web Tier > OA Components > Page
Name -- SetDefaultPG
Package -- prajkumar.oracle.apps.fnd.setdefaultproj.webui
4. Select SetDefaultPG and go to the strcuture pane where a default region has
been created
5. Select region1 and set the following properties:
Attribute Property
ID PageLayoutRN
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Region Style pageLayout
Form Property True
Auto Footer True
Window Title Set Default Value Window Title
Title Set Default Value Header
AM Definition prajkumar.oracle.apps.fnd.setdefaultproj.SetDefaultAM
6. Create the Second Region
Right click on PageLayoutRN > New > Region
Attribute Property
ID MainRN
Region Style messageComponentLayout
7. Create messageTextInput
MainRN > New > messageTextInput
Attribute Property
ID MyTextitemId
Style Property messageTextInput
Length 20
Maximum Length 50
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
8. Save Your Work
9. Add a Controller
MainRN > Set New Controller
Package Name -- prajkumar.oracle.apps.fnd.setdefaultvaldemo.webui
Class Name -- SetDefaultValCO
10. Edit Your Controller
Add Following Code in processRequest
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
String myValue = "My Default Value";
OAMessageTextInputBean textBean =
(OAMessageTextInputBean)webBean.findChildRecursive("MyTextitemId");
textBean.setValue(pageContext, myValue);
}
11. Test Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Implement PopList in OA Framework
1. Create a New Workspace and Project
File> New > General> Workspace Configured for Oracle Applications
File Name -- PopListDemo
Project Name – PopListDemo
Default Package -- prajkumar.oracle.apps.fnd.poplistdemo
2. Create a New Application Module (AM)
Right Click on PopListDemo > New > ADF Business Components > Application Module
Name -- poplistdemoAM
Package -- prajkumar.oracle.apps.fnd.poplistdemo.server
3. Create a New View Object (VO)
Right click on PopListDemo > New > ADF Business Components > View Object
Name -- poplistdemoVO
Package -- prajkumar.oracle.apps.fnd.poplistdemo.server
Note - The VO is not based on any EO so click next and go to the query section and paste
the query
SELECT 'poplist_item1' poplist_items
FROM DUAL
UNION
SELECT 'poplist_item2'
FROM DUAL
UNION
SELECT 'poplist_item3'
FROM DUAL
4. Create a New Page
Right click on PopListDemo > New > Web Tier > OA Components > Page
Name -- poplistdemoPG
Package -- prajkumar.oracle.apps.fnd.poplistdemo.webui
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
5. Select the poplistdemoPG and go to the strcuture pane where a default region has
been created
6. Select region1 and set the following properties:
ID -- PageLayoutRN
AM Definition -- prajkumar.oracle.apps.fnd.poplistdemo.server.poplistdemoAM
Window Title -- PopList Demo Window
Title – PopList Demo Header
7. Right click PageLayoutRN and click new Region
ID -- MainRN
Region Style – messageComponentLayout
8. Verify Your VO attribute name
Select poplistdemoVO right click > Edit poplistdemoVO > Attributes >
Verify the Name it should be “poplist_items” if it is not then edit it and enter name
“poplist_items”
9. Create the first Item (Empty Field)
MainRN > New > messageChoice
Set following properties for new item
ID – MyPopList
Required -- Yes
Picklist View Definition --
prajkumar.oracle.apps.fnd.poplistdemo.server.poplistdemoVO
Picklist Display Attribute – poplist_items (Name of Attribute in Your VO)
Picklist Value Attribute -- poplist_items
CSS Class – OraFieldText
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Prompt – My PopList
10. Congratulation you have successfully finished. Run Your page and Test Your
Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Partial Page Rendering in OAF Page
Let us try to implement partial page rendering for a text item.
If value of TextItem1 is null then TextItem2 will not be appreared on UI.
If value of TextItem1 is not null then TextItem2 will be appreared on UI.
1. Create a New OA Workspace and Empty OA Project
File> New > General> Workspace Configured for Oracle Applications
File Name -- PPRProj
Project Name – PPRDemoProj
Default Package -- prajkumar.oracle.apps.fnd.pprdemo
2. Create Application Module AM
PPRDemoProj right click > New > ADF Business Components > Application Module
Name -- PPRAM
Package -- prajkumar.oracle.apps.fnd.pprdemo.server
Check Application Module Class: PPRAMImpl Generate JavaFile(s)
3. Create a PPRVO View Object
PPRDemoProj> New > ADF Business Components > View Objects
Name – PPRVO
Package – prajkumar.oracle.apps.fnd.pprdemo.server
In Attribute Page
Click on New button and create transient primary key attribute with the following
properties:
Attribute Property
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Name RowKey
Type Number
Updateable Always
Key Attribute (Checked)
Click New button again and create transient attribute with the following properties:
Attribute Property
Name TextItem2Render
Type Boolean
Updateable Always
Note – No Need to generate any JAVA files for PPRVO
4. Add Your View Object to Root UI Application Module
Right click on PPRAM > Edit PPRAM > Data Model >
Select PPRVO in Available View Objects list and shuttle to Data Model list
5. Create a OA components Page
PPRDemoProj right click > New > OA Components > Page
Name – PPRPG
Package -- prajkumar.oracle.apps.fnd.pprdemo.webui
6. Modify the Page Layout (Top-level) Region
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Attribute Property
ID PageLayoutRN
Region Style pageLayout
Form Property True
Auto Footer True
Window Title PPR Demo Window Title True
Title PPR Demo Page Header
AM Definition prajkumar.oracle.apps.fnd.pprdemo.server.PPRAM
7. Create the Second Region (Main Content Region)
Right click on PageLayoutRN > New > Region
Attribute Property
ID MainRN
Region Style messageComponentLayout
8. Create Two Text Items
Create First messageTextItem --
Right click on MainRN > New > messageTextInput
Attribute Property
ID TextItem1
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Region Style messageTextInput
Prompt Text Item1
Length 20
Disable Server Side Validation True
Disable Client Side Validation True
Action Type firePartialAction
Event TextItem1Change
Submit True
Note -- Disable Client Side Validation and Event property appears after you set
the Action Type property to firePartialAction
Create Second messageTextItem --
Select MainRN right click > New > messageTextInput
Attribute Property
ID TextItem2
Region Style messageTextInput
Prompt Text Item2
Length 20
Rendered ${oa.PPRVO1.TextItem2Render}
9. Add Following code in PPRAMImpl.java
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
public void handlePPRAction()
{
Number val = 1;
OAViewObject vo = (OAViewObject)findViewObject("PPRVO1");
if (vo != null)
{
if (vo.getFetchedRowCount() == 0)
{
vo.setMaxFetchSize(0);
vo.executeQuery();
vo.insertRow(vo.createRow());
OARow row = (OARow)vo.first();
row.setAttribute("RowKey", val);
row.setAttribute("TextItem2Render", Boolean.FALSE);
}
}
}
10. Implement Controller for Page
Select PageLayoutRN in Structure pane right click > Set New Controller
Package Name -- prajkumar.oracle.apps.fnd.pprdemo.webui
Class Name – PPRCO
Write following code in processFormRequest function of PPRCO Controller
import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.OAViewObject;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);
am.invokeMethod("handlePPRAction");
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);
OAViewObject vo = (OAViewObject)am.findViewObject("PPRVO1");
OARow row = (OARow)vo.getCurrentRow();
if ("TextItem1Change".equals(pageContext.getParameter(EVENT_PARAM)))
{
if (pageContext.getParameter("TextItem1").equals(""))
{
row.setAttribute("TextItem2Render", Boolean.FALSE);
}
else
{
row.setAttribute("TextItem2Render", Boolean.TRUE);
}
}
}
11. Congratulation you have successfully finished. Run Your PPRPG page and Test
Your Work
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Execute parameterized PL SQL procedure from OAF page
Let us try to call PL/SQL package from OAF page. We will try to send two interger
values to one PL/SQL procedure which will do sum of that numbers and will
return back sum of that numbers
1. Create a New OA Workspace and Empty OA Project
File> New > General> Workspace Configured for Oracle Applications
File Name -- ParameterizedProcProj
Project Name – ParameterizedProcDemo
Default Package -- prajkumar.oracle.apps.fnd.parameterizedprocdemo
2. Create Application Module AM
Right click on ParameterizedProcProj > New > ADF Business Components > Application
Module
Name -- ParameterizedProcDemoAM
Package -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.server
Check Application Module Class: ParameterizedProcDemoAMImpl Generate JavaFile(s)
3. Create a New Page
Right click on ParameterizedProcProj > New > Web Tier > OA Components > Page
Name -- ParameterizedProcDemoPG
Package -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.webui
4. Select region1 and set the following properties:
ID -- PageLayoutRN
Region Style -- PageLayout
AM Definition
--prajkumar.oracle.apps.fnd.parameterizedprocdemo.server.ParameterizedProcDemoA
M
Window Title – Execute Paramterized Procedure Demo Page Window
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
Title – Execute Paramterized Procedure Demo Page Header
Auto Footer – True
5. Add a New Region MainRN
Select PageLayoutRN right click > New > Region
ID -- MainRN
Region Style – messageComponentLayout
6. Create messageTextInput Items
Create item1
Select MainRN > New > messageTextInput
Set following Properties for Text Item1
ID – item1
Item Style – messageTextInput
Data Type -- Number
Prompt – Text Item1
Maximum Length – 20
Length -- 20
Create item2
Select MainRN > New > messageTextInput
Set following Properties for Text Item1
ID – item2
Item Style – messageTextInput
Data Type -- Number
Prompt – Text Item2
Maximum Length – 20
Length -- 20
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
7. Create a Submit Button
Right Click on MainRN > New > messageLayout
Select newly created messageLayout right click > New > item
Set Following Properties for newly created item
ID – Sum
Item Style – submitButton
Attribute Set -- /oracle/apps/fnd/attributesets/Buttons/Go
Prompt – Sum
8. Run Your Page UI is ready --
9. Let us create a package and package body which we will call from OAF page
This Package takes three parameters all are number. First two are IN parameters and last
is OUT as sum of first two numbers
Package Spec
CREATE OR REPLACE PACKAGE APPS.test_package AUTHID CURRENT_USER
IS
PROCEDURE data_sum
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
( item1 IN NUMBER,
item2 IN NUMBER,
data_sum OUT NUMBER
);
END test_package;
/
SHOW ERRORS;
EXIT;
Package Body
CREATE OR REPLACE PACKAGE BODY APPS.test_package
IS
PROCEDURE data_sum
( item1 IN NUMBER,
item2 IN NUMBER,
data_sum OUT NUMBER
)
IS
BEGIN
data_sum := item1 + item2;
END data_sum;
END test_package;
/
SHOW ERRORS;
EXIT;
10. Add Following Code in your AMImpl Class
(ParameterizedProcDemoAMImpl.java)
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.server.OADBTransactionImpl;
import oracle.jdbc.OracleCallableStatement;
import java.sql.Types;
import oracle.apps.fnd.framework.OAException;
...
public String dataSumAction(String item1,String item2)
{ OADBTransaction oadbtransaction = (OADBTransaction)getTransaction();
OADBTransactionImpl oadbtransactionimpl =
Copyright © 2013, AppsLead. All rights reserved
Contact Us: 002 – 010 900 160 23
002 – 0100 62 62 837
(OADBTransactionImpl)getTransaction();
String retValues;
StringBuffer str = new StringBuffer();
str.append( " BEGIN ");
str.append( " test_package.data_sum( ");
str.append( " item1 => :1, ");
str.append( " item2 => :2, ");
str.append( " data_sum => :3 ");
str.append( " ); ");
str.append( " END; ");
OracleCallableStatement oraclecallablestatement =
(OracleCallableStatement)oadbtransaction.createCallableStatement(str.toString(), 1);
try{
oraclecallablestatement.setInt(1, Integer.parseInt(item1) );
oraclecallablestatement.setInt(2, Integer.parseInt(item2) );
oraclecallablestatement.registerOutParameter(3, Types.VARCHAR);
oraclecallablestatement.execute();
retValues = oraclecallablestatement.getString(3);
}
catch(Exception e)
{
throw OAException.wrapperException(e);
}
return retValues;
}
11. Add Controller for Page ParameterizedProcDemoPG Select PageLayoutRN right
click Set New Controller
Package Name -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.webui
Class Name -- ParameterizedProcDemoCO
Add Following Code in Controller
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAApplicationModule;
import java.io.Serializable;
...
Copyright © 2013, AppsLead. All rights reserved
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases
Oracle Application Framework Cases

Weitere ähnliche Inhalte

Was ist angesagt?

Validation type 'special' in value sets
Validation type 'special' in value setsValidation type 'special' in value sets
Validation type 'special' in value setsFeras Ahmad
 
Calendar working days and holidays for Oracle EBS R12 Absence management
Calendar working days and holidays for Oracle EBS R12 Absence managementCalendar working days and holidays for Oracle EBS R12 Absence management
Calendar working days and holidays for Oracle EBS R12 Absence managementFeras Ahmad
 
Personalization to restrict subinventory lov in miscellaneous transaction to ...
Personalization to restrict subinventory lov in miscellaneous transaction to ...Personalization to restrict subinventory lov in miscellaneous transaction to ...
Personalization to restrict subinventory lov in miscellaneous transaction to ...Ahmed Elshayeb
 
Oracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup StepsOracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup StepsBoopathy CS
 
Oracle R12 Apps - Order Management Tables & Descriptions
Oracle R12 Apps - Order Management Tables & DescriptionsOracle R12 Apps - Order Management Tables & Descriptions
Oracle R12 Apps - Order Management Tables & DescriptionsBoopathy CS
 
Oracle order management implementation manual
Oracle order management implementation manualOracle order management implementation manual
Oracle order management implementation manualNawaz Sk
 
Oracle Fixed assets ivas
Oracle Fixed assets ivasOracle Fixed assets ivas
Oracle Fixed assets ivasAli Ibrahim
 
All payroll elements with eligibility Oracle Fusion Cloud
All payroll elements with eligibility Oracle Fusion CloudAll payroll elements with eligibility Oracle Fusion Cloud
All payroll elements with eligibility Oracle Fusion CloudFeras Ahmad
 
Oracle R12 Order Management - Back to Back (B2B) Order Flow:
Oracle R12 Order Management - Back to Back (B2B) Order Flow:Oracle R12 Order Management - Back to Back (B2B) Order Flow:
Oracle R12 Order Management - Back to Back (B2B) Order Flow:Boopathy CS
 
Oracle EBS HRMS SETUP
Oracle EBS HRMS SETUPOracle EBS HRMS SETUP
Oracle EBS HRMS SETUPHussain Abbas
 
O2 c and p2p cycles
O2 c and p2p cyclesO2 c and p2p cycles
O2 c and p2p cyclesgsriramsunil
 
Oracle EBS R 12 Core hr user manual
Oracle EBS R 12 Core hr user manualOracle EBS R 12 Core hr user manual
Oracle EBS R 12 Core hr user manualFeras Ahmad
 
Query to get the geography information using bi report
Query to get the geography information using bi reportQuery to get the geography information using bi report
Query to get the geography information using bi reportFeras Ahmad
 
Oracle Personalization How To Restricting users from assigning items to diffe...
Oracle Personalization How To Restricting users from assigning items to diffe...Oracle Personalization How To Restricting users from assigning items to diffe...
Oracle Personalization How To Restricting users from assigning items to diffe...Ahmed Elshayeb
 
Personalization to restrict values in customer name and number lov in sales o...
Personalization to restrict values in customer name and number lov in sales o...Personalization to restrict values in customer name and number lov in sales o...
Personalization to restrict values in customer name and number lov in sales o...Ahmed Elshayeb
 
Understanding and using life event checklists in oracle hrms r12
Understanding and using life event checklists in oracle hrms r12Understanding and using life event checklists in oracle hrms r12
Understanding and using life event checklists in oracle hrms r12MuhammadAbubakar206124
 

Was ist angesagt? (20)

Validation type 'special' in value sets
Validation type 'special' in value setsValidation type 'special' in value sets
Validation type 'special' in value sets
 
Calendar working days and holidays for Oracle EBS R12 Absence management
Calendar working days and holidays for Oracle EBS R12 Absence managementCalendar working days and holidays for Oracle EBS R12 Absence management
Calendar working days and holidays for Oracle EBS R12 Absence management
 
Personalization to restrict subinventory lov in miscellaneous transaction to ...
Personalization to restrict subinventory lov in miscellaneous transaction to ...Personalization to restrict subinventory lov in miscellaneous transaction to ...
Personalization to restrict subinventory lov in miscellaneous transaction to ...
 
Oracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup StepsOracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup Steps
 
Oracle R12 Apps - Order Management Tables & Descriptions
Oracle R12 Apps - Order Management Tables & DescriptionsOracle R12 Apps - Order Management Tables & Descriptions
Oracle R12 Apps - Order Management Tables & Descriptions
 
Oracle Apps - Forms
Oracle Apps - FormsOracle Apps - Forms
Oracle Apps - Forms
 
Oracle order management implementation manual
Oracle order management implementation manualOracle order management implementation manual
Oracle order management implementation manual
 
Oracle Fixed assets ivas
Oracle Fixed assets ivasOracle Fixed assets ivas
Oracle Fixed assets ivas
 
All payroll elements with eligibility Oracle Fusion Cloud
All payroll elements with eligibility Oracle Fusion CloudAll payroll elements with eligibility Oracle Fusion Cloud
All payroll elements with eligibility Oracle Fusion Cloud
 
BOM & WIP
BOM & WIPBOM & WIP
BOM & WIP
 
Oracle R12 Order Management - Back to Back (B2B) Order Flow:
Oracle R12 Order Management - Back to Back (B2B) Order Flow:Oracle R12 Order Management - Back to Back (B2B) Order Flow:
Oracle R12 Order Management - Back to Back (B2B) Order Flow:
 
Oracle EBS HRMS SETUP
Oracle EBS HRMS SETUPOracle EBS HRMS SETUP
Oracle EBS HRMS SETUP
 
O2 c and p2p cycles
O2 c and p2p cyclesO2 c and p2p cycles
O2 c and p2p cycles
 
BR100 Oracle AP Setup
BR100 Oracle AP SetupBR100 Oracle AP Setup
BR100 Oracle AP Setup
 
Oracle EBS R 12 Core hr user manual
Oracle EBS R 12 Core hr user manualOracle EBS R 12 Core hr user manual
Oracle EBS R 12 Core hr user manual
 
Query to get the geography information using bi report
Query to get the geography information using bi reportQuery to get the geography information using bi report
Query to get the geography information using bi report
 
Oracle forms personalization
Oracle forms personalizationOracle forms personalization
Oracle forms personalization
 
Oracle Personalization How To Restricting users from assigning items to diffe...
Oracle Personalization How To Restricting users from assigning items to diffe...Oracle Personalization How To Restricting users from assigning items to diffe...
Oracle Personalization How To Restricting users from assigning items to diffe...
 
Personalization to restrict values in customer name and number lov in sales o...
Personalization to restrict values in customer name and number lov in sales o...Personalization to restrict values in customer name and number lov in sales o...
Personalization to restrict values in customer name and number lov in sales o...
 
Understanding and using life event checklists in oracle hrms r12
Understanding and using life event checklists in oracle hrms r12Understanding and using life event checklists in oracle hrms r12
Understanding and using life event checklists in oracle hrms r12
 

Ähnlich wie Oracle Application Framework Cases

Revised Adf security in a project centric environment
Revised Adf security in a project centric environmentRevised Adf security in a project centric environment
Revised Adf security in a project centric environmentJean-Marc Desvaux
 
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFishJava API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFishArun Gupta
 
Enterprise manager 13c -let's connect to the Oracle Cloud
Enterprise manager 13c -let's connect to the Oracle CloudEnterprise manager 13c -let's connect to the Oracle Cloud
Enterprise manager 13c -let's connect to the Oracle CloudTrivadis
 
Preparing forr12-140703020001-phpapp02
Preparing forr12-140703020001-phpapp02Preparing forr12-140703020001-phpapp02
Preparing forr12-140703020001-phpapp02shubham gupta
 
Preparing for EBS R12.2-upgrade-full
Preparing for EBS R12.2-upgrade-fullPreparing for EBS R12.2-upgrade-full
Preparing for EBS R12.2-upgrade-fullBerry Clemens
 
Oracle bi 10g_install_migration
Oracle bi 10g_install_migrationOracle bi 10g_install_migration
Oracle bi 10g_install_migrationMlx Le
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Haytham Ghandour
 
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...Docker, Inc.
 
Importance of APIs in the Internet of Things
Importance of APIs in the Internet of ThingsImportance of APIs in the Internet of Things
Importance of APIs in the Internet of ThingsNordic APIs
 
206520 p6 web services programming interface
206520 p6 web services programming interface206520 p6 web services programming interface
206520 p6 web services programming interfacep6academy
 
206570 primavera and the fusion stack
206570 primavera and the fusion stack206570 primavera and the fusion stack
206570 primavera and the fusion stackp6academy
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformWSO2
 
Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsIBM UrbanCode Products
 
Java EE 7 - Novidades e Mudanças
Java EE 7 - Novidades e MudançasJava EE 7 - Novidades e Mudanças
Java EE 7 - Novidades e MudançasBruno Borges
 
Fanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone DeveloperFanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone DeveloperSam Basu
 
PGConf.ASIA 2019 Bali - Foreign Data Wrappers - Etsuro Fujita & Tatsuro Yamada
PGConf.ASIA 2019 Bali - Foreign Data Wrappers - Etsuro Fujita & Tatsuro YamadaPGConf.ASIA 2019 Bali - Foreign Data Wrappers - Etsuro Fujita & Tatsuro Yamada
PGConf.ASIA 2019 Bali - Foreign Data Wrappers - Etsuro Fujita & Tatsuro YamadaEqunix Business Solutions
 

Ähnlich wie Oracle Application Framework Cases (20)

Revised Adf security in a project centric environment
Revised Adf security in a project centric environmentRevised Adf security in a project centric environment
Revised Adf security in a project centric environment
 
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFishJava API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFish
 
Enterprise manager 13c -let's connect to the Oracle Cloud
Enterprise manager 13c -let's connect to the Oracle CloudEnterprise manager 13c -let's connect to the Oracle Cloud
Enterprise manager 13c -let's connect to the Oracle Cloud
 
Preparing forr12-140703020001-phpapp02
Preparing forr12-140703020001-phpapp02Preparing forr12-140703020001-phpapp02
Preparing forr12-140703020001-phpapp02
 
Preparing for EBS R12.2-upgrade-full
Preparing for EBS R12.2-upgrade-fullPreparing for EBS R12.2-upgrade-full
Preparing for EBS R12.2-upgrade-full
 
Oracle bi 10g_install_migration
Oracle bi 10g_install_migrationOracle bi 10g_install_migration
Oracle bi 10g_install_migration
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
 
Setting up an odi agent
Setting up an odi agentSetting up an odi agent
Setting up an odi agent
 
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...
 
Importance of APIs in the Internet of Things
Importance of APIs in the Internet of ThingsImportance of APIs in the Internet of Things
Importance of APIs in the Internet of Things
 
206520 p6 web services programming interface
206520 p6 web services programming interface206520 p6 web services programming interface
206520 p6 web services programming interface
 
206570 primavera and the fusion stack
206570 primavera and the fusion stack206570 primavera and the fusion stack
206570 primavera and the fusion stack
 
Con4445 jesus
Con4445 jesusCon4445 jesus
Con4445 jesus
 
MATERIAL.pdf
MATERIAL.pdfMATERIAL.pdf
MATERIAL.pdf
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 Platform
 
Oracle ADF Case Study
Oracle ADF Case StudyOracle ADF Case Study
Oracle ADF Case Study
 
Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with Plugins
 
Java EE 7 - Novidades e Mudanças
Java EE 7 - Novidades e MudançasJava EE 7 - Novidades e Mudanças
Java EE 7 - Novidades e Mudanças
 
Fanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone DeveloperFanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone Developer
 
PGConf.ASIA 2019 Bali - Foreign Data Wrappers - Etsuro Fujita & Tatsuro Yamada
PGConf.ASIA 2019 Bali - Foreign Data Wrappers - Etsuro Fujita & Tatsuro YamadaPGConf.ASIA 2019 Bali - Foreign Data Wrappers - Etsuro Fujita & Tatsuro Yamada
PGConf.ASIA 2019 Bali - Foreign Data Wrappers - Etsuro Fujita & Tatsuro Yamada
 

Mehr von Feras Ahmad

Oracle Fusion HCM Payroll Process Flow.pdf
Oracle Fusion HCM Payroll Process Flow.pdfOracle Fusion HCM Payroll Process Flow.pdf
Oracle Fusion HCM Payroll Process Flow.pdfFeras Ahmad
 
Configure Flexfield Parameters in Value Sets for Document Records.docx
Configure Flexfield Parameters in Value Sets for Document Records.docxConfigure Flexfield Parameters in Value Sets for Document Records.docx
Configure Flexfield Parameters in Value Sets for Document Records.docxFeras Ahmad
 
Building-Materials
Building-MaterialsBuilding-Materials
Building-MaterialsFeras Ahmad
 
How to Debug the Fast Formula.pdf
How to Debug the Fast Formula.pdfHow to Debug the Fast Formula.pdf
How to Debug the Fast Formula.pdfFeras Ahmad
 
Oracle Fusion Cloud Payroll Costing Query
Oracle Fusion Cloud Payroll Costing QueryOracle Fusion Cloud Payroll Costing Query
Oracle Fusion Cloud Payroll Costing QueryFeras Ahmad
 
Oracle Fusion Cloud sensitive data access audit
 Oracle Fusion Cloud sensitive data access audit Oracle Fusion Cloud sensitive data access audit
Oracle Fusion Cloud sensitive data access auditFeras Ahmad
 
Oracle Cloud SQL FTE Positions Query
Oracle Cloud SQL FTE Positions QueryOracle Cloud SQL FTE Positions Query
Oracle Cloud SQL FTE Positions QueryFeras Ahmad
 
Legal Employer Details Query Oracle Fusion Cloud
Legal Employer Details Query Oracle Fusion CloudLegal Employer Details Query Oracle Fusion Cloud
Legal Employer Details Query Oracle Fusion CloudFeras Ahmad
 
Query Pre Payment details Oracle Fusion Cloud
Query Pre Payment details Oracle Fusion CloudQuery Pre Payment details Oracle Fusion Cloud
Query Pre Payment details Oracle Fusion CloudFeras Ahmad
 
The Goal with performance details Oracle Fusion Cloud
The Goal with performance details Oracle Fusion CloudThe Goal with performance details Oracle Fusion Cloud
The Goal with performance details Oracle Fusion CloudFeras Ahmad
 
Payroll costing details Oracle Fusion Cloud HCM
Payroll costing details Oracle Fusion Cloud HCMPayroll costing details Oracle Fusion Cloud HCM
Payroll costing details Oracle Fusion Cloud HCMFeras Ahmad
 
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book Feras Ahmad
 
DBI database Items Query Oracle Fusion Cloud
DBI database Items Query Oracle Fusion CloudDBI database Items Query Oracle Fusion Cloud
DBI database Items Query Oracle Fusion CloudFeras Ahmad
 
Query Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion CloudQuery Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion CloudFeras Ahmad
 
Query all roles and duties and privileges Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion CloudQuery all roles and duties and privileges Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion CloudFeras Ahmad
 
Oracle Fusion Cloud HCM Payroll Query
Oracle Fusion Cloud HCM Payroll QueryOracle Fusion Cloud HCM Payroll Query
Oracle Fusion Cloud HCM Payroll QueryFeras Ahmad
 
Oracle HCM Presentation 2020
Oracle HCM Presentation 2020Oracle HCM Presentation 2020
Oracle HCM Presentation 2020Feras Ahmad
 
Oracle Fusion HCM vs E-Business Suite HRMS
Oracle Fusion HCM vs E-Business Suite HRMSOracle Fusion HCM vs E-Business Suite HRMS
Oracle Fusion HCM vs E-Business Suite HRMSFeras Ahmad
 
2020 06-11 goverment KSA Summary VAT increase
2020 06-11 goverment KSA Summary VAT increase2020 06-11 goverment KSA Summary VAT increase
2020 06-11 goverment KSA Summary VAT increaseFeras Ahmad
 
Financial reporting compliance cloud service presentation
Financial reporting compliance cloud service presentationFinancial reporting compliance cloud service presentation
Financial reporting compliance cloud service presentationFeras Ahmad
 

Mehr von Feras Ahmad (20)

Oracle Fusion HCM Payroll Process Flow.pdf
Oracle Fusion HCM Payroll Process Flow.pdfOracle Fusion HCM Payroll Process Flow.pdf
Oracle Fusion HCM Payroll Process Flow.pdf
 
Configure Flexfield Parameters in Value Sets for Document Records.docx
Configure Flexfield Parameters in Value Sets for Document Records.docxConfigure Flexfield Parameters in Value Sets for Document Records.docx
Configure Flexfield Parameters in Value Sets for Document Records.docx
 
Building-Materials
Building-MaterialsBuilding-Materials
Building-Materials
 
How to Debug the Fast Formula.pdf
How to Debug the Fast Formula.pdfHow to Debug the Fast Formula.pdf
How to Debug the Fast Formula.pdf
 
Oracle Fusion Cloud Payroll Costing Query
Oracle Fusion Cloud Payroll Costing QueryOracle Fusion Cloud Payroll Costing Query
Oracle Fusion Cloud Payroll Costing Query
 
Oracle Fusion Cloud sensitive data access audit
 Oracle Fusion Cloud sensitive data access audit Oracle Fusion Cloud sensitive data access audit
Oracle Fusion Cloud sensitive data access audit
 
Oracle Cloud SQL FTE Positions Query
Oracle Cloud SQL FTE Positions QueryOracle Cloud SQL FTE Positions Query
Oracle Cloud SQL FTE Positions Query
 
Legal Employer Details Query Oracle Fusion Cloud
Legal Employer Details Query Oracle Fusion CloudLegal Employer Details Query Oracle Fusion Cloud
Legal Employer Details Query Oracle Fusion Cloud
 
Query Pre Payment details Oracle Fusion Cloud
Query Pre Payment details Oracle Fusion CloudQuery Pre Payment details Oracle Fusion Cloud
Query Pre Payment details Oracle Fusion Cloud
 
The Goal with performance details Oracle Fusion Cloud
The Goal with performance details Oracle Fusion CloudThe Goal with performance details Oracle Fusion Cloud
The Goal with performance details Oracle Fusion Cloud
 
Payroll costing details Oracle Fusion Cloud HCM
Payroll costing details Oracle Fusion Cloud HCMPayroll costing details Oracle Fusion Cloud HCM
Payroll costing details Oracle Fusion Cloud HCM
 
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
 
DBI database Items Query Oracle Fusion Cloud
DBI database Items Query Oracle Fusion CloudDBI database Items Query Oracle Fusion Cloud
DBI database Items Query Oracle Fusion Cloud
 
Query Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion CloudQuery Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion Cloud
 
Query all roles and duties and privileges Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion CloudQuery all roles and duties and privileges Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion Cloud
 
Oracle Fusion Cloud HCM Payroll Query
Oracle Fusion Cloud HCM Payroll QueryOracle Fusion Cloud HCM Payroll Query
Oracle Fusion Cloud HCM Payroll Query
 
Oracle HCM Presentation 2020
Oracle HCM Presentation 2020Oracle HCM Presentation 2020
Oracle HCM Presentation 2020
 
Oracle Fusion HCM vs E-Business Suite HRMS
Oracle Fusion HCM vs E-Business Suite HRMSOracle Fusion HCM vs E-Business Suite HRMS
Oracle Fusion HCM vs E-Business Suite HRMS
 
2020 06-11 goverment KSA Summary VAT increase
2020 06-11 goverment KSA Summary VAT increase2020 06-11 goverment KSA Summary VAT increase
2020 06-11 goverment KSA Summary VAT increase
 
Financial reporting compliance cloud service presentation
Financial reporting compliance cloud service presentationFinancial reporting compliance cloud service presentation
Financial reporting compliance cloud service presentation
 

Kürzlich hochgeladen

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Oracle Application Framework Cases

  • 1. AppsLead for Consultation and Training January 16th , 2013 www.AppsLead.com Oracle Applications Framework Business Cases Cell phone 002/010 900 160 23 Prepared By: Mostafa El-Roby We guide you to the right path in Oracle Applications 2013
  • 2. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 OAF Hello World Tutorial Create OAF Search Page Create Auto Customization Criteria OAF Search Page Clear/ Reset Result Table of Search page in OAF Create Data Entry OAF Page Update Records in OAF Page Create and Update on one click in OA Framework Delete records in OAF Page Implement Master Detail Relationship in OAF Page Working with Key Flex Fields in OAF Implement Dependent LOV in OAF Implement External LOV in OAF Set default Value for messageTextInput item Implement PopList in OA Framework Partial Page Rendering in OAF Execute parameterized PL SQL procedure from OAF page Implement Train in OAF Page D2k to OAF Transformation Call D2K Form from OAF Page Call OAF Page From D2K Form Get Host Name and URL of OAF Page OAF Page to Upload Files into Server from Local Machine Copyright © 2013, AppsLead. All rights reserved
  • 3. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Deploy JAR File into R12 in OA Server Import Data from Excel sheet to DB Table Import Data from *.xlsx file to DB Table Deploy OAF page Bounce Apache Server Enable Personalization Link for OAF Pages Enable Personalization Link for OAF Pages Deploy JAR File into R12 in OA Server Controller Extension in OAF Application Module Extension in OAF EO based VO Extension in OAF Entity Object Extension in OAF OA Framework Best Practices OAException Message and Dialog Page in OA Framework Deploying OAF Personalizations Using the Import/Export Command Line Tools Best Blog :- 1- http://iwidi.org/index.php/oaf Copyright © 2013, AppsLead. All rights reserved
  • 4. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Basic Installation Steps - 1. Download JDeveloper 10.1.3.3.0. Available Oracle patch is p8431482_R12_GENERIC.zip Unzip the patch p8431482_R12_GENERIC.zip i.e. in D: 2. Specify the path of jdev in following location My Computer>Properties>Advanced>Environment Variables as given below screen shot Copyright © 2013, AppsLead. All rights reserved
  • 5. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 3. Download dbc file of Oracle application instance from $FND_TOP/secure ( it is like a tnsnames.ora file having connection detail ) Place the file at location D:p8431482_R12_GENERICjdevhomejdevdbc_filessecure 4. Open JDeveloper and set database connection goto Connection Navigator > Database and create a new connection Copyright © 2013, AppsLead. All rights reserved
  • 6. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 7. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Note Give user name and password do not give any role and do not check Deploy Password checkbox Copyright © 2013, AppsLead. All rights reserved
  • 8. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Note Give Host Name, JDBC port, and SID. Keep driver as thin. Now JDeveloper is ready to use 5. Create a sample workspace and project to know setting during creation of project 1. Goto Application Navigator right click > New > General > Workspace Configured for Oracle Applications 2. Give workspace name Copyright © 2013, AppsLead. All rights reserved
  • 9. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 3. Give project name and Default package Note Default package is <3rd party identifier>.oracle.apps.<application_short_name>.<component>. [<subcomponent>] Example: mycompany.oracle.apps.po.requisition.webui Copyright © 2013, AppsLead. All rights reserved
  • 10. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 4. Give database connection detail 5. Give your dbc file location, application username, application password, application short name, and responsibility key i.e. Application short key and responsibility key is nothing but assigned responsibility detail to the application user for example if application user has System Administrator responsibility then Application short name will be “SYSADMIN” and responsibility key will be “SYSTEM_ADMINISTRATOR”. These values are required to compile and run the page because page required context during run time so it will login the application with given username and password and it will take context from assigned responsibility Copyright © 2013, AppsLead. All rights reserved
  • 11. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 6. Click Next. Creation of Workspace and project has finished Copyright © 2013, AppsLead. All rights reserved
  • 12. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 OAF Hello World Tutorial 1. Create a New OA Workspace and Empty OA Project File> New > General> Workspace Configured for Oracle Applications Copyright © 2013, AppsLead. All rights reserved
  • 13. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 14. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 15. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 16. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 17. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 2. Set Run Options in OA Project Setting Select Your Project in the Navigator and choose Project Properties Select Oracle Applications > Run Options Select OADeveloperMode and OADiagnostic, and move them to selected Options List Copyright © 2013, AppsLead. All rights reserved
  • 18. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 3. Create Application Module AM Copyright © 2013, AppsLead. All rights reserved
  • 19. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 20. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 21. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 22. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 23. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 4. Create a OA components Page Copyright © 2013, AppsLead. All rights reserved
  • 24. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 25. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 5. Modify the Page Layout (Top-level) Region Copyright © 2013, AppsLead. All rights reserved
  • 26. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Attribute Property ID PageLayoutRN Region Style pageLayout Form Property True Auto Footer True Window Title Hello World Window Title Copyright © 2013, AppsLead. All rights reserved
  • 27. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Title Hello World Page Header AM Definition prajkumar.oracle.apps.ak.hello.server.HelloAM Copyright © 2013, AppsLead. All rights reserved
  • 28. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 6. Create the Second Region (Main Content Region) Attribute Property ID MainRN Region Style messageComponentLayout 7. Create the first Item (Empty Field) MainRN > New > messageTextInput Copyright © 2013, AppsLead. All rights reserved
  • 29. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Attribute Property ID HelloName Style Property messageTextInput Prompt Name Length 20 Maximum Length 50 Copyright © 2013, AppsLead. All rights reserved
  • 30. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 8. Create a container Region for Go-Button MainRN > messageLayout Copyright © 2013, AppsLead. All rights reserved
  • 31. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Attribute Property ID ButtonLayout Copyright © 2013, AppsLead. All rights reserved
  • 32. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 9. Create a Second Item (Go Button) Select ButtonLayout > New > Item Copyright © 2013, AppsLead. All rights reserved
  • 33. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Attribute Property ID Go Item Style submitButton Attribute /oracle/apps/fnd/attributesets/Buttons/Go Copyright © 2013, AppsLead. All rights reserved
  • 34. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 35. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 10. Save Your Work 11. Run Your Page UI is ready Copyright © 2013, AppsLead. All rights reserved
  • 36. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 12. Add a Controller MainRN > Set New Controller Copyright © 2013, AppsLead. All rights reserved
  • 37. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 13. Edit Your Controller Add Following OA Exception as a last line in import section import oracle.apps.fnd.framework.OAException; Add Following Code in processFormRequest public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean); if (pageContext.getParameter("Go") != null) { String userContent = pageContext.getParameter("HelloName"); Copyright © 2013, AppsLead. All rights reserved
  • 38. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 String message = "Hello, " + userContent + "!"; throw new OAException(message, OAException.INFORMATION); } } Copyright © 2013, AppsLead. All rights reserved
  • 39. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 14. Build Your Controller 15. Test Your Work Your Hello World Page is Ready Copyright © 2013, AppsLead. All rights reserved
  • 40. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 41. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Create OAF Search Page 1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarSearch. Automatically a new OA Project is also created. Name the project as SearchDemo and package as prajkumar.oracle.apps.fnd.searchdemo 2. Create a New Application Module (AM) Right Click on SearchDemo > New > ADF Business Components > Application Module Name -- SearchAM Package -- prajkumar.oracle.apps.fnd.searchdemo.server 3. Enable Passivation for the Root UI Application Module (AM) Right Click on SearchAM > Edit SearchAM > Custom Properties > Name – RETENTION_LEVEL Value – MANAGE_STATE Click add > Apply > OK 4. Create Test Table and insert data some data in it (For Testing Purpose) CREATE TABLE xx_search_demo ( -- -------------------- -- Data Columns -- -------------------- column1 VARCHAR2(100), column2 VARCHAR2(100), -- -------------------- -- Who Columns -- -------------------- last_update_date DATE NOT NULL, last_updated_by NUMBER NOT NULL, creation_date DATE NOT NULL, created_by NUMBER NOT NULL, last_update_login NUMBER ); INSERT INTO xx_search_demo VALUES (‘val1’, ’val2’, SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO xx_search_demo VALUES (‘val1’, ’val2’, SYSDATE, 0, SYSDATE, 0, 0); Copyright © 2013, AppsLead. All rights reserved
  • 42. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 INSERT INTO xx_search_demo VALUES (‘val3’, ’val4’, SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO xx_search_demo VALUES (‘val5’, ’val6’, SYSDATE, 0, SYSDATE, 0, 0); Now we have 4 records in our custom table 5. Create a New Entity Object (EO) Right click on SearchDemo > New > ADF Business Components > Entity Object Name – SearchEO Package -- prajkumar.oracle.apps.fnd.searchdemo.schema.server Database Objects -- XX_SEARCH_DEMO Note – By default ROWID will be the primary key if we will not make any column to be primary key Check the Accessors, Create Method, Validation Method and Remove Method 6. Create a New View Object (VO) Right click on SearchDemo > New > ADF Business Components > View Object Name -- SearchVO Package -- prajkumar.oracle.apps.fnd.searchdemo.server In Step2 in Entity Page select SearchEO and shuttle them to selected list In Step3 in Attributes Window select columns Column1, Column2 and shuttle them to selected list In Java page Select Generate Java file for View Object Class: SearchVOImpl and Generate Java File for View Row Class: SearchVORowImpl 7. Add Your View Object to Root UI Application Module Select Right click on SearchAM > Edit SearchAM > Data Model > Select SearchVO and shuttle to Data Model list 8. Create a New Page Right click on SearchDemo > New > Web Tier > OA Components > Page Name -- SearchPG Copyright © 2013, AppsLead. All rights reserved
  • 43. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Package -- prajkumar.oracle.apps.fnd.searchdemo.webui 9. Select the SearchPG and go to the strcuture pane where a default region has been created 10. Select region1 and set the following properties: ID -- PageLayoutRN Region Style -- PageLayout AM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM Window Title -- Search Page Window Title -- Search Page Auto Footer -- True 11. Add a Query Bean to Your Page Right click on PageLayoutRN > New > Region Select new region region1 and set following properties ID – QueryRN Region Style – query Construction Mode – resultBasedSearch Include Simple Panel – True Include Views Panel – True Include Advanced Panel – True 12. Add a Result Data Table to your QueryRN Select QueryRN right click > New > Region using Wizard In BC4J Objects page, Select your SearchAM and then select your SearchVO1 Note – DO NOT select Use this as Application Module Definition for this region checkbox Copyright © 2013, AppsLead. All rights reserved
  • 44. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 In Region Properties page, set Region ID value to ResultsTable and Region Style to table In view Attributes page, select attributes from Available View Attributes list and shuttle them to Selected View Atributes list: Column1 Column2 In Region Items Page, you can set ID, Style and Attributes Set. Currently we are going to set only Style as messageStyledText 13. Set and verify Your Results Table Region Properties ID – ResultsTable Region Style – table AM – Please Donot put any AM Rendered – True Records Displayed – 10 Width – 100% User Personalization – True 14. Set or Verify Column1 Item Properties Search Allowed -- True Sort Allowed – ascending Initial Sort Seqence – first Selective Search Criteria – True User Personalization – True 15. Set or Verify Column2 Item Properties Search Allowed – True Sort Allowed -- ascending Selective Search Criteria – True Copyright © 2013, AppsLead. All rights reserved
  • 45. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 User Personalization – True 16. Congratulation you have successfully finished Search page. Run Your SearchPG page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 46. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 47. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Create Auto Customization Criteria OAF Search Page 1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarCustSearch. Automatically a new OA Project will also be created. Name the project as CustSearchDemo and package as prajkumar.oracle.apps.fnd.custsearchdemo 2. Create a New Application Module (AM) Right Click on CustSearchDemo > New > ADF Business Components > Application Module Name -- CustSearchAM Package -- prajkumar.oracle.apps.fnd.custsearchdemo.server 3. Enable Passivation for the Root UI Application Module (AM) Right Click on CustSearchAM > Edit SearchAM > Custom Properties > Name – RETENTION_LEVEL Value – MANAGE_STATE Click add > Apply > OK 4. Create Test Table and insert data some data in it (For Testing Purpose) CREATE TABLE xx_custsearch_demo ( -- --------------------- -- Data Columns -- --------------------- column1 VARCHAR2(100), column2 VARCHAR2(100), column3 VARCHAR2(100), column4 VARCHAR2(100), -- --------------------- -- Who Columns -- --------------------- last_update_date DATE NOT NULL, last_updated_by NUMBER NOT NULL, creation_date DATE NOT NULL, created_by NUMBER NOT NULL, Copyright © 2013, AppsLead. All rights reserved
  • 48. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 last_update_login NUMBER ); INSERT INTO xx_custsearch_demo VALUES('v1','v2','v3','v4',SYSDATE,0,SYSDATE,0,0); INSERT INTO xx_custsearch_demo VALUES('v1','v3','v4','v5',SYSDATE,0,SYSDATE,0,0); INSERT INTO xx_custsearch_demo VALUES('v2','v3','v4','v5',SYSDATE,0,SYSDATE,0,0); INSERT INTO xx_custsearch_demo VALUES('v3','v4','v5','v6',SYSDATE,0,SYSDATE,0,0); Now we have 4 records in our custom table 5. Create a New Entity Object (EO) Right click on SearchDemo > New > ADF Business Components > Entity Object Name – CustSearchEO Package -- prajkumar.oracle.apps.fnd.custsearchdemo.schema.server Database Objects -- XX_CUSTSEARCH_DEMO Note – By default ROWID will be the primary key if we will not make any column to be primary key Check the Accessors, Create Method, Validation Method and Remove Method 6. Create a New View Object (VO) Right click on CustSearchDemo > New > ADF Business Components > View Object Name -- CustSearchVO Package -- prajkumar.oracle.apps.fnd.custsearchdemo.server In Step2 in Entity Page select CustSearchEO and shuttle them to selected list In Step3 in Attributes Window select columns Column1, Column2, Column3, Column4, and shuttle them to selected list Copyright © 2013, AppsLead. All rights reserved
  • 49. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 In Java page deselect Generate Java file for View Object Class: CustSearchVOImpl and Select Generate Java File for View Row Class: CustSearchVORowImpl 7. Add Your View Object to Root UI Application Module Select Right click on CustSearchAM > Application Modules > Data Model Select CustSearchVO and shuttle to Data Model list 8. Create a New Page Right click on CustSearchDemo > New > Web Tier > OA Components > Page Name -- CustSearchPG Package -- prajkumar.oracle.apps.fnd.custsearchdemo.webui 9. Select the CustSearchPG and go to the strcuture pane where a default region has been created 10. Select region1 and set the following properties: ID -- PageLayoutRN Region Style -- PageLayout AM Definition -- prajkumar.oracle.apps.fnd.custsearchdemo.server.CustSearchAM Window Title – AutoCustomize Search Page Window Title – AutoCustomization Search Page Auto Footer -- True 11. Add a Query Bean to Your Page Right click on PageLayoutRN > New > Region Select new region region1 and set following properties ID – QueryRN Region Style – query Construction Mode – autoCustomizationCriteria Copyright © 2013, AppsLead. All rights reserved
  • 50. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Include Simple Panel – False Include Views Panel – False Include Advanced Panel – False 12. Create a New Region of style table Right Click on QueryRN > New > Region Using Wizard Application Module – prajkumar.oracle.apps.fnd.custsearchdemo.server.CustSearchAM Available View Usages – CustSearchVO1 In Step2 in Region Properties set following properties Region ID – CustSearchTable Region Style – Table In Step3 in View Attributes shuttle all the items (Column1, Column2, Column3, Column4) available in “Available View Attributes” to Selected View Attributes: In Step4 in Region Items page set style to “messageStyledText” for all items 13. Select CustSearchTable in Structure Panel and set property Width to 100% 14. Include Simple Search Panel Right Click on QueryRN > New > simpleSearchPanel Automatically region2 (header Region) and region1 (MessageComponentLayout Region) created Set Following Properties for region2 Id – SimpleSearchHeader Text -- Simple Search 15. Now right click on message Component Layout Region (SimpleSearchMappings) and create two message text input beans and set the below properties to each Copyright © 2013, AppsLead. All rights reserved
  • 51. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Message TextInputBean1 Id – SearchColumn1 Search Allowed – True Data Type – VARCHAR2 Maximum Length – CSS Class – OraFieldText Prompt – Column1 Message TextInputBean2 Id – SearchColumn2 Search Allowed -- True Data Type – VARCHAR2 Maximum Length – 100 CSS Class – OraFieldText Prompt – Column2 16. Now Right Click on query Components and create simple Search Mappings. Then automatically SimpleSearchMappings and QueryCriteriaMap1 created 17. Now select the QueryCriteriaMap1 and set the below properties Id – SearchColumn1Map Search Item – SearchColumn1 Result Item – Column1 18. Now again right click on simpleSearchMappings -> New -> queryCriteriaMap, and then set the below properties Id – SearchColumn2Map Search Item – SearchColumn2 Result Item – Column2 Copyright © 2013, AppsLead. All rights reserved
  • 52. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 19. Congratulation you have successfully finished Auto Customization Search page. Run Your CustSearchPG page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 53. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 54. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 55. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Clear/ Reset Result Table of Search page in OAF Normally problem faced by developers after creating Search Page is how to Clear/ Reset Result Table when developer open search page first time or after search when developer redirecting back to same search page from any other page (say delete page or update page) Add following Code in your Search page Controller where you have constructed your Query Region import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean; ... public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN"); // Here QueryRN is your Query Region Name as shown in following snap shot queryBean.clearSearchPersistenceCache(pageContext); } Note – After add this code, no need to worry about state of Application Module (AM). This code will clean up result table automatically every time when you will open Search page first time and when you are redirecting back to search page. But still as per good coding standard while redirecting back to search page always keep AM state to FALSE Copyright © 2013, AppsLead. All rights reserved
  • 56. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Create Data Entry OAF Page By PRajkumar on Apr 22, 2012 1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarInsert. Automatically a new OA Project is also created. Name the project as InsertDemo and package as prajkumar.oracle.apps.fnd.insertdemo 2. Create a New Application Module (AM) Right Click on InsertDemo > New > ADF Business Components > Application Module Name -- InsertAM Package -- prajkumar.oracle.apps.fnd.insertdemo.server 3. Enable Passivation for the Root UI Application Module (AM) Right Click on InsertAM > Edit InsertAM > Custom Properties > Name – RETENTION_LEVEL Value – MANAGE_STATE Click add > Apply > OK 4. Create Test Table in which we will insert data (For Testing Purpose) CREATE TABLE xx_insert_demo ( -- --------------------- -- Data Columns -- --------------------- column1 VARCHAR2(100), column2 VARCHAR2(100), -- --------------------- -- Who Columns -- --------------------- last_update_date DATE NOT NULL, last_updated_by NUMBER NOT NULL, creation_date DATE NOT NULL, created_by NUMBER NOT NULL, last_update_login NUMBER ); Copyright © 2013, AppsLead. All rights reserved
  • 57. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 5. Create a New Entity Object (EO) Right click on InsertDemo > New > ADF Business Components > Entity Object Name – InsertEO Package -- prajkumar.oracle.apps.fnd.insertdemo.schema.server Database Objects -- XX_INSERT_DEMO Note – By default ROWID will be the primary key if we will not make any column to be primary key. Check the Accessors, Create Method, Validation Method and Remove Method 6. Create a New View Object (VO) Right click on InsertDemo > New > ADF Business Components > View Object Name -- InsertVO Package -- prajkumar.oracle.apps.fnd.insertdemo.server In Step2 in Entity Page select InsertEO and shuttle them to selected list In Step3 in Attributes Window select columns Column1, Column2 and shuttle them to selected list In Java page deselect Generate Java file for View Object Class: InsertVOImpl and Select Generate Java File for View Row Class: InsertVORowImpl 7. Add Your View Object to Root UI Application Module Right click on InsertAM > Edit InsertAM > Data Model > Select InsertVO in Available View Objects list and shuttle to Data Model list 8. Create a New Page Right click on InsertDemo > New > Web Tier > OA Components > Page Name -- InsertPG Package -- prajkumar.oracle.apps.fnd.insertdemo.webui Copyright © 2013, AppsLead. All rights reserved
  • 58. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 9. Select the InsertPG and go to the strcuture pane where a default region has been created 10. Select region1 and set the following properties: ID -- PageLayoutRN Region Style -- PageLayout AM Definition -- prajkumar.oracle.apps.fnd.insertdemo.server.InsertAM Window Title -- Date Entry Page Window Title -- Data Entry Page Auto Footer -- True 11. Right click PageLayoutRN > New > Region ID -- MainRN Region Style -- defaultSingleColumn 12. Create Text Input Items Right click on MainRN > New > Item Set following properties for New Item ID -- COLUMN1 Item Style -- messageTextInput Maximum Length -- 100 Length -- 20 Prompt -- Column1 View Instance -- InsertVO1 View Attribute -- Column1 Again Right click on MainRN > New > Item Set following properties for New Item ID -- COLUMN2 Copyright © 2013, AppsLead. All rights reserved
  • 59. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Item Style -- messageTextInput Maximum Length -- 100 Length -- 20 Prompt -- Column2 View Instance -- InsertVO1 View Attribute – Column2 13. Add Apply and Cancel Buttons Right click on PageLayoutRN > New > Region ID -- PageButtons Region Style -- pageButtonBar Right click on PageButtons > New > Item ID -- Cancel Item Style -- submitButton Attribute Set -- /oracle/apps/fnd/attributesets/Buttons/Cancel Disable Server Side Validation -- True Prompt -- Cancel Warm About Changes -- False Additional Text – Select to cancel this transaction. Right click on PageButtons > New > Item ID -- Apply Item Style -- submitButton Attribute Set -- /oracle/apps/fnd/attributesets/Buttons/Apply Prompt -- Apply Additional Text – Select to save this transaction. 14. Implement Row Initialization (Create a View Object Row) Copyright © 2013, AppsLead. All rights reserved
  • 60. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Add createRecord method to your InsertAMImpl class import oracle.jbo.Row; import oracle.apps.fnd.framework.OAViewObject; ... public void createRecord() { OAViewObject vo = (OAViewObject)getInsertVO1(); if (!vo.isPreparedForExecution()) { vo.executeQuery(); } Row row = vo.createRow(); vo.insertRow(row); row.setNewRowState(Row.STATUS_INITIALIZED); } 15. Create Controller for Page PageLayoutRN > Set New Controller > Package Name: prajkumar.oracle.apps.fnd.insertdemo.webui Class Name: InsertCO 16. Add Create Page Initialization to your Controller Add following code to your processRequest() import oracle.apps.fnd.framework.OAApplicationModule; ... public void processRequest(OAPageContext pageContext,OAWebBean webBean) { super.processRequest(pageContext, webBean); if (!pageContext.isFormSubmission()) { OAApplicationModule am = pageContext.getApplicationModule(webBean); am.invokeMethod("createRecord", null); } } Copyright © 2013, AppsLead. All rights reserved
  • 61. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 17. Add below method in InsertAMImpl Class to handle Apply Button action import oracle.jbo.Transaction; ... public void apply() { getTransaction().commit(); } 18. Add below Logic in InsertCO to handle Apply Button Add following code to your processFormRequest() import oracle.jbo.domain.Number; import oracle.apps.fnd.common.MessageToken; import oracle.apps.fnd.framework.OAException; import oracle.apps.fnd.framework.OAViewObject; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; ... public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {super.processFormRequest(pageContext, webBean); OAApplicationModule am = pageContext.getApplicationModule(webBean); // Pressing the "Apply" button means the transaction should be // validated and committed. if (pageContext.getParameter("Apply") != null) { OAViewObject vo = (OAViewObject)am.findViewObject("InsertVO1"); String column1 = (String)vo.getCurrentRow().getAttribute("Column1"); String column2 = (String)vo.getCurrentRow().getAttribute("Column2"); am.invokeMethod("apply"); // Create a FND Message with name "TEST_CREATE_CONFIRM" with two // tokens MessageToken[] tokens = { new MessageToken("COLUMN1", column1), new MessageToken("COLUMN2", column2) }; Copyright © 2013, AppsLead. All rights reserved
  • 62. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 OAException confirmMessage = new OAException( "FND", "TEST_CREATE_CONFIRM", tokens, OAException.CONFIRMATION, null); pageContext.putDialogMessage(confirmMessage); pageContext.forwardImmediately( "OA.jsp?page=/prajkumar/oracle/apps/fnd/insertdemo/webui/InsertPG", null, OAWebBeanConstants.KEEP_MENU_CONTEXT, null, null, true, // retain AM OAWebBeanConstants.ADD_BREAD_CRUMB_NO); } } Copyright © 2013, AppsLead. All rights reserved
  • 63. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 19. Congratulations you have successfully created data insert page. Run InsertPG page to test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 64. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 65. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 66. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Update records in OAF Page 1. Create a Search Page to Create a page please go through the following link https://blogs.oracle.com/prajkumar/entry/create_oaf_search_page 2. Implement Update Action in SearchPG Right click on ResultTable in SearchPG > New > Item Set following properties for New Item Attribute Property ID UpdateAction Item Style image Image URI updateicon_enabled.gif Atribute Set /oracle/apps/fnd/attributesets/Buttons/Update Prompt Update Additional Text Update record Height 24 Width 24 Action Type fireAction Event update Submit True Parameters Name – PColumn1 Value -- ${oa.SearchVO1.Column1} Copyright © 2013, AppsLead. All rights reserved
  • 67. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Name – PColumn2 Value -- ${oa.SearchVO1.Column2} 3. Create a Update Page Right click on SearchDemo > New > Web Tier > OA Components > Page Name – UpdatePG Package – prajkumar.oracle.apps.fnd.searchdemo.webui 4. Select the UpdatePG and go to the strcuture pane where a default region has been created 5. Select region1 and set the following properties: Attribute Property ID PageLayoutRN Region Style PageLayout AM Definition prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM Window Title Update Page Window Title Update Page Auto Footer True 6. Create the Second Region (Main Content Region) Select PageLayoutRN right click > New > Region ID – MainRN Region Style – messageComponentLayout Copyright © 2013, AppsLead. All rights reserved
  • 68. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 7. Create first Item (Empty Field) MainRN > New > messageTextInput Attribute Property ID Column1 Style Property messageTextInput Prompt Column1 Data Type VARCHAR2 Length 20 Maximum Length 100 View Instance SearchVO1 View Attribute Column1 8. Create second Item (Empty Field) MainRN > New > messageTextInput Attribute Property ID Column2 Style Property messageTextInput Prompt Column2 Data Type VARCHAR2 Length 20 Maximum Length 100 Copyright © 2013, AppsLead. All rights reserved
  • 69. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 View Instance SearchVO1 View Attribute Column2 9. Create a container Region for Apply and Cancel Button in UpdatePG Select MainRN of UpdatePG MainRN > messageLayout Attribute Property Region ButtonLayout 10. Create Apply Button Select ButtonLayout > New > Item Attribute Property ID Apply Item Style submitButton Attribute /oracle/apps/fnd/attributesets/Buttons/Apply 11. Create Cancel Button Select ButtonLayout > New > Item Attribute Property ID Cancel Item Style submitButton Copyright © 2013, AppsLead. All rights reserved
  • 70. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Attribute /oracle/apps/fnd/attributesets/Buttons/Cancel 12. Add Page Controller for SearchPG Right Click on PageLayoutRN of SearchPG > Set New Controller Name – SearchCO Package -- prajkumar.oracle.apps.fnd.searchdemo.webui Add Following code in Search Page controller SearchCO import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean; public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN"); queryBean.clearSearchPersistenceCache(pageContext); } public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean); if ("update".equals(pageContext.getParameter(EVENT_PARAM))) { pageContext.setForwardURL("OA.jsp? page=/prajkumar/oracle/apps/fnd/searchdemo/webui/UpdatePG", null, OAWebBeanConstants.KEEP_MENU_CONTEXT, null, null, true, OAWebBeanConstants.ADD_BREAD_CRUMB_NO, OAWebBeanConstants.IGNORE_MESSAGES); } } Copyright © 2013, AppsLead. All rights reserved
  • 71. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 13. Add Page Controller for UpdatePG Right Click on PageLayoutRN of UpdatePG > Set New Controller Name – UpdateCO Package -- prajkumar.oracle.apps.fnd.searchdemo.webui Add Following code in Update Page controller UpdateCO import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; import oracle.apps.fnd.framework.OAApplicationModule; import java.io.Serializable; public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); OAApplicationModule am = pageContext.getApplicationModule(webBean); String Column1 = pageContext.getParameter("PColumn1"); String Column2 = pageContext.getParameter("PColumn2"); Serializable[] params = { Column1, Column2 }; am.invokeMethod("updateRow", params); } public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean); OAApplicationModule am = pageContext.getApplicationModule(webBean); if (pageContext.getParameter("Apply") != null) { am.invokeMethod("apply"); pageContext.forwardImmediately("OA.jsp? page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG", null, OAWebBeanConstants.KEEP_MENU_CONTEXT, null, null, false, // retain AM OAWebBeanConstants.ADD_BREAD_CRUMB_NO); } else if (pageContext.getParameter("Cancel") != null) Copyright © 2013, AppsLead. All rights reserved
  • 72. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 { am.invokeMethod("rollback"); pageContext.forwardImmediately("OA.jsp? page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG", null, OAWebBeanConstants.KEEP_MENU_CONTEXT, null, null, false, // retain AM OAWebBeanConstants.ADD_BREAD_CRUMB_NO); } } 14. Add following Code in SearchAMImpl import oracle.apps.fnd.framework.server.OAApplicationModuleImpl; import oracle.apps.fnd.framework.server.OAViewObjectImpl; public void updateRow(String Column1, String Column2) { SearchVOImpl vo = (SearchVOImpl)getSearchVO1(); vo.initQuery(Column1, Column2); } public void apply() { getTransaction().commit(); } public void rollback() { getTransaction().rollback(); } 15. Add following Code in SearchVOImpl import oracle.apps.fnd.framework.server.OAViewObjectImpl; public void initQuery(String Column1, String Column2) { if ((Column1 != null) && (!("".equals(Column1.trim())))) Copyright © 2013, AppsLead. All rights reserved
  • 73. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 { setWhereClause("column1 = :1 AND column2 = :2"); setWhereClauseParams(null); // Always reset setWhereClauseParam(0, Column1); setWhereClauseParam(1, Column2); executeQuery(); } } 16. Congratulation you have successfully finished. Run Your Search page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 74. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 75. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 76. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 77. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Create and Update on one click in OA Framework We will try to implement Search Page with one text item as ID. Based on ID control will go to second page. Second page contain three text rows. ID will be displayed on second page as Styled Text in all three rows If match will be found based on ID then search result will come. If not found then empty rows will come. Based on that new data can be inserted there and existing data can be updated directly with one button click ‘Apply’ 1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace. File Name – PrajkumarSearch Project Name -- SearchDemo package -- prajkumar.oracle.apps.fnd.searchdemo 2. Create a New Application Module (AM) Right Click on SearchDemo > New > ADF Business Components > Application Module Name -- SearchAM Package -- prajkumar.oracle.apps.fnd.searchdemo.server 3. Enable Passivation for the Root UI Application Module (AM) Right Click on SearchAM > Edit SearchAM > Custom Properties > Name – RETENTION_LEVEL Value – MANAGE_STATE Click add > Apply > OK 4. Create Test Table and insert data some data in it (For Testing Purpose) CREATE TABLE xx_create_upd_demo ( -- --------------------- -- Data Columns -- ---------------------- column1 VARCHAR2(100), column2 VARCHAR2(100), Copyright © 2013, AppsLead. All rights reserved
  • 78. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 column3 VARCHAR2(100), column4 NUMBER, -- --------------------- -- Who Columns -- --------------------- last_update_date DATE NOT NULL, last_updated_by NUMBER NOT NULL, creation_date DATE NOT NULL, created_by NUMBER NOT NULL, last_update_login NUMBER ); 5. Create a New Entity Object (EO) Right click on SearchDemo > New > ADF Business Components > Entity Object Name – SearchEO Package -- prajkumar.oracle.apps.fnd.searchdemo.schema.server Database Objects -- xx_create_upd_demo Note – By default ROWID will be the primary key if we will not make any column to be primary key. Check the Accessors, Create Method, Validation Method and Remove Method 6. Create a New View Object (VO) Right click on SearchDemo > New > ADF Business Components > View Object Name -- SearchVO Package -- prajkumar.oracle.apps.fnd.searchdemo.server In Step2 in Entity Page select SearchEO and shuttle them to selected list In Step3 in Attributes Window select columns Column1, Column2, Column3, Column4 and shuttle them to selected list In Java page select Generate Java File for View Object Class: SearchVOImpl and Generate Java File for View Row Class: SearchVORowImpl 7. Add Your View Object to Root UI Application Module Select Right click on SearchAM > Application Modules > Data Model > Copyright © 2013, AppsLead. All rights reserved
  • 79. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Select SearchVO and shuttle to Data Model list 8. Create a New Page Right click on SearchDemo > New > Web Tier > OA Components > Page Name -- SearchPG Package -- prajkumar.oracle.apps.fnd.searchdemo.webui 9. Select the SearchPG and go to the strcuture pane where a default region has been created 10. Select region1 and set the following properties: ID – PageLayoutRN Scope -- Public Region Style -- PageLayout AM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM Window Title –Page Window Title – Page Header Auto Footer – True 11. Create the Second Region (Main Content Region) ID – MainRN Region Style -- messageComponentLayout Auto Footer – True 12. Create the first Item (Empty Field) MainRN > New > messageTextInput Set Following properties for new item ID – MyId Style Property – messageTextInput Copyright © 2013, AppsLead. All rights reserved
  • 80. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Prompt – Id Data Type – Number Length – 20 Maximum Length – 100 13. Create a container Region for Go-Button MainRN > messageLayout Set ID -- ButtonLayout 14. Create a Item (Go Button) Select ButtonLayout > New > Item ID – Go Item Style – submitButton Attribute -- /oracle/apps/fnd/attributesets/Buttons/Go 15. Create a New Second Page Right click on SearchDemo > New > Web Tier > OA Components > Page Name -- CreateUpdPG Package -- prajkumar.oracle.apps.fnd.searchdemo.webui 16. Select the CreateUpdPG and go to the strcuture pane where a default region has been created 17. Select region1 and set the following properties: ID – PageLayoutRN Scope -- Public Region Style -- PageLayout AM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM Window Title –Page Window Copyright © 2013, AppsLead. All rights reserved
  • 81. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Title – Page Header Auto Footer – True 18. Create the Second Region (Main Content Region) ID – MainRN Region Style -- table Auto Footer – True Records Displayed – 3 19. Create the first Item (Empty Field) MainRN > New > item Set Following properties for new item ID – Column1 Style Property – messageTextInput Prompt – Column1 Data Type – VARCHAR2 Length – 20 Maximum Length – 100 View Instance -- SearchVO1 View Attribute -- Column1 Create Second Item MainRN > New > item Set Following properties for new item ID – Column2 Style Property – messageTextInput Prompt – Column2 Data Type – VARCHAR2 Length – 20 Copyright © 2013, AppsLead. All rights reserved
  • 82. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Maximum Length – 100 View Instance -- SearchVO1 View Attribute -- Column2 Create Third Item MainRN > New > item Set Following properties for new item ID – Column3 Style Property – messageTextInput Prompt – Column3 Data Type – VARCHAR2 Length – 20 Maximum Length – 100 View Instance -- SearchVO1 View Attribute -- Column3 Create Fourth Item MainRN > New > item Set Following properties for new item ID – Column4 Style Property – messageStyledText Prompt – Column4 Data Type – NUMBER View Instance -- SearchVO1 View Attribute -- Column4 20. Add Controller for Page SearchPG Select PageLayoutRN right click Set New Controller Package Name -- prajkumar.oracle.apps.fnd.searchdemo.webui Copyright © 2013, AppsLead. All rights reserved
  • 83. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Class Name -- SearchCO Add Following code in that controller import com.sun.java.util.collections.HashMap; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean); if (pageContext.getParameter("Go") != null) { String userContent = pageContext.getParameter("MyId"); HashMap hmap = new HashMap(); hmap.put("MyId", userContent); pageContext.setForwardURL( "OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/CreateUpdPG", null, OAWebBeanConstants.KEEP_MENU_CONTEXT, null, hmap, true, OAWebBeanConstants.ADD_BREAD_CRUMB_NO, OAWebBeanConstants.IGNORE_MESSAGES); } } 21. Add Return Link to come back to SearchPG from CreateUpdPG Select CreateUpdPG in Structure Panel Select PageLayoutRN > New > returnNavigation ID – ReturnLink Destination URI – OA.jsp? page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG&retainAM=Y Text – Return to SearchPG Copyright © 2013, AppsLead. All rights reserved
  • 84. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 22. Add pageButtonBar region to implement Apply Button Right click on PageLayout > New > Region Set following properties for new region ID -- ButtonBar Region Style – pageButtonBar Select ButtonBar right click > New > Item Select newly created item and set following properties – ID – Apply Item Style – submitButton Attribute Set -- /oracle/apps/fnd/attributesets/Buttons/Apply 23. Add Controller for Page CreateUpdPG Select PageLayoutRN right click Set New Controller Package Name -- prajkumar.oracle.apps.fnd.searchdemo.webui Class Name -- CreateUpdCO Add Following code in that controller import java.io.Serializable; import oracle.apps.fnd.framework.OAApplicationModule; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); OAApplicationModule am = pageContext.getApplicationModule(webBean); String val = pageContext.getParameter("MyId"); Serializable[] params = { val }; am.invokeMethod("createRow", params); } public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean); OAApplicationModule am = pageContext.getApplicationModule(webBean); Copyright © 2013, AppsLead. All rights reserved
  • 85. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 if (pageContext.getParameter("Apply") != null) { am.getTransaction().commit(); pageContext.setForwardURL( "OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG", null, OAWebBeanConstants.KEEP_MENU_CONTEXT, null, null, true, OAWebBeanConstants.ADD_BREAD_CRUMB_NO, OAWebBeanConstants.IGNORE_MESSAGES); } } 24. Add Following code in SearchAMImpl.java import oracle.apps.fnd.framework.server.OAApplicationModuleImpl; import oracle.jbo.Row; public void createRow(String Val) { SearchVOImpl vo = getSearchVO1(); vo.initQuery(Val); int rowCount = vo.getRowCount(); if ( rowCount < 3 ) { for(int i = 3; i != rowCount ; rowCount++) { Row studrow = vo.createRow(); vo.last(); vo.next(); vo.insertRow(studrow); vo.setCurrentRow(studrow); vo.getCurrentRow().setAttribute("Column4",Val); studrow.setNewRowState(Row.STATUS_INITIALIZED); } } } Copyright © 2013, AppsLead. All rights reserved
  • 86. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 25. Add Following code in SearchVOImpl.java import oracle.jbo.domain.Number; import oracle.apps.fnd.framework.OAException; import oracle.apps.fnd.framework.server.OAViewObjectImpl; public void initQuery(String Val) { if ((Val != null) && (!("".equals(Val.trim())))) { // Do the following conversion for type consistency. Number Val2 = null; try { Val2 = new Number(Val); } catch(Exception e) { throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER"); } setWhereClause("Column4 = :1"); setWhereClauseParams(null); // Always reset setWhereClauseParam(0, Val2); executeQuery(); } } 26. Congratulation you have successfully finished. Run Your SearcgPG page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 87. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 88. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 89. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Delete Records in OAF Page 1. Create a Search Page to Create a page please go through the following link https://blogs.oracle.com/prajkumar/entry/create_oaf_search_page 2. Implement a Delete in your SearchEOImpl Class public void remove() { super.remove(); } // end remove() 3. Create a Delete Image Select ResultsTable right click > New > Item Set following properties for New Item ID – DeleteAction Item Style – image Image URI – deleteicon_enabled.gif Atribute Set -- /oracle/apps/fnd/attributesets/Buttons/Delete Prompt -- Delete Additional Text – Delete record action enabled Height – 24 Width – 24 Action Type – fireAction Event – delete Submit – True Select Parameter Properties define parameter name as Column1 and whose value is ${oa.SearchVO1.Column1} Select Parameter Properties define parameter name as Column2 and whose value is ${oa.SearchVO1.Column2} Select OK button to create your request parameters 4. Add Page Controller Copyright © 2013, AppsLead. All rights reserved
  • 90. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Add a New Contoller for SearchPG Name – SearchCO Package -- prajkumar.oracle.apps.fnd.searchdemo.webui Implement Delete Action 5. Add deleteRecord() method to SearchAMImpl import oracle.apps.fnd.framework.OAViewObject; import oracle.apps.fnd.framework.server.OAApplicationModuleImpl; import oracle.jbo.domain.Number; import oracle.apps.fnd.framework.server.OAViewObjectImpl; import oracle.jbo.RowSetIterator; ... public void deleteRecord(String Column1) { OAViewObject vo = (OAViewObject)getSearchVO1(); SearchVORowImpl row = null; int fetchedRowCount = vo.getFetchedRowCount(); RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter"); if (fetchedRowCount > 0) { deleteIter.setRangeStart(0); deleteIter.setRangeSize(fetchedRowCount); for (int i = 0; i < fetchedRowCount; i++) { row = (SearchVORowImpl)deleteIter.getRowAtRangeIndex(i); row.remove(); getTransaction().commit(); break; } } deleteIter.closeRowSetIterator(); } // end deleteRecord Note – Create Standard FND Messages DELETE_RECORD_WARN and DELETE_CONFIRM Copyright © 2013, AppsLead. All rights reserved
  • 91. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 92. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 6. Add DeleteSelection Handler Code to SearchCO.processFormRequest() import com.sun.java.util.collections.HashMap; import oracle.apps.fnd.framework.webui.OADialogPage; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; import oracle.apps.fnd.common.MessageToken; import oracle.apps.fnd.framework.OAException; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; import oracle.apps.fnd.framework.OARow; import oracle.apps.fnd.framework.OAApplicationModule; ... OAApplicationModule am = pageContext.getApplicationModule(webBean); OAViewObject vo =(OAViewObject)am.findViewObject("SearchVO1"); Copyright © 2013, AppsLead. All rights reserved
  • 93. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFEREN CE); OARow row = (OARow)am.findRowByRef(rowRef); if ("delete".equals(pageContext.getParameter(EVENT_PARAM))) { String Column1 = (String)row.getAttribute("Column1"); String Column2 = (String)row.getAttribute("Column2"); String Column3 = pageContext.getParameter("Column1"); String Column4 = pageContext.getParameter("Column2"); MessageToken[] tokens = { new MessageToken("COLUMN1", Column1), new MessageToken("COLUMN2", Column2)}; OAException mainMessage = new OAException("FND", "DELETE_RECORD_WARN", tokens); OADialogPage dialogPage = new OADialogPage(OAException.WARNING, mainMessage, null, "", ""); String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null); String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null); dialogPage.setOkButtonItemName("DeleteYesButton"); dialogPage.setOkButtonToPost(true); dialogPage.setNoButtonToPost(true); dialogPage.setPostToCallingPage(true); dialogPage.setOkButtonLabel(yes); dialogPage.setNoButtonLabel(no); java.util.Hashtable formParams = new java.util.Hashtable(1); formParams.put("Column1", Column3); formParams.put("Column2", Column4); dialogPage.setFormParameters(formParams); pageContext.redirectToDialogPage(dialogPage); } 7. Add Delete Confirmation Handler Code to SearchCO.processFormRequest() import java.io.Serializable; import oracle.apps.fnd.framework.OAApplicationModule; ... Copyright © 2013, AppsLead. All rights reserved
  • 94. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 else if (pageContext.getParameter("DeleteYesButton") != null) { String Column1 = (String)row.getAttribute("Column1"); String Column2 = (String)row.getAttribute("Column2"); Serializable[] parameters = { Column1 }; OAApplicationModule am = pageContext.getApplicationModule(webBean); am.invokeMethod("deleteRecord", parameters); OAException message = new OAException("FND", "DELETE_CONFIRM", null, OAException.CONFIRMATION, null); pageContext.putDialogMessage(message); } 8. Congratulation you have successfully finished. Run Your page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 95. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 96. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 97. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Implement Master Detail Relationship in OAF Page Let us try to implement Master Detail Relationship in advanceedTable. We will create two tables master table and child table. Both have relationship with each other with Column1 (Note - Column1 is a primary key in both tables) 1. Create a New OA Workspace and Empty OA Project File> New > General> Workspace Configured for Oracle Applications File Name -- MasterDetailProj Project Name – MasterDetailDemo Default Package -- prajkumar.oracle.apps.fnd.masterdetaildemo 2. Create Application Module AM MasterDetailDemo right click > New > ADF Business Components > Application Module Name -- MasterdetailDemoAM Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server Check Generate JavaFile(s) 3. We need two tables one table will be act as Master table and second table will be act as Child or detail table. Lets Create two tables -- Master Table CREATE TABLE master_table_demo ( -- --------------------- -- Data Columns -- --------------------- Column1 VARCHAR2(100), Column2 VARCHAR2(100), -- ---------------------- -- Who Columns -- ---------------------- last_update_date DATE NOT NULL, Copyright © 2013, AppsLead. All rights reserved
  • 98. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 last_updated_by NUMBER NOT NULL, creation_date DATE NOT NULL, created_by NUMBER NOT NULL, last_update_login NUMBER ); -- Detail Table CREATE TABLE detail_table_demo ( -- --------------------- -- Data Columns -- --------------------- Column1 VARCHAR2(100), Column2 VARCHAR2(100), -- ---------------------- -- Who Columns -- ---------------------- last_update_date DATE NOT NULL, last_updated_by NUMBER NOT NULL, creation_date DATE NOT NULL, created_by NUMBER NOT NULL, last_update_login NUMBER ); Note – Consider Master Table is Linked to Detail Table with Column1 4. Lets put some data in the tables -- Insert Data into Master Table INSERT INTO master_table_demo VALUES ( ‘VAL1’, ‘VAL2’, SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO master_table_demo VALUES ( ‘VAL3’, ‘VAL4’, SYSDATE, 0, SYSDATE, 0, 0); -- Insert Data into Detail Table INSERT INTO detail_table_demo VALUES ( ‘VAL1’, ‘VAL6’, SYSDATE, 0, SYSDATE, 0, 0); Copyright © 2013, AppsLead. All rights reserved
  • 99. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 INSERT INTO detail_table_demo VALUES ( ‘VAL3’, ‘VAL8’, SYSDATE, 0, SYSDATE, 0, 0); 5. Create a New Entity Object (EO) for Master Table Right click on MasterDetailDemo > New > ADF Business Components > Entity Object Name – MasterEO Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.schema.server Database Objects -- master_table_demo Note -- Make Column1 as a primary key Check the Accessors, Create Method, Validation Method and Remove Method 6. Create a New Entity Object (EO) for Detail Table Copyright © 2013, AppsLead. All rights reserved
  • 100. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Right click on MasterDetailDemo > New > ADF Business Components > Entity Object Name – DetailEO Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.schema.server Database Objects -- detail_table_demo Note -- Make Column1 as a primary key Check the Accessors, Create Method, Validation Method and Remove Method Note – Column1 in both tables is common Column to make parent child relationship 7. Lets Create View Object for Master Table Right click on MasterDetailDemo > New > ADF Business Components > View Object Copyright © 2013, AppsLead. All rights reserved
  • 101. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Name -- MasterVO Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server In Step2 in Entity Page select MasterEO and shuttle them to selected list Create transient item by clicking on New Name – DetailFlag Type -- Boolean In Step3 in Attributes Window select columns Column1, Column2, DetailFlag and shuttle them to selected list In Java page deselect Generate Java file for View Object Class: MasterVOImpl 8. Lets Create View Object for Detail Table Right click on MasterDetailDemo > New > ADF Business Components > View Object Name -- DetailVO Copyright © 2013, AppsLead. All rights reserved
  • 102. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server In Step2 in Entity Page select DetailEO and shuttle them to selected list In Step3 in Attributes Window select columns Column1, Column2 and shuttle them to selected list In Java page deselect Generate Java file for View Object Class: DetailVOImpl 9. Create View Link Add Your View Object to Root UI Application Module Right click on MasterDetailDemo > New > ADF Business Components > View Link Name – MasterdetailDemoVL Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server Copyright © 2013, AppsLead. All rights reserved
  • 103. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 10. Add Your View Object to Root UI Application Module Right click on MasterdetailDemoAM > Application Modules > Data Model > Select MasterVO, DetailVO via ViewLink, DetailVO and shuttle to Data Model list 11. Create a New Page Right click on MasterdetailDemo > New > Web Tier > OA Components > Page Name -- MasterdetailDemoPG Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.webui Copyright © 2013, AppsLead. All rights reserved
  • 104. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 12. Select MasterdetailDemoPG and go to the strcuture pane where a default region has been created 13. Select region1 and set the following properties: ID -- PageLayoutRN Region Style -- PageLayout AM Definition -- prajkumar.oracle.apps.fnd.masterdetaildemo.server.MasterdetailDemoAM Window Title – Master Detail Demo Page Window Title – Master Detail Demo Page Header Auto Footer – True 14. Add a New Region MainRN Select PageLayoutRN right click > New > Region ID -- MainRN Region Style – header 15. Create a Master Table Region Select MainRN > New > Region ID – MainTableRN Region Style -- advancedTable View Instance -- MasterVO1 Detail View Attribute – DetailFlag Child View Attribute -- Column1 View Link Instance -- MasterdetailDemoVL1 Width – 100% Rendered – True 16. Create Columns and their items for MainTableRN Create Column1 Copyright © 2013, AppsLead. All rights reserved
  • 105. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Select MainTableRN > New > column Select column1 > New > Item ID – item1 Item Style – messageStyledText View Attribute – Column1 Create Column2 Select MainTableRN > New > column Select column2 > New > Item ID – item2 Item Style – messageStyledText View Attribute – Column2 17. Create a Detail Region Select MainTableRN > New > detail A new Region will be get created under detail set following properties for that region ID – DetailRN Region Style – header 18. Create a DetailTable Region Select DetailRN > New > Region For New region set following Properties ID – DetailTableRN Region Style – advancedTable View Instance -- DetailVO2 View Link Instance -- MasterdetailDemoVL1 Width – 100% Rendered – True Copyright © 2013, AppsLead. All rights reserved
  • 106. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 19. Create Columns and their items for DetailTableRN Create Column3 Select DetailTableRN > New > column Select column3 > New > Item ID – item3 Item Style – messageStyledText View Instance – DetailVO2 View Attribute – Column1 Create Column4 Select DetailTableRN > New > column Select column4 > New > Item ID – item4 Item Style – messageStyledText View Instance – DetailVO2 View Attribute – Column2 20. Add Controller for Page MasterdetailDemoPG Select PageLayoutRN right click Set New Controller Package Name -- prajkumar.oracle.apps.fnd.masterdetaildemo.webui Class Name -- MasterdetailDemoCO Set Following Code in CO import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean; import prajkumar.oracle.apps.fnd.masterdetaildemo.server.MasterdetailDemoAMImpl; ... public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); MasterdetailDemoAMImpl AM = Copyright © 2013, AppsLead. All rights reserved
  • 107. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 (MasterdetailDemoAMImpl)pageContext.getApplicationModule(webBean); pageContext.writeDiagnostics(this, "Calling Method", 1); AM.MasterDetails(pageContext,webBean); } 21. Add Following Code in your AMImpl Class (MasterdetailDemoAMImpl.java) import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean; ... public void MasterDetails(OAPageContext pageContext,OAWebBean webBean) { MasterVOImpl pvo = getMasterVO1(); pvo.executeQuery(); } 22. Final Structure pane will look like following picture Copyright © 2013, AppsLead. All rights reserved
  • 108. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 23. Congratulation you have successfully finished. Run Your MasterdetailDemoPG page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 109. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 110. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Key Flex Fields, KFF in OAF 1. Create a New Workspace and Project Right click Workspaces and click create New OA Workspace and name it as PRajkumarKFFDemo. Automatically a new OA Project will also be created. Name the project as KFFDemo and package as prajkumar.oracle.apps.fnd.kffdemo 2. Create a New Application Module (AM) Right Click on KFFDemo > New > ADF Business Components > Application Module Name -- KFFAM Package -- prajkumar.oracle.apps.fnd.kffdemo.server Check Application Module Class: KFFAMImpl Generate JavaFile(s) 3. Create a New View Object (VO) Right click on KFFDemo > New > ADF Business Components > View Object Name -- KFFVO Package -- prajkumar.oracle.apps.fnd.kffdemo.server Note - The VO is not based on any EO so click next and go to the query section and paste the query SELECT code_combination_id FROM gl_code_combinations_kfv In Step8 Check Object Class: KFFVOImpl -> Generate Java File -> Bind Variable Accessors 4. Add View Object to Root UI Application Module Right Click on KFFAM > Edit KFFAM > Data Model and shuttle KFFVO from Available View Objects to Data Model Copyright © 2013, AppsLead. All rights reserved
  • 111. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 5. Create a New Page Right click on KFFDemo > New > Web Tier > OA Components > Page Name -- KFFPG Package -- prajkumar.oracle.apps.fnd.kffdemo.webui 6. Select the KFFPG and go to the strcuture pane where a default region has been created 7. Select region1 and set the following properties: Attribute Property ID PageLayoutRN AM Definition prajkumar.oracle.apps.fnd.kffdemo.server.KFFAM Window Title Key Flex Field Demo Window Title Key Flex Field Demo 8. Create Stack Layout Region Under Page Layout Region Right click PageLayoutRN > New > Region Attribute Property ID MainRN AM Definition stackLayout 9. Create a New Item of type Flex under the Stack Layout Region Copyright © 2013, AppsLead. All rights reserved
  • 112. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Right click on MainRN > New > Item Set Following Properties for New Item -- Attribute Property ID KeyFlexItem Item Style Flex Prompt Accounting Key Flex Field Appl Short Name SQLGL Name GL# Type Key View Instance KFFVO1 10. Create Controller for page KFFPG Right Click on PageLayoutRN > Set New Controller Package Name: prajkumar.oracle.apps.fnd.kffdemo.webui Class Name: KFFCO Write Following Code in KFFCO processRequest public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); OAKeyFlexBean kffId = (OAKeyFlexBean)webBean.findIndexedChildRecursive("KeyFlexItem"); // Set the code combination lov kffId.useCodeCombinationLOV(true); Copyright © 2013, AppsLead. All rights reserved
  • 113. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 //set the structure code for the item key flex kffId.setStructureCode("FED_AFF"); //Set the attribute name to the item kffId.setCCIDAttributeName("CodeCombinationId"); //Execute the Query KFFAMImpl am = (KFFAMImpl)pageContext.getApplicationModule(webBean); KFFVOImpl vo = (KFFVOImpl)am.findViewObject("KFFVO1"); if(!vo.isPreparedForExecution()) { vo.executeQuery(); } } Note -- If you do not want to see the key flex field is merging one then change the code in the controller class as below kffId.useCodeCombinationLOV(false); 11. Use the below Query to find the Structure Code SELECT fif.application_id, fif.id_flex_code, fif.id_flex_name, fif.application_table_name, fif.description, fifs.id_flex_num, fifs.id_flex_structure_code, fifse.segment_name, fifse.segment_num, fifse.flex_value_set_id FROM fnd_id_flexs fif, fnd_id_flex_structures fifs, fnd_id_flex_segments fifse WHERE fif.application_id = fifs.application_id AND fif.id_flex_code = fifs.id_flex_code AND fifse.application_id = fif.application_id AND fifse.id_flex_code = fif.id_flex_code AND fifse.id_flex_num = fifs.id_flex_num Copyright © 2013, AppsLead. All rights reserved
  • 114. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 AND fif.id_flex_code LIKE 'GL#' AND fif.id_flex_name LIKE 'Accounting Flexfield'; 12. Congratulation you have successfully finished. Run Your page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 115. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 116. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Implement Dependent LOV in OA Framework Let us try to create a Dependent LOV. In this exercise first Lov Input is “Employee Name” based on Employee Name Second Lov Input will give “Dependent Name” 1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarDependentLovDemo. Automatically a new OA Project will be created. Name the project as DependentLovDemo and package as prajkumar.oracle.apps.fnd.dependentlovdemo Note -- Check Run Option Property for Project. Right Click on DependentLovDemo > Oracle Applications > Run Options. Check OADeveloperMode should not be inSelected Options if it is there in Selected Options list then shuttle it back to Available Options Copyright © 2013, AppsLead. All rights reserved
  • 117. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 2. Create a New Application Module (AM) Right Click on DependentLovDemo > New > ADF Business Components > Application Module Name -- DependentLovAM Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.server 3. Create a New View Object (VO) Right click on DependentLovDemo > New > ADF Business Components > View Object Name – DependentLovVO1 Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.server Copyright © 2013, AppsLead. All rights reserved
  • 118. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Note - The VO is not based on any EO so click next and go to the query section and paste the query SELECT person_id, full_name FROM per_all_people_f WHERE SYSDATE BETWEEN effective_start_date AND effective_end_date 4. Create a New View Object for Second Lov (VO) Right click on DependentLovDemo > New > ADF Business Components > View Object Name – DependentLovVO2 Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.server Note - The VO is not based on any EO so click next and go to the query section and paste the query SELECT pcr.person_id, papf.full_name FROM per_contact_relationships pcr, per_all_people_f papf WHERE papf.person_id = pcr.contact_person_id AND SYSDATE BETWEEN pcr.date_start AND NVL(pcr.date_end,SYSDATE) AND SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date 5. Add Your View Objects to Root UI Application Module Select Right click on DependentLovAM > Edit DependentLovAM > Data Model > Select DependentLovVO1 and DependentLovVO2 and shuttle to Data Model list Copyright © 2013, AppsLead. All rights reserved
  • 119. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Create First LOV Region for VO DependentLovVO1 6. Create First LOV Region Right click on DependentLovDemo > New > Web Tier > OA Components > Region Name -- FirstLovRN Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.webui Region Style -- listOfValues Scope -- Public Note - The property Scope is the key property which makes the LOV region public and Copyright © 2013, AppsLead. All rights reserved
  • 120. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 makes it usable in multiple pages 7. Right click on FirstLovRN and click table using wizard. In the wizard choose the prajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAM and select DependentLovVO1_1. Click Next Region Id – FirstLovRN Region style – table Copyright © 2013, AppsLead. All rights reserved
  • 121. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 8. Shuttle the two attributes to the right side.That is PersonId and FullName Copyright © 2013, AppsLead. All rights reserved
  • 122. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 9. Set Region Item properties as below – ID Prompt Style Datatype PersonId_LOV PersonId formValue NUMBER FullName_LOV FullName messageStyledText VARCHAR2 Copyright © 2013, AppsLead. All rights reserved
  • 123. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 10. Click Next and Finish 11. Select PersonId_LOV and Set Following Properties – Attribute Property Search Allowed False Selective Search Criteria False 12. Select FullName_LOV and Set Following Properties – Attribute Property Search Allowed True Copyright © 2013, AppsLead. All rights reserved
  • 124. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Selective Search Criteria False Now Same way Create Second LOV Region for VO DependentLovVO2 13. Create Second LOV Region Right click on DependentLovDemo > New > Web Tier > OA Components > Region Name -- SecondLovRN Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.webui Region Style -- listOfValues Scope -- Public Note - The property Scope is the key property which makes the LOV region public and makes it usable in multiple pages 14. Right click on SecondLovRN and click table using wizard. In the wizard choose the prajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAM and select DependentLovVO2_1. Click Next Copyright © 2013, AppsLead. All rights reserved
  • 125. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Region Id – SecondLovRN Region style – table Copyright © 2013, AppsLead. All rights reserved
  • 126. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 15. Shuttle the two attributes to the right side.That is PersonId and FullName Copyright © 2013, AppsLead. All rights reserved
  • 127. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 16. Set Region Item properties as below – ID Prompt Style Datatype Second_PersonId_LOV PersonId messageStyledText NUMBER Second_FullName_LOV FullName messageStyledText VARCHAR2 Copyright © 2013, AppsLead. All rights reserved
  • 128. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 17. Click Next and Finish 18. Select Second_PersonId_LOV and Set Following Properties – Attribute Property Search Allowed False Selective Search Criteria True 19. Select Second_FullName_LOV and Set Following Properties – Attribute Property Search Allowed True Copyright © 2013, AppsLead. All rights reserved
  • 129. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Selective Search Criteria False 20. Create a New Page Right click on DependentLovDemo > New > Web Tier > OA Components > Page Attribute Property Name DependentLovPG Package prajkumar.oracle.apps.fnd.dependentlovdemo.webui 21. Select the DependentLovPG and go to the strcuture pane where a default region has been created 22. Select region1 and set the following properties: Attribute Property ID PageLayoutRN AM Definition prajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAM Window Title Dependent List of values Demo Window Title Dependent List of values Demo 23. Right click PageLayoutRN and click new Region Copyright © 2013, AppsLead. All rights reserved
  • 130. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Attribute Property ID MainRN Region Style messageComponentLayout 24. Create a New item to store Return result of First LOV and to give Search Criteria to second LOV Select PageLayoutRN > New > Item Set following Properties for New Item – Attribute Property ID ParentPersonId Item Style formValue Data Type Number Build First LOV on Page: 25. Right click the MainRN and click new messageLovInput Set Following Properties for Newly Created messageLovInput Attribute Property ID Employee_Name External Lov /prajkumar/oracle/apps/fnd/dependentlovdemo/webui/FirstLovRN Search Allowed False Selective Search Criteria True Copyright © 2013, AppsLead. All rights reserved
  • 131. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Prompt Employee Name Select LovMap1 and set following properties -- Attribute Property Lov Region Item FullName_LOV Return Item Employee_Name Criteria Item Employee_Name Create LovMap2 and set following properties for that -- Select Employee_Name > lovMappings right click New > lovMap Set following properties for lovMap2 -- Attribute Property Lov Region Item PersonId_LOV Return Item ParentPersonId Build Second LOV on Page: 26. Right click the MainRN and click new messageLovInput Set Following Properties for Newly Created messageLovInput Attribute Property ID Dependent_Name Copyright © 2013, AppsLead. All rights reserved
  • 132. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 External Lov /prajkumar/oracle/apps/fnd/dependentlovdemo/webui/SecondLovRN Search Allowed True Selective Search Criteria True Prompt Dependent Name Select LovMap3 and set following properties -- Attribute Property Lov Region Item Second_FullName_LOV Return Item Dependent_Name Programmatic Query True Create LovMap4 and set following properties for that -- Select Dependent_Name > lovMappings right click New > lovMap Set following properties for lovMap4 -- Attribute Property Lov Region Item Second_PersonId_LOV Criteria Item ParentPersonId Required True 27. Congratulation you have successfully finished. Run Your page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 133. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 134. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 135. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 136. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Implement External LOV in OA Framework 1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarLovDemo. Automatically a new OA Project is also created. Name the project as LovDemo and package as prajkumar.oracle.apps.fnd.lovdemo 2. Create a New Application Module (AM) Right Click on LovDemo > New > ADF Business Components > Application Module Name -- LovAM Package -- prajkumar.oracle.apps.fnd.lovdemo.server 3. Create a New View Object (VO) Right click on LovDemo > New > ADF Business Components > View Object Name -- LovVO Package -- prajkumar.oracle.apps.fnd.lovdemo.server Note - The VO is not based on any EO so click next and go to the query section and paste the query SELECT employee_number, full_name FROM per_all_people_f WHERE SYSDATE BETWEEN effective_start_date AND effective_end_date 4. Add View Object to Root UI Application Module 5. Create a New Page Right click on LovDemo > New > Web Tier > OA Components > Page Name -- LovPG Package -- prajkumar.oracle.apps.fnd.lovdemo.webui Copyright © 2013, AppsLead. All rights reserved
  • 137. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 6. Select the LovPG and go to the strcuture pane where a default region has been created 7. Select region1 and set the following properties: ID -- PageLayoutRN AM Definition -- prajkumar.oracle.apps.fnd.lovdemo.server.LovAM Window Title -- List of values Demo Window Title – List of values Demo 8. Right click PageLayoutRN and click new Region ID -- MainRN Region Style – messageComponentLayout Note - Style is given as messageComponentlayout because we are going to create only message components that is messageLovInput item in that region 9. Create a New Region Right click on LovDemo > New > Web Tier > OA Components > Region Name -- EmployeeLovRN Package -- prajkumar.oracle.apps.fnd.lovdemo.webui Region Style -- listOfValues Scope -- Public Note - The property Scope is the key property which makes the LOV region public and makes it usable in multiple pages 10. Select EmployeeLovRN. Right click on EmployeeLovRN in Structure pane and click table using wizard. In the wizard choose the prajkumar.oracle.apps.fnd.lovdemo.server.LovAM and select the LovVO1. Click Next Region Id -- LovRN Region style -- table Copyright © 2013, AppsLead. All rights reserved
  • 138. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 11. Shuttle the two attributes to the right side.That is EmployeeNumber and FullName 12. Click next, check the mapping and then finish 13. Select the field FullName and set the following properties: Search Allowed -- True Selective Search Criteria – True Note - The first property lets users search on these values in the LOV, and the second property ensures that the users specify search criteria for at least one of these values to avoid a blind query Attaching External LOV to Page: 14. Click on LovPG and right click the MainRN and click new messageLovInput External Lov -- /prajkumar/oracle/apps/fnd/lovdemo/webui/EmployeeLovRN Lov Region Item -- FullName Return Item -- item1 Criteria Item -- item1 Prompt -- Employee Name 15. Congratulation you have successfully finished. Run Your page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 139. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 140. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Set Default Value for messageTextInput in OAF 1. Create a New OA Workspace and Empty OA Project File > New > General > Workspace Configured for Oracle Applications File Name – PrajkumarSetDefaultValDemo Automatically a new OA Project will also be created Project Name -- SetDefaultProj Default Package -- prajkumar.oracle.apps.fnd.setdefaultproj 2. Create Application Module AM Right Click on SetDefaultProj > New > ADF Business Components > Application Module Name -- SetDefaultAM Package -- prajkumar.oracle.apps.fnd.setdefaultproj.server Check Application Module Class: SetDefaultAMImpl Generate JavaFile(s) 3. Create a OA components Page Right click on SetDefaultProj > New > Web Tier > OA Components > Page Name -- SetDefaultPG Package -- prajkumar.oracle.apps.fnd.setdefaultproj.webui 4. Select SetDefaultPG and go to the strcuture pane where a default region has been created 5. Select region1 and set the following properties: Attribute Property ID PageLayoutRN Copyright © 2013, AppsLead. All rights reserved
  • 141. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Region Style pageLayout Form Property True Auto Footer True Window Title Set Default Value Window Title Title Set Default Value Header AM Definition prajkumar.oracle.apps.fnd.setdefaultproj.SetDefaultAM 6. Create the Second Region Right click on PageLayoutRN > New > Region Attribute Property ID MainRN Region Style messageComponentLayout 7. Create messageTextInput MainRN > New > messageTextInput Attribute Property ID MyTextitemId Style Property messageTextInput Length 20 Maximum Length 50 Copyright © 2013, AppsLead. All rights reserved
  • 142. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 8. Save Your Work 9. Add a Controller MainRN > Set New Controller Package Name -- prajkumar.oracle.apps.fnd.setdefaultvaldemo.webui Class Name -- SetDefaultValCO 10. Edit Your Controller Add Following Code in processRequest import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean; public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); String myValue = "My Default Value"; OAMessageTextInputBean textBean = (OAMessageTextInputBean)webBean.findChildRecursive("MyTextitemId"); textBean.setValue(pageContext, myValue); } 11. Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 143. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Implement PopList in OA Framework 1. Create a New Workspace and Project File> New > General> Workspace Configured for Oracle Applications File Name -- PopListDemo Project Name – PopListDemo Default Package -- prajkumar.oracle.apps.fnd.poplistdemo 2. Create a New Application Module (AM) Right Click on PopListDemo > New > ADF Business Components > Application Module Name -- poplistdemoAM Package -- prajkumar.oracle.apps.fnd.poplistdemo.server 3. Create a New View Object (VO) Right click on PopListDemo > New > ADF Business Components > View Object Name -- poplistdemoVO Package -- prajkumar.oracle.apps.fnd.poplistdemo.server Note - The VO is not based on any EO so click next and go to the query section and paste the query SELECT 'poplist_item1' poplist_items FROM DUAL UNION SELECT 'poplist_item2' FROM DUAL UNION SELECT 'poplist_item3' FROM DUAL 4. Create a New Page Right click on PopListDemo > New > Web Tier > OA Components > Page Name -- poplistdemoPG Package -- prajkumar.oracle.apps.fnd.poplistdemo.webui Copyright © 2013, AppsLead. All rights reserved
  • 144. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 5. Select the poplistdemoPG and go to the strcuture pane where a default region has been created 6. Select region1 and set the following properties: ID -- PageLayoutRN AM Definition -- prajkumar.oracle.apps.fnd.poplistdemo.server.poplistdemoAM Window Title -- PopList Demo Window Title – PopList Demo Header 7. Right click PageLayoutRN and click new Region ID -- MainRN Region Style – messageComponentLayout 8. Verify Your VO attribute name Select poplistdemoVO right click > Edit poplistdemoVO > Attributes > Verify the Name it should be “poplist_items” if it is not then edit it and enter name “poplist_items” 9. Create the first Item (Empty Field) MainRN > New > messageChoice Set following properties for new item ID – MyPopList Required -- Yes Picklist View Definition -- prajkumar.oracle.apps.fnd.poplistdemo.server.poplistdemoVO Picklist Display Attribute – poplist_items (Name of Attribute in Your VO) Picklist Value Attribute -- poplist_items CSS Class – OraFieldText Copyright © 2013, AppsLead. All rights reserved
  • 145. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Prompt – My PopList 10. Congratulation you have successfully finished. Run Your page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 146. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Partial Page Rendering in OAF Page Let us try to implement partial page rendering for a text item. If value of TextItem1 is null then TextItem2 will not be appreared on UI. If value of TextItem1 is not null then TextItem2 will be appreared on UI. 1. Create a New OA Workspace and Empty OA Project File> New > General> Workspace Configured for Oracle Applications File Name -- PPRProj Project Name – PPRDemoProj Default Package -- prajkumar.oracle.apps.fnd.pprdemo 2. Create Application Module AM PPRDemoProj right click > New > ADF Business Components > Application Module Name -- PPRAM Package -- prajkumar.oracle.apps.fnd.pprdemo.server Check Application Module Class: PPRAMImpl Generate JavaFile(s) 3. Create a PPRVO View Object PPRDemoProj> New > ADF Business Components > View Objects Name – PPRVO Package – prajkumar.oracle.apps.fnd.pprdemo.server In Attribute Page Click on New button and create transient primary key attribute with the following properties: Attribute Property Copyright © 2013, AppsLead. All rights reserved
  • 147. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Name RowKey Type Number Updateable Always Key Attribute (Checked) Click New button again and create transient attribute with the following properties: Attribute Property Name TextItem2Render Type Boolean Updateable Always Note – No Need to generate any JAVA files for PPRVO 4. Add Your View Object to Root UI Application Module Right click on PPRAM > Edit PPRAM > Data Model > Select PPRVO in Available View Objects list and shuttle to Data Model list 5. Create a OA components Page PPRDemoProj right click > New > OA Components > Page Name – PPRPG Package -- prajkumar.oracle.apps.fnd.pprdemo.webui 6. Modify the Page Layout (Top-level) Region Copyright © 2013, AppsLead. All rights reserved
  • 148. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Attribute Property ID PageLayoutRN Region Style pageLayout Form Property True Auto Footer True Window Title PPR Demo Window Title True Title PPR Demo Page Header AM Definition prajkumar.oracle.apps.fnd.pprdemo.server.PPRAM 7. Create the Second Region (Main Content Region) Right click on PageLayoutRN > New > Region Attribute Property ID MainRN Region Style messageComponentLayout 8. Create Two Text Items Create First messageTextItem -- Right click on MainRN > New > messageTextInput Attribute Property ID TextItem1 Copyright © 2013, AppsLead. All rights reserved
  • 149. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Region Style messageTextInput Prompt Text Item1 Length 20 Disable Server Side Validation True Disable Client Side Validation True Action Type firePartialAction Event TextItem1Change Submit True Note -- Disable Client Side Validation and Event property appears after you set the Action Type property to firePartialAction Create Second messageTextItem -- Select MainRN right click > New > messageTextInput Attribute Property ID TextItem2 Region Style messageTextInput Prompt Text Item2 Length 20 Rendered ${oa.PPRVO1.TextItem2Render} 9. Add Following code in PPRAMImpl.java Copyright © 2013, AppsLead. All rights reserved
  • 150. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 import oracle.apps.fnd.framework.OARow; import oracle.apps.fnd.framework.OAViewObject; import oracle.apps.fnd.framework.server.OAApplicationModuleImpl; import oracle.apps.fnd.framework.server.OAViewObjectImpl; public void handlePPRAction() { Number val = 1; OAViewObject vo = (OAViewObject)findViewObject("PPRVO1"); if (vo != null) { if (vo.getFetchedRowCount() == 0) { vo.setMaxFetchSize(0); vo.executeQuery(); vo.insertRow(vo.createRow()); OARow row = (OARow)vo.first(); row.setAttribute("RowKey", val); row.setAttribute("TextItem2Render", Boolean.FALSE); } } } 10. Implement Controller for Page Select PageLayoutRN in Structure pane right click > Set New Controller Package Name -- prajkumar.oracle.apps.fnd.pprdemo.webui Class Name – PPRCO Write following code in processFormRequest function of PPRCO Controller import oracle.apps.fnd.framework.OARow; import oracle.apps.fnd.framework.OAViewObject; public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); Copyright © 2013, AppsLead. All rights reserved
  • 151. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean); am.invokeMethod("handlePPRAction"); } public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean); PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean); OAViewObject vo = (OAViewObject)am.findViewObject("PPRVO1"); OARow row = (OARow)vo.getCurrentRow(); if ("TextItem1Change".equals(pageContext.getParameter(EVENT_PARAM))) { if (pageContext.getParameter("TextItem1").equals("")) { row.setAttribute("TextItem2Render", Boolean.FALSE); } else { row.setAttribute("TextItem2Render", Boolean.TRUE); } } } 11. Congratulation you have successfully finished. Run Your PPRPG page and Test Your Work Copyright © 2013, AppsLead. All rights reserved
  • 152. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Copyright © 2013, AppsLead. All rights reserved
  • 153. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Execute parameterized PL SQL procedure from OAF page Let us try to call PL/SQL package from OAF page. We will try to send two interger values to one PL/SQL procedure which will do sum of that numbers and will return back sum of that numbers 1. Create a New OA Workspace and Empty OA Project File> New > General> Workspace Configured for Oracle Applications File Name -- ParameterizedProcProj Project Name – ParameterizedProcDemo Default Package -- prajkumar.oracle.apps.fnd.parameterizedprocdemo 2. Create Application Module AM Right click on ParameterizedProcProj > New > ADF Business Components > Application Module Name -- ParameterizedProcDemoAM Package -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.server Check Application Module Class: ParameterizedProcDemoAMImpl Generate JavaFile(s) 3. Create a New Page Right click on ParameterizedProcProj > New > Web Tier > OA Components > Page Name -- ParameterizedProcDemoPG Package -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.webui 4. Select region1 and set the following properties: ID -- PageLayoutRN Region Style -- PageLayout AM Definition --prajkumar.oracle.apps.fnd.parameterizedprocdemo.server.ParameterizedProcDemoA M Window Title – Execute Paramterized Procedure Demo Page Window Copyright © 2013, AppsLead. All rights reserved
  • 154. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 Title – Execute Paramterized Procedure Demo Page Header Auto Footer – True 5. Add a New Region MainRN Select PageLayoutRN right click > New > Region ID -- MainRN Region Style – messageComponentLayout 6. Create messageTextInput Items Create item1 Select MainRN > New > messageTextInput Set following Properties for Text Item1 ID – item1 Item Style – messageTextInput Data Type -- Number Prompt – Text Item1 Maximum Length – 20 Length -- 20 Create item2 Select MainRN > New > messageTextInput Set following Properties for Text Item1 ID – item2 Item Style – messageTextInput Data Type -- Number Prompt – Text Item2 Maximum Length – 20 Length -- 20 Copyright © 2013, AppsLead. All rights reserved
  • 155. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 7. Create a Submit Button Right Click on MainRN > New > messageLayout Select newly created messageLayout right click > New > item Set Following Properties for newly created item ID – Sum Item Style – submitButton Attribute Set -- /oracle/apps/fnd/attributesets/Buttons/Go Prompt – Sum 8. Run Your Page UI is ready -- 9. Let us create a package and package body which we will call from OAF page This Package takes three parameters all are number. First two are IN parameters and last is OUT as sum of first two numbers Package Spec CREATE OR REPLACE PACKAGE APPS.test_package AUTHID CURRENT_USER IS PROCEDURE data_sum Copyright © 2013, AppsLead. All rights reserved
  • 156. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 ( item1 IN NUMBER, item2 IN NUMBER, data_sum OUT NUMBER ); END test_package; / SHOW ERRORS; EXIT; Package Body CREATE OR REPLACE PACKAGE BODY APPS.test_package IS PROCEDURE data_sum ( item1 IN NUMBER, item2 IN NUMBER, data_sum OUT NUMBER ) IS BEGIN data_sum := item1 + item2; END data_sum; END test_package; / SHOW ERRORS; EXIT; 10. Add Following Code in your AMImpl Class (ParameterizedProcDemoAMImpl.java) import oracle.apps.fnd.framework.server.OADBTransaction; import oracle.apps.fnd.framework.server.OADBTransactionImpl; import oracle.jdbc.OracleCallableStatement; import java.sql.Types; import oracle.apps.fnd.framework.OAException; ... public String dataSumAction(String item1,String item2) { OADBTransaction oadbtransaction = (OADBTransaction)getTransaction(); OADBTransactionImpl oadbtransactionimpl = Copyright © 2013, AppsLead. All rights reserved
  • 157. Contact Us: 002 – 010 900 160 23 002 – 0100 62 62 837 (OADBTransactionImpl)getTransaction(); String retValues; StringBuffer str = new StringBuffer(); str.append( " BEGIN "); str.append( " test_package.data_sum( "); str.append( " item1 => :1, "); str.append( " item2 => :2, "); str.append( " data_sum => :3 "); str.append( " ); "); str.append( " END; "); OracleCallableStatement oraclecallablestatement = (OracleCallableStatement)oadbtransaction.createCallableStatement(str.toString(), 1); try{ oraclecallablestatement.setInt(1, Integer.parseInt(item1) ); oraclecallablestatement.setInt(2, Integer.parseInt(item2) ); oraclecallablestatement.registerOutParameter(3, Types.VARCHAR); oraclecallablestatement.execute(); retValues = oraclecallablestatement.getString(3); } catch(Exception e) { throw OAException.wrapperException(e); } return retValues; } 11. Add Controller for Page ParameterizedProcDemoPG Select PageLayoutRN right click Set New Controller Package Name -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.webui Class Name -- ParameterizedProcDemoCO Add Following Code in Controller import oracle.apps.fnd.framework.OAException; import oracle.apps.fnd.framework.OAApplicationModule; import java.io.Serializable; ... Copyright © 2013, AppsLead. All rights reserved