Apps To Fusion

.......Our Journey from Apps To Fusion

 
  • Increase font size
  • Default font size
  • Decrease font size
We have launched several Development, Functional and DBA Trainings. Visiti http://focusthread.com/training

OA Framework Training Tutorials 04

In this tutorial, we will see how a record in a table can be modified using OA Framework screen.
The video tutorial will be followed by the instructions to deploy these set of Tutorials on Oracle EBS.


Following change will be done to the screen in previous tutorial
1. Add a Link for update to the search result.
This link will fire  an action named updatePerson.
Also, this link will pass a parameter named paramPersonId to the pageContext of Controller Class.
2. When this link is clicked, then processFormRequest(PFR) of the controller will be called in the main page.
3. From the PFR of CO, call another screen named managePersonPG, by retaining the AM.
Note:- this is the same screen that we called for insert/creation functionality in previous tutorial.
4. The navigation now moves to managePersonPG screen, and the Controller method processRequest of managePerson screen will now be called. Note:- Remember that processRequest is called as just prior to the page renders/displays in browser.
5. In processRequest of managePersonPG screen, we will initiate an executeQuery on the viewObject, after setting its where clause.
The result of this action is to make the record being updated to be queried automatically.
6. On managePerson screen, a button named apply changes will be available.
7. After modifying data, user will click apply now, hence invoking processFormRequest.
From processFormRequest, we will call a method in AM, that will commit the transaction.
8. We navigate back to the mainPage i.e. xxPersonMainPG



When a commit takes place, how does OA Framework know whether an insert or update must be done?
When the record being queried is changed by user, that will change the status of the record to dirty.
Hence when commit takes place, Framework will know an update  is required rather than an insert.


What are the steps in tutorial?
1. Create a link for update. In the mainPage's CO, inside PFR, handle the click of update Person.
Call managePerson page, passing it parameter named xxParamPersonId[of record being updated] and xxParamActionOnPerson[=updatePerson, from fireAction property]

2. Set a new controller for this new page
In PR(processRequest) of the managePersonCO, call an AM method to query the PersonId being updated.
Note:-in previous tutorial, we added a button, and program for PFR in new controller, so that commit can be initiated via AM. This commit button is retained as is for this tutorial
3. Redirect back to the original main page, once the commit has taken place
6. Test this


CLICK HERE TO VIEW THE VIDEO LINK OF THIS TUTORIAL


Click here to download the source code for Tutorial 1,2,3,4

The project can be deployed to Oracle EBS, by implementing instructions below.



Comments (18)add
...
written by Prashanth , August 22, 2007
Hi Anil,

I am new to OA Framework.
Once you download the Source code of tutorial 1,2,3,4. how do i open it in Jdeveloper?
Like in Forms D2K, you can ftp any .fmb file and then open in Form Builder.
In the same way do we also have .jws file?

Thanks,
Prashanth

report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , August 22, 2007
Hi Prashanth

Simply place the files in your myprojects directory.
You can them import the server.xml to open BC4J.
Pages and conrollers can be opened by using File/Open

Thanks,
Anil Passi
report abuse
vote down
vote up
Votes: +0
...
written by shohel ahmed , September 19, 2007
i am new to this area.

i have completed all these 4 step tutorial and completed this project. The project is running nicely in Jdeveloper. But when i transfer it to the Oracle apps it started problem. The first page(person details page) is running nicely and the delete function is working but when i go to the update or creation page after update or create and when i press commit it shows oracle.apps.fnd.framework.OAException: No data found for region (gpt/oracle/apps/ak/gpperson/webui/gp2personMainPG)

Exception:
oracle.adf.mds.MetadataDefException: Unable to find component with absolute reference = gpt/oracle/apps/ak/gpperson/webui/gp2personMainPG, XML Path = null. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.


Although the updated data is entered in table but transition to the first page is not happening. I have imported the two xml file to MDS according to your deployment tutorial. I have also tried the import command with includeSubpackages option. please help me in this regard.
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , September 19, 2007
Hi Sohail

Please use the jdr utils to check if your document is there in MDS repository

Use this link for jdr_utils http://oracle.anilpassi.com/jdr-utils-2.html


Thanks,
Anil Passi
report abuse
vote down
vote up
Votes: +0
...
written by shohel ahmed , September 20, 2007
i have already run the

jdr_utils.listdocuments('/gpt/oracle/apps/ak/gpperson', TRUE);
and found my two xml files there.

/gpt/oracle/apps/ak/gpperson/webui/managePersonPG
/gpt/oracle/apps/ak/gpperson/webui/gp2personMainPG

But the saome problem exist. please help me any other solutions


report abuse
vote down
vote up
Votes: +0
...
written by BHANUPRASAD , September 25, 2007
hi anil,
I am new to discoverer plesae help me providing some material and working procedures regarding it.

report abuse
vote down
vote up
Votes: +0
...
written by BHANUPRASAD , September 25, 2007
hi anil,
where can i find the material regarding om module,APIS related to om.
please help me in this

Thanks,
BHANU.
report abuse
vote down
vote up
Votes: +0
...
written by Swapnil Srivastava , September 25, 2007
hi anil,

I am working on oracle apps 11i(11.5.10.2) .The project has lots of extensibility issues, for that we would be using Jdeveloper, for the same i have couple of queries:

1.The version of the jdeveloper which would best suit oracle apps 11i(11.5.10.2).
2.How to decide on the model issue? ( i.e jsp strut bc4j or jsp no strut bc4j etc.)
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , September 25, 2007
Hi Swapnil

Ans 2. No jsp, no struts. Simply use OA Framework

Ans 1.
Pasting the excerpt from my other article, as below......
In your case, it is Patch 4573517
You must not install standalone jDeveloper from http://technet.oracle.com
Download jDeveloper patch from Metalink that comes bundled with OA Framework libraries and wizards

Download one of the below patches. Note that the patch itself will contain either jDev 9i or jDev 10g


Base 11.5.10
Patch 4045639 JDeveloper 9i

11.5.10 ATG CU1
Patch 4141787 JDeveloper 9i

11.5.10 ATG CU2
Patch 4573517 JDeveloper 9i

11.5.10 ATG CU3
Patch 4725670 JDeveloper 9i

11.5.10 ATG CU4
Patch 5455514 JDeveloper 9i

11.5.10 ATG CU5
Patch 6012619 JDeveloper 9i

R12 Base Version
Patch 5856648 jDeveloper 10g

R12 RUP2
Patch 6197418 jDeveloper 10g

Thanks,
Anil Passi

Thanks
report abuse
vote down
vote up
Votes: +0
...
written by shobhit , October 10, 2007
I hav completed the first 4 tutorials.those are running fine in jdeveloper.but when i deploy it on oracle apps..the search page is running fine but if i call the create or update then insert n update page is not called...also there is no error shown(at the click of create or update person the search page is reloaded).....pls help to solve this problem.......
report abuse
vote down
vote up
Votes: +0
workflow
written by dks , February 14, 2008
Hi Anil,

Can u plese let me knwo how we can call a workflow from the click of a button on a custom Framework page.

Thanks!

Deepak...
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , February 14, 2008
Hi Deepak

When Submit Button is clicked, then you can trap that click within ProcessFormRequest of the controller.
From the controller, you can then call a method in AM using invokeMethod

From the AM, you can use JDBC Connection.

For sample code, see below

public void completeWfActivity(Number number)
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getOADBTransaction();
int i = oadbtransactionimpl.getOrgId();
Number number1 = getOrgId();
try
{
int j = oadbtransactionimpl.getUserId();
int k = oadbtransactionimpl.getResponsibilityId();
int l = oadbtransactionimpl.getResponsibilityApplicationId();
if(number1 != null)
oadbtransactionimpl.setOrgId(number1.intValue());
OIEUtil.setAffValidationContext(oadbtransactionimpl, number1);
String s = "";
s = "BEGIN fnd_wf_engine.CompleteActivity('APEXP',:1,'AP_VERIFY_BLOCK',''); END;";
OracleCallableStatement oraclecallablestatement = (OracleCallableStatement)oadbtransactionimpl.createCallableStatement(s, 1);
try
{
oraclecallablestatement.setObject(1, number);
oraclecallablestatement.execute();
}
catch(Exception _ex) { }
finally
{
try
{
changeResponsibility(j, k, l);
oadbtransactionimpl.setOrgId(i);
OIEUtil.setAffValidationContext(oadbtransactionimpl, new Number(i));
oraclecallablestatement.close();
}
catch(Exception exception2)
{
throw OAException.wrapperException(exception2);
}
}
return;
}
catch(Exception exception)
{
throw OAException.wrapperException(exception);
}
}


Note:- This sample code was nicked from oracle.apps.ap.oie.audit.server.AuditAMImpl.java

report abuse
vote down
vote up
Votes: +0
OA Framework Tutorial
written by Roy , September 09, 2008
Your discussions are of great help.
I am currently using Oracle9i JDeveloper Version 9.0.4.0 (Build 1407) with Oracle Applications : 11.5.10.2. I could not find the file fwkdevguide.htm on the desktop. Also I could not find the Tutorial file Tutorial.jpr on my desktop.
How can I use OA Framework? Is the patch 4573517 relevant? I like to install/reinstall JDeveloper on desktop (Windows XP) and do not want to install anything on Oracle Applications server at this stage, which is on Unix. Can you please advise how can I go ahead and use the tutorial you have suggested? What extra steps I need to use so that the software is installed on desktop only.
If I need to configure any settings on Oracle Apps, what would be the steps? Your help is most appreciated.

Regards
Roy

report abuse
vote down
vote up
Votes: +0
Please post queries on Forum
written by Anil Passi-- , September 09, 2008
Hi Roy

Please post this on
http://apps2fusion.com/forums/oaf/learn

Thanks,
Anil Passi
report abuse
vote down
vote up
Votes: +0
...
written by Rogerio , November 12, 2008
Hi Passi, I''ve created till first CO and it works local, but when running in Applications I'vegot 'Error: You have encountered an unexpected error. Please contact the System Administrator for assistance. ' It shows error when I put AM and CO attached to the page. Have you passed through this ?
report abuse
vote down
vote up
Votes: +0
Miss
written by Dina , August 04, 2009
Thanks sooooooooooo Much it was really really much benefit smilies/smiley.gif smilies/smiley.gif smilies/smiley.gif
report abuse
vote down
vote up
Votes: +0
...
written by venkat Reddy Pulichintha , September 01, 2009
Hi Anil,

We have requirment after query the records we want to Bulk Update with different rows and columns.

Search based on From and to dates after we got the 20 records in 20 Records we will modify the data multple rows with MessageTextInput after modifed data we want to update at time all the rows which we modified.

Can you give me suggestion how to do

Thanks
Venkat Reddy Pulichintha
report abuse
vote down
vote up
Votes: +0
Error while running update
written by satyashah , April 29, 2010
Hi Anil,

When i am trying to update, i am getting below error

----------
## Detail 0 ##
java.sql.SQLException: Initialization failed
at oracle.sql.NUMBER.(NUMBER.java:280)
at oracle.jbo.domain.Number.(Number.java:289)
at oracle.apps.po.server.xxPersonAMImpl.updateperson(xxPersonAMImpl.java:44)
-----------------------
could you please tell me how to rectify this?

Regards
Satya
report abuse
vote down
vote up
Votes: +0
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy
 

Search apps2fusion