<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Oracle Apps Tech Blog</title>
	<atom:link href="http://keithturley.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://keithturley.wordpress.com</link>
	<description>Oracle Technical Articles</description>
	<lastBuildDate>Mon, 25 Jul 2011 10:07:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='keithturley.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Oracle Apps Tech Blog</title>
		<link>http://keithturley.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://keithturley.wordpress.com/osd.xml" title="Oracle Apps Tech Blog" />
	<atom:link rel='hub' href='http://keithturley.wordpress.com/?pushpress=hub'/>
		<item>
		<title>What is SOA?</title>
		<link>http://keithturley.wordpress.com/2010/12/01/what-is-soa/</link>
		<comments>http://keithturley.wordpress.com/2010/12/01/what-is-soa/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 21:24:41 +0000</pubDate>
		<dc:creator>keithturley</dc:creator>
				<category><![CDATA[Integration]]></category>
		<category><![CDATA[Decouple]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Service Orientated Architecture]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[System Architecture]]></category>
		<category><![CDATA[Web services]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://keithturley.wordpress.com/?p=274</guid>
		<description><![CDATA[Download This Article From The Download Folder SOA (Service Orientated Architecture) is a term that has been emerging in the IT industry since I was at university (10 years ago). I have always been conscious of it&#8217;s presence but until late their has been no really mature products out there that would enable businesses to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=274&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Download This Article From <a href="http://www.box.net/shared/172zbr10xl" target="_blank">The Download Folder</a></p>
<p>SOA (Service Orientated Architecture) is a term that has been emerging in the IT industry since I was at university (10 years ago). I have always been conscious of it&#8217;s presence but until late their has been no really mature products out there that would enable businesses to implement a SOA without having a highly technical and expensive support and development team behind them and not to mention an endless pit of money for R&amp;D in middleware.  </p>
<p>I have recently had cause to potentially look at how SOA could be realistically applied to one of my clients existing IT Infrastructure. This was not through a request from my client but driven by my desire to present a better IT solution to my customer that addressed a lot of the floors I have observed in their existing architecture.</p>
<p>I want to use this article to go back to basics and address what SOA really is now that it has been packaged and sold by many large IT vendors and how it could realistically be implemented in a large modern and distributed IT infrastructure.</p>
<p>As the evolution of the web surged forward a now well known markup language emerged which we all know and love as XML, XML (Extensible Markup Language) was the answer to making disparate systems talk to each other in the same language. But XML was nothing more that a structured data format which could be output and read by what ever system we want but how does any one system or program publish and consume this new XML data to and from other systems, up steps web services the next evolutional product on the road to SOA.</p>
<p>Web services is both a technology and a standard but put simply it allows system A to provide a service such as &#8220;Postcode Lookup&#8221; to system B using XML and the HTTP protocol (The same one as we use for the Internet). System B has no idea how system A provides it with street names based on it&#8217;s postcode input that system B provides and it doesn&#8217;t care. </p>
<p>So now we have a method of publishing and consuming our XML data in a controlled manner using a universal language and communication protocol that every system in the world can use, the web.</p>
<p>Based on XML and web services the term SOA emerged which consisted on a design principle of packaging system functionality as services and de-coupling systems that traditionally had been intertwined and reliant on each other using point to point interfaces.</p>
<p>SOA is all about systems talking to each other, this can either be internally within a business or externally to provide public services I.e. payment processing services.</p>
<p>So SOA is all about integration of systems, but why is this needed? A good question and one that I hope to explore further.</p>
<p>Let&#8217;s be honest with traditional point to point systems that use files and various persistent software communication protocols to talk to each other every time we add or change some part of the system we re-invent the wheel. Maybe it is a batch interface or near real time processing program each time we retrieve information from our database or present the data back to our users it is purpose built from scratch or we copy it and duplicate code. This is mainly because there is no culture of Software Re-use or if there is there is no means of cataloging and controlling the code that is already available in the system which would easily allow us to identify reuse opportunities. Here lies the first intangible benefit of SOA. SOA provides us with a structured development methodology and means to easily catalogue and identify opportunities for code re-use.</p>
<p>From discussing some of the benefits of SOA with traditional interface and point to point developers it has become clear to me that changing the mind set of technical, functional and business users is some what of a challenge. It is often very much the case that two sets of system implementers will get together and agree a set of rules with which they can enable their systems to talk to each other. The problem here is that the rules become dependent on each other, so how do we highlight the benefits of decoupling systems and making code on each side of the void more generic and thus reusable when the effort to do so is more complicated, more time consuming and potentially a waste of time. </p>
<p>My thoughts on this area are that the fundamental business design process needs to change, start there and implementers and developers will follow suite, don&#8217;t design an interface on system a to send a specific type of workflow notification to system b, design an interface to send any notification to any system that is interested, don&#8217;t tightly couple the systems by designing the content of your XML to fit system b, consider what systems c, d and e may want in the future (within reason) and make it extensible. In my opinion it&#8217;s only with this flexible and generic thought process that the concept of code reuse will truly be realised in large SOA implementations.</p>
<p>Until this time comes it is likely that SOA implementations will continue to be tactical solutions for a specific purpose rather than strategic roll outs at en enterprise level, thus SOA becomes an evolutionary product within an organisation, this needs to be understood centrally within an organisation such as an IS group and governed as it evolves to maximise the benefits and the chance that it will one day be the heart of the businesses technical infrastructure.</p>
<p>Please comment on this article, I would love to hear your thoughts.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/keithturley.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/keithturley.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/keithturley.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/keithturley.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/keithturley.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/keithturley.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/keithturley.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/keithturley.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/keithturley.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/keithturley.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/keithturley.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/keithturley.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/keithturley.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/keithturley.wordpress.com/274/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=274&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://keithturley.wordpress.com/2010/12/01/what-is-soa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f04253998834b7db298a4d3f286b3724?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">keithturley</media:title>
		</media:content>
	</item>
		<item>
		<title>Workflow Roles and User/Person Synchronization</title>
		<link>http://keithturley.wordpress.com/2010/12/01/workflow-roles-and-userperson-synchronization/</link>
		<comments>http://keithturley.wordpress.com/2010/12/01/workflow-roles-and-userperson-synchronization/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 21:23:42 +0000</pubDate>
		<dc:creator>keithturley</dc:creator>
				<category><![CDATA[Oracle Applications - Workflow]]></category>
		<category><![CDATA[bulk synchronisation]]></category>
		<category><![CDATA[incremental synchronisation]]></category>
		<category><![CDATA[notifications]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[roles]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://keithturley.wordpress.com/?p=279</guid>
		<description><![CDATA[Download This Article From The Download Folder I have recently had the need to look in detail at how workflow synchronises role information with Oracle HRMS in an R12 instance and wanted to publish my findings as there is not too much information out there about how this works in one place, please leave me [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=279&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Download This Article From <a href="http://www.box.net/shared/csq1ys1947" target="_blank">The Download Folder</a></p>
<p>I have recently had the need to look in detail at how workflow synchronises role information with Oracle HRMS in an R12 instance and wanted to publish my findings as there is not too much information out there about how this works in one place, please leave me a comment if you find any inaccuracies in this article and I will review the content. This article assumes you have some background knowledge regarding workflow notifications and the concept of a workflow role.</p>
<p>From R12 onwards incremental role synchronisation is a standard feature in Oracle HRMS, two views are provided called FND_USR_ROLES and  PER_ROLE_ROLES_V which can be used to see what information workflow uses to populate the WF_LOCAL_ROLES  table.</p>
<p><strong><span style="text-decoration:underline;">What is Incremental and Bulk Synchronisation?</span></strong></p>
<p style="padding-left:30px;">Bulk synchronisation is the process of updating roles in the workflow table using a concurrent program called  &#8220;Synchronize WF LOCAL Tables&#8221;, this program will take information from views delivered by different EBS modules and populate the WF_LOCAL_ROLES table using this information. This job can be run for individual or all modules and for the context of this article the process would be run for the HRMS module or FND module which would synchronise information from the user form or Person form.</p>
<p style="padding-left:30px;">Incremental Synchronisation is a term used to describe the process of an Oracle module updating the workflow roles in real-time as the information is changed in that module, for example if I create a new user record the information for that record will be automatically populated in WF_LOCAL_ROLES without the need to run Bulk Synchronization. Incremental Syncing is enabled as default in R12 for Oracle HRMS and the Bulk Sync concurrent program is provided for backwards compatibility and should not need to be run.</p>
<p style="padding-left:30px;">Incremental Syncing is standard in R12 however it is also available in R11 via relevant patches, see metalink note 171703.1</p>
<p style="padding-left:30px;">
<p><strong><span style="text-decoration:underline;">Where are role details taken from when a person record is linked to a user record?</span></strong></p>
<p style="padding-left:30px;">Two roles can exist in workflow for a user/employee in EBS.</p>
<p style="padding-left:30px;"><strong><span style="text-decoration:underline;">Internal Employee Role </span></strong></p>
<p style="padding-left:60px;">At the point that the person record is created an additional person role will be created in wf_local_roles. The role name will be along the lines “PER_ROLE:771703”  (where 771703 indicates the person id from per_all_people_f) with all details such as e-mail address, display name, description being populated from the person record and in addition user preferences are now used to populate Notification Preference, Language and territory from ﻿FND_USER_PREFERENCES. The incremental synchronisation role that is used to populate WF_LOCAL_ROLES is PER_ROLE_ROLES_V.</p>
<p style="padding-left:60px;">A person record with a valid internal role can be identified with the following SQL:</p>
<p style="padding-left:60px;">SELECT * FROM wf_local_roles WHERE name =&#8217;PER_ROLE:&#8217;||:person_id and orig_system = &#8216;PER_ROLE&#8217;</p>
<p style="padding-left:60px;"> N.B A PER_ROLE role is created regardless of if a user account is linked to the employee.</p>
<p style="padding-left:30px;"><strong><span style="text-decoration:underline;">User Role with/without person record linked</span></strong></p>
<p style="padding-left:60px;">This is one role that is maintained at a user level and dependant on if you have an employee linked to the user record or not the role will source its email, description and preferences information differently. The role name will be the user name held in the FND_USER table.</p>
<p style="padding-left:60px;">The view FND_USR_ROLES is used to populate role information to the user/employee role in the event that your user is linked to a person record or not. If the record is not linked to a person record the view simply takes the information including the e-mail address from the FND_USER table. In this situation certain information such as Notification Preferences, Language and Territory are defaulted in this instance to &#8220;MAILHTML&#8217;, &#8216;AMERICAN&#8217; and &#8216;AMERICA&#8217; respectively. This results in the role being automatically eligible to receive e-mail based notifications for processes such as the email reset function where an email can be sent to a user account based role with a link to reset their password. A user only based role can be identified in the workflow tables using the following SQL:</p>
<p style="padding-left:60px;">SELECT * FROM wf_local_roles where name = :fnd_user_name and orig_system = &#8216;FND_USR&#8217;</p>
<p style="padding-left:60px;">In the event that a user record is linked to a person record using the user form the following happens:</p>
<p style="padding-left:60px;">1. The email address is blanked out from the user form</p>
<p style="padding-left:60px;">2. The FND_USR role is updated with the information from the existing PER_ROLE role that belongs to the linked employee and already exists in the wf_local_roles table (See Internal Employee Role above).</p>
<p style="padding-left:60px;">3. The orig_system partition in WF_LOCAL_ROLES is updated to PER</p>
<p style="padding-left:60px;">From this point the PER role and the PER_ROLE role are synchronised and any workflow notifications sent to the role associated with the user account i.e. user from FND_USER will use the details copied from the PER_ROLE role which are originally captured from the person record such as email address and the user record in FND_USER will no longer be referenced, it could be argued that since a new person role is created (PER_ROLE) which already sources its details from the person form why does the standard FND user account role (FND_USR) also have to be switched to a (PER) role and source its details from the same location, it would make sense to have one user level role and one person level roll? This is an annoyance to some customers of Oracle who very often have to migrate their email details over from the user form to the person form when implementing HRMS.</p>
<p style="padding-left:60px;">A user with associated employee record can be identified in the workflow tables using the following SQL:</p>
<p style="padding-left:60px;">﻿﻿SELECT * FROM wf_local_roles WHERE name =:fnd_user_name and orig_system = &#8216;PER&#8217;</p>
<p><strong><span style="text-decoration:underline;">Workflow Notification Behaviour with standard and ADHOC Roles</span></strong></p>
<p style="padding-left:30px;">Workflow notifications can be sent to standard or adhoc roles. Standard roles are roles that are maintained in embedded workflow out of the box using incremental or batch synchronisation. Standard roles are maintained for a variety of modules but for the context of this article roles are created and maintained for users, linked users (User linked to a HRMS record) and HRMS people (See previous section). The 3 types can be referenced as FND, PER and PER_ROLE. The FND role becomes a PER role at the point the user records are linked. This partition can be found in the WF_LOCAL_ROLES table in the &#8220;ORIG_SYSTEM&#8221; column.</p>
<p style="padding-left:30px;">Adhoc roles are roles that have been created using the workflow API&#8217;s at run time by a program or process. An adhoc role will have an ORIG_SYSTEM of &#8220;WF_LOCAL_ROLES&#8221;. The actual role name can vary dependant on the process.</p>
<p style="padding-left:30px;">To demonstrate how standard and adhoc roles are used by a workflow process we will look at the &#8220;Password Reset&#8221; process that is accessible in R12 from the login screen link &#8220;Login Assistance&#8221;, we will examine how the associated workflow process selects the correct role to send the notification to and how the roles have been populated based on the setup.</p>
<p style="padding-left:30px;">By default the reset password workflow will try to send the notification to the actual user role, that is the role with the same name as the user requesting the reset.</p>
<p style="padding-left:30px;"><strong>Scenario 1 &#8211; User account exists but no person record has been linked.</strong></p>
<p style="padding-left:60px;">In the event that no email address exists on the user account then an error will be displayed when the user tries to request a reminder email:</p>
<p style="padding-left:60px;"><em>&#8220;Your email address is either invalid or an account matching the entered email address could not be found. Please contact the System Administrator for further assistance.&#8221;</em></p>
<p style="padding-left:60px;">If the email address is populated the password reset workflow will select the role based on the user account so it will identify the role name as &#8220;TURLEYK&#8221; (My username in &#8220;FND_USER&#8221;), the email and description will be taken from the FND_USER table and populated to WF_LOCAL_ROLES with &#8220;FND_USR&#8221; in the ORIG_SYSTEM column. By default the email preference is set to HTML.</p>
<p style="padding-left:30px;"><strong>Scenario 2 &#8211; User account has been linked but no email address has been entered on the person record.</strong></p>
<p style="padding-left:60px;">In the event that no email address exists on the user account as well as the person record then an error will be displayed when the user tries to request a reminder email:</p>
<p style="padding-left:60px;"><em>&#8220;Your email address is either invalid or an account matching the entered email address could not be found. Please contact the System Administrator for further assistance.&#8221;</em></p>
<p style="padding-left:60px;"> If an e-mail address does exist on the user account record (PER role due to the fact that it is linked to a person record) but not on the person record then something unusual happens here. As mentioned previously once a user account is linked to a person account the email address is sourced from the person record, but in this instance the person record email is not populated so workflow does not have a standard role with an email address on despite the fact that the user record has a valid email address populated.</p>
<p style="padding-left:60px;">In this situation the email reset workflow process is intelligent enough to know that an email address exists on the FND_USER table for the user name but no standard role exists with the email address synced. The result is that the workflow will build an adhoc role called FNDPWD__ and store it in wf_local_roles using the orig_system of &#8220;WF_LOCAL_ROLES&#8221;. This role will be populated with the e-mail address from fnd_user and the notification will be sent to this adhoc role.</p>
<p style="padding-left:30px;"><strong>Scenario 3 &#8211; User account has been linked and email address has been entered on the person record.</strong></p>
<p style="padding-left:60px;">In this instance the password reset workflow will select the role based on the user account so it will identify the role name as &#8220;TURLEYK&#8221; (My username in &#8220;FND_USER&#8221;), the email and description on this role will be taken from the PER_ALL_PEOPLE_F table via the PER_ROLE_ROLES_V view and populated to WF_LOCAL_ROLES with &#8220;PER_ROLE&#8221; in the ORIG_SYSTEM column by incremental synchronization.</p>
<p>The above examples should give you an idea of how workflow processes can use roles to send notifications and how those roles are maintained. The behaviour will vary between workflow processes but this article should give you the knowledge to recognise how roles are used and thus how to implement them in your workflow processes.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/keithturley.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/keithturley.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/keithturley.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/keithturley.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/keithturley.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/keithturley.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/keithturley.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/keithturley.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/keithturley.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/keithturley.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/keithturley.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/keithturley.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/keithturley.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/keithturley.wordpress.com/279/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=279&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://keithturley.wordpress.com/2010/12/01/workflow-roles-and-userperson-synchronization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f04253998834b7db298a4d3f286b3724?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">keithturley</media:title>
		</media:content>
	</item>
		<item>
		<title>OAF &#8211; Modifying SQL Behind Framework Pages</title>
		<link>http://keithturley.wordpress.com/2009/12/09/oaf-modifying-sql-behind-framework-pages/</link>
		<comments>http://keithturley.wordpress.com/2009/12/09/oaf-modifying-sql-behind-framework-pages/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 10:53:36 +0000</pubDate>
		<dc:creator>keithturley</dc:creator>
				<category><![CDATA[Oracle Applications Framework]]></category>
		<category><![CDATA[E-Business Suite]]></category>
		<category><![CDATA[JPXImporter]]></category>
		<category><![CDATA[MDS]]></category>
		<category><![CDATA[OAF]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[R11]]></category>
		<category><![CDATA[R12]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Substitution]]></category>
		<category><![CDATA[VO]]></category>
		<category><![CDATA[VO Substitution]]></category>

		<guid isPermaLink="false">http://keithturley.wordpress.com/?p=151</guid>
		<description><![CDATA[How to perform a View Object Substitution<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=151&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">This article will discuss the process of modifying the seeded SQL that exists behind an Oracle Applications Framework Page, by a Framework page we mean any browser based EBS interface screen including selfservice pages. The article will discuss the analysis process involved in making such a change, the implementation of the extension using JDeveloper 10g and the subsequent uploading and &#8220;Substitution&#8221; of the new code within the MDS (Meta Data System) Repository.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p>All OAF Pages use a number of &#8221;View Objects&#8221; to execute SQL queries against the E-Business Suite Database. These View Objects are actually XML files on the application server that contain an SQL query, this XML file is used in conjunction with a Java Utility called the JPX Importer to load a pointer to the content of the XML file into a number of Database tables that EBS uses to identify which SQL queries it should be executing when a page loads. These tables are collectively known as the MDS (Meta Data System) Repository. The MDS holds a lot more than just SQL query definitions but for the scope of this article we need not cover the other content. </p>
<p>For this article we are going to use the Oracle Projects Search screen as our OAF web page on an R12 instance. We are going to modify the SQL that is used to query back a list of projects so that the SQL only returns projects that are within their current start date and end date as opposed to returning all projects.</p>
<h4><span style="text-decoration:underline;">Analysis</span></h4>
<p> </p>
<p>First of all we need to identify which &#8220;View Object&#8221; we will be working with, to do this we will need to activate OAF diagnostics. To do so locate the profile option &#8220;FND: Diagnostics&#8221; and set it to &#8220;Yes&#8221;. Now take a look at the page we are going to be extending&#8230;</p>
<div class="mceTemp"> </div>
<p> </p>
<div id="attachment_160" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-160" title="project_search1" src="http://keithturley.files.wordpress.com/2009/05/project_search1.jpg?w=544&#038;h=343" alt="Fig 1" width="544" height="343" /><p class="wp-caption-text">Fig 1</p></div>
<p> By turning on the &#8220;FND: Diagnostics&#8221; profile option you will now be able to see two new links on the page. The &#8220;Diagnostics&#8221; link which will appear in the header and the footer of the page and the &#8220;About This Page&#8221; link which will appear in the footer only. In order to identify the VO that is being used by the page we will first examine the &#8220;About This Page Link&#8221;. </p>
<p>When you click on the &#8220;About This Page&#8221; link you will see an array of tabs all of which do various tasks which we can use as OAF developers however for the purposes of this article we will be looking at the default &#8220;Page&#8221; tab which you see when the page opens. </p>
<p>All OAF pages are made up of a number of BC4J (Business Components for Java) and Web elements known as the MDS content or &#8220;Web Beans&#8221;. The BC4J content exists as compiled java code and XML under JAVA_TOP on the application server and the web content exists as meta data in the MDS Repository. The web content is organised into a tree structure i.e. you have a page which contains a table which contains fields etc&#8230; When the page loads this &#8220;Bean Hierarchy&#8221; is rendered according to its structure and this structure is what we can see in the &#8220;Page Definition&#8221; section of the Page tab. Click the &#8220;Expand All&#8221; Link. </p>
<p>If you are familiar with OAF development this screen will be very apparent to you as representing the page structure layout that you are used to seeing in JDeveloper when building a page and navigating it will be simple. If you are not used to OAF page development and you are simply trying to identify the SQL behind this page then examine the View Object Column until you see populated content, you should then be able to determine that the &#8220;Name&#8221; column holds content such as &#8220;<span class="xd">messageStyledText: Project Manager&#8221; and that this is describing the &#8220;Project Manager&#8221; column that we see on the OAF page. We can also see that there is a collection of columns indented below the &#8220;Bean&#8221; &#8220;<span class="xd">table: My Projects Result Container&#8221; which refers to the result table that we see on the page. </span></span>  </p>
<div id="attachment_166" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-166" title="about_this_page1" src="http://keithturley.files.wordpress.com/2009/05/about_this_page1.jpg?w=544&#038;h=232" alt="Fig 2" width="544" height="232" /><p class="wp-caption-text">Fig 2</p></div>
<div class="mceTemp">We can see in Fig 2 that the &#8220;My Projects Result Container&#8221; is driven by the &#8220;ProjectListVO&#8221; View Object. In order to examine the SQL within the VO and to identify more information from the VO Click on the &#8220;ProjectListVO&#8221; link.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">From the &#8220;About View Objects&#8221; screen we can see a large SQL statement, The &#8220;Entity Objects&#8221; associated with the VO, and a list of the VO&#8217;s available attributes. Any of these attributes could be used as additional content on the &#8220;Project Search&#8221; page simply by personalising the page however we will not be covering that process in this article.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">At the top of the page we can also see the name of the VO and a file path in the form: oracle.apps.pa.project.server.ProjectListGenVO this gives us the location of the VO on JAVA_TOP. Having identified the VO and its location on JAVA_TOP we can close the &#8220;About This Page&#8221; diagnostic screen and return to the Projects Search Screen.</div>
<div class="mceTemp"> </div>
<h4 class="mceTemp"><span style="text-decoration:underline;">Implementation</span></h4>
<p> </p>
<p class="mceTemp">Now that we have identified the VO we need to extend, oracle.apps.pa.project.server.ProjectListGenVO, we need to setup our JDeveloper environment so that we can create a new View Object that contains our extended code. If you have not already got your JDeveloper environment setup then do so now, you can read how to at the Apps Tech Blog post <a href="http://keithturley.wordpress.com/2009/05/07/oaf-downloading-and-configuring-jdeveloper/" target="_blank">&#8220;OAF &#8211; Downloading and Configuring JDeveloper&#8221;</a>. </p>
<p class="mceTemp">Start JDeveloper and follow the instructions below. Please note that this article only covers the procedure for JDeveloper 10g. The process although similar is slightly different in 9i. </p>
<p class="mceTemp">In the Applications Navigator right click the Applications Node and select &#8220;New OA Workspace&#8221; </p>
<p class="mceTemp">In the file name box enter a suitable file name, if you are often working with different clients then it may be an idea to call this XXCLIENT.jws, if you are working for your own company you may want to call it XXCUST.jws, the workspace name is however completely personal preference and up to you as a developer how you organise your workspaces and projects within JDeveloper. Leave the directory path as your default myprojects folder in your JDev Home, ensure that the &#8220;Add a New OA Project&#8221; check box is selected. </p>
<div id="attachment_232" class="wp-caption alignnone" style="width: 342px"><img class="size-full wp-image-232" title="jdev_new_workspace_10g" src="http://keithturley.files.wordpress.com/2009/05/jdev_new_workspace_10g.jpg?w=332&#038;h=205" alt="Fig 3" width="332" height="205" /><p class="wp-caption-text">Fig 3</p></div>
<p class="mceTemp">Select &#8220;OK&#8221;. </p>
<p class="mceTemp">The new project wizard will now be launched, select &#8220;Next&#8221;. </p>
<p class="mceTemp">In the project name enter a meaningfull name, I recommend that the project name be pertinent to the piece of work you are doing i.e. XXCUST_projects_list, leave the default directory as your myprojects folder in the JDev Home. For a VO substitution the default package name will need to represent the VO file path on JAVA_TOP with the exception that it must be prefixed with your custom application shortname, the prefix can actually be anything you like however it is recommended that the custom application shortname is used, in this example we would specify the default package as  xxcust.oracle.apps.pa.project.server </p>
<div id="attachment_233" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-233" title="jdev10g_new_project_step1" src="http://keithturley.files.wordpress.com/2009/05/jdev10g_new_project_step1.jpg?w=544&#038;h=361" alt="Fig 4" width="544" height="361" /><p class="wp-caption-text">Fig 4</p></div>
<p class="mceTemp">Click &#8220;Next&#8221; </p>
<p class="mceTemp">Ensure that the &#8220;Use repository for design time&#8221; box is not selected and click &#8220;Next&#8221;. </p>
<p class="mceTemp">Select your DBC file, enter your applications username and password, enter ICX as the responsibility application shortname and responsibility key. For more information regarding this setup step including obtaining your DBC file and setting up your user account please refer to the Apps Tech Blog post <a href="http://keithturley.wordpress.com/2009/05/07/oaf-downloading-and-configuring-jdeveloper/" target="_blank">&#8220;OAF &#8211; Downloading and Configuring JDeveloper&#8221;</a>. </p>
<div id="attachment_235" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-235" title="jdev10g_new_project_step3" src="http://keithturley.files.wordpress.com/2009/05/jdev10g_new_project_step31.jpg?w=544&#038;h=360" alt="Fig 5" width="544" height="360" /><p class="wp-caption-text">Fig 5</p></div>
<p class="mceTemp">Click &#8220;Next&#8221; </p>
<p class="mceTemp">Click &#8220;Finish&#8221; </p>
<p class="mceTemp">Next we need to copy the existing VO component from the apps server and import it into our local file system. In order to do this we must setup a file structure on our local machine in our project folder so we can copy the VO into it. Log onto the applications server and navigate to $JAVA_TOP, change into the oracle/apps/pa/ directory (Or which ever product top you are working with) </p>
<div id="attachment_236" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-236" title="java_top_unix2" src="http://keithturley.files.wordpress.com/2009/05/java_top_unix2.jpg?w=544&#038;h=343" alt="Fig 6" width="544" height="343" /><p class="wp-caption-text">Fig 6</p></div>
<p class="mceTemp">Zip the project application directory and save it to a directory that you can ftp from. i.e. zip -r $HOME/pa.zip pa </p>
<p class="mceTemp">FTP the pa.zip file in binary mode back to your local machine and extract it to your user JDev Home under myprojects/oracle/apps/ (You will have to create the directory structure manually if it does not exist), you should also extract the contents to your myclasses folder in the same way i.e. myclasses/oracle/apps/ </p>
<p class="mceTemp">You should now have the following file structure in your local file system under the oracle.apps directory in myprojects and myclasses </p>
<div class="mceTemp">
<div id="attachment_241" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-241" title="file_structure1" src="http://keithturley.files.wordpress.com/2009/05/file_structure11.jpg?w=544&#038;h=343" alt="Fig 7" width="544" height="343" /><p class="wp-caption-text">Fig 7</p></div>
<p class="mceTemp">Click the &#8220;Refresh&#8221; button on the Applications Navigator tab of JDeveloper, you should notice that a new business components package under oracle.apps.pa has now appeared. </p>
<div id="attachment_238" class="wp-caption alignnone" style="width: 354px"><img class="size-full wp-image-238" title="jdev_10g_refresh" src="http://keithturley.files.wordpress.com/2009/05/jdev_10g_refresh.jpg?w=344&#038;h=423" alt="Fig 8" width="344" height="423" /><p class="wp-caption-text">Fig 8</p></div>
<p class="mceTemp"> Now that we have the existing projects business components in our environment we need to create our new VO object that will be used in place of the existing one. Remember we do not customise existing components in OA Framework we extend the existing ones which means creating a new object that extends the original and we notify the framework that we want to use the new object rather than the seeded one. </p>
<p class="mceTemp">We now need to test that the VO we want to substitute does not contain any java errors following the download. Navigate to the VO in the applications navigator window i.e. Application Sources &gt; oracle.apps.pa &gt; project &gt; server &gt; ProjectListGenVO, right click the VO and click edit (If you have not already done so you will now need to configure your database connection, for more details on how to do this see the apps tech blog article <a href="http://keithturley.wordpress.com/2009/05/07/oaf-downloading-and-configuring-jdeveloper/" target="_blank">&#8220;OAF &#8211; Downloading and Configuring JDeveloper&#8221;</a>). If the VO opens without error then we are ready to move onto the next step. If you get an error message saying that java errors exist in either the voNameImpl.java file or the voNameRowImpl.java file then you will need to obtain the original source files for the files listed as being in error and add them to your myprojects folder in the relevant directory and recompile the project, unfortunately Oracle do not allow you to obtain the source files and you may need to employee the services of an Oracle consultant who would have access to the files. </p>
<p class="mceTemp">Before closing the base VO window take a look at the &#8220;Java&#8221; settings and make a note of the boxes that are checked/unchecked, we will need this for later. </p>
<p class="mceTemp">If you havn&#8217;t already done so Close the Edit VO window. </p>
<p class="mceTemp">Right click on the project node and select &#8220;New&#8221;. Select &#8220;View Object&#8221; under Business Tier &gt; ADF Business Components and click &#8220;OK&#8221; </p>
<p class="mceTemp">The View Object Wizard has been launched, click &#8220;Next&#8221;. </p>
<p class="mceTemp">Specify the package as xxcust.oracle.apps.pa.project.server (This component package will hold our extended object so we need the custom application prefix). Specify the VO name as the name of the custom application concatenated with the orginal VO name i.e. XxcustProjectListGenVO. Select the original VO in the &#8220;extends&#8221; box using the browse button and select the original VO i.e. oracle.apps.pa.project.ProjectListGenVO </p>
<div id="attachment_242" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-242" title="jdev_10g_vosub" src="http://keithturley.files.wordpress.com/2009/05/jdev_10g_vosub.jpg?w=544&#038;h=501" alt="Fig 9" width="544" height="501" /><p class="wp-caption-text">Fig 9</p></div>
<p class="mceTemp">Click &#8220;Next&#8221; </p>
<p class="mceTemp">On step 2 of the VO wizard you can see the SQL statement that we first saw when we were analysing the page. For this example we are simply going to wrap the SQL as follows and add an additional where clause statement: </p>
<p class="mceTemp">SELECT * FROM (ORIGINAL_QUERY) WHERE trunc(sysdate) between project_start_date and nvl(project_end_date,sysdate) </p>
<p class="mceTemp">Click the &#8220;Test&#8221; button to validate that your modified SQL is valid. </p>
<p class="mceTemp">Click &#8220;Next&#8221; until you reach the end of the wizard, If you encounter the following error at step 4 &#8220;<em>Each row in the query results column msut be mapped to a unique query attribute in the mapped entity columns</em>&#8221; then their is something wrong with the base VO, in this example I did experience this error and found that the original VO SQL had 3 missing aliases that the view object attributes were referencing, In order to correct the error you must make the change to the base VO by editing the SQL, I successfully added the missing aliases and then re-ran the create new VO instructions above and it worked correctly. </p>
<p class="mceTemp">Once we have clicked through to the end of the wizard the final step is to create the relevant java files. When a VO is implemented we always generate a voNameImpl.java file but we dont always have a voNameRowImpl.java file, the best way to tell which files to implement is to look at the java screen for the seeded VO and ensure that our new VO has the same settings. </p>
<p class="mceTemp">In this case we need both so our final wizard screen would look like this </p>
<div id="attachment_250" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-250" title="jdev_10g_vosub_step7" src="http://keithturley.files.wordpress.com/2009/05/jdev_10g_vosub_step71.jpg?w=544&#038;h=361" alt="Fig 10" width="544" height="361" /><p class="wp-caption-text">Fig 10</p></div>
<p class="mceTemp">Now click &#8220;Finish&#8221; and the new business components package will be created containing our new extended VO. </p>
<div id="attachment_251" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-251" title="jdev_10g_new_bc" src="http://keithturley.files.wordpress.com/2009/05/jdev_10g_new_bc.jpg?w=544&#038;h=544" alt="Fig 11" width="544" height="544" /><p class="wp-caption-text">Fig 11</p></div>
<p class="mceTemp">Right click on the custom business components package and select &#8220;Make&#8221;, this will compile the Impl and RowImpl java files. </p>
<p class="mceTemp">Now that we have our newly extended VO we need to create a substitution file. This substitution file will be an xml based file that will contain a mapping from the old VO to the new VO, we will use this file to tell Oracle Application to use our newly extended VO rather than the old one by uploading it to the MDS repository using the JPX Import tool. </p>
<p class="mceTemp">Right click on your project node (XXCUST_projects_list) and select &#8220;Project Properties&#8221;, click &#8220;Substitutions&#8221; under the &#8220;Business Components&#8221; menu. In the &#8220;Available&#8221; pane select the original VO i.e. oracle.apps.pa.project.server.ProjectListGenVO, and in the right hand &#8220;Substitute&#8221; pane select the new VO i.e. xxcust.oracle.apps.pa.project.server.XxcustProjectListGenVO. Once you have done this click the &#8220;Add&#8221; button and select &#8220;OK&#8221;. </p>
<div id="attachment_252" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-252" title="jdev_10g_substitution" src="http://keithturley.files.wordpress.com/2009/05/jdev_10g_substitution.jpg?w=544&#038;h=386" alt="Fig 12" width="544" height="386" /><p class="wp-caption-text">Fig 12</p></div>
<p class="mceTemp">In your JDev home in the myprojects folder you will see a file called projectName.jpx in my case it would be called XXCUST_projects_list.jpx, this is your substitution file and we will use this later when we deploy the substitution.</p>
<h4 class="mceTemp"><span style="text-decoration:underline;">Deployment</span></h4>
<p> </p>
<p class="mceTemp">In order to deploy our solution to the actual ebusiness suite instance we need to copy the relevant java and xml files to java top and also upload our substituion file to the MDS repository. You can do this just by simply transfering the files using an FTP tool however I find it is best to create an archive file that will retain the folder hierarchy and allow you to issue a single transfer and unpack command. For a large OAF project we may have files that have to be transfered to different locations and because of this I tend to create 3 types of jar files called BC4J, MDS and SRC. These three files will contain the BC4J files like class files and VO&#8217;s, the MDS files such as pages and regions and the java source files. </p>
<p class="mceTemp">Following the transfer we can issue a java call from the command line on the apps server to perform the MDS upload. </p>
<p class="mceTemp">For this example a VO substitution only involves BC4J objects and java source files, the solution does not require that we package up our source code so for the sake of simplicity I will just create one archive file called BC4J.jar </p>
<p class="mceTemp">Right click on the project node and select &#8220;New&#8221;, select &#8220;Jar File&#8221; under the General &gt; Deployment Profiles menu. Name the profile as something meaningful, in this example I will stick to convention and call it  &#8221;XXCUST_PROJECTS_LIST_BC4J&#8221; . Leave the directory set as the default myprojects folder and click &#8220;OK&#8221;. </p>
<p class="mceTemp">In the deployment profile properties deselect the &#8220;Include Manifest File&#8221; option. On the filters menu deselect the root folder and navigate to the xxcust.oracle.apps.pa.project.server directory, select all the files in this directory and click &#8220;OK&#8221; </p>
<div id="attachment_258" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-258" title="jdev_10g_deploy" src="http://keithturley.files.wordpress.com/2009/05/jdev_10g_deploy.jpg?w=544&#038;h=387" alt="Fig 13" width="544" height="387" /><p class="wp-caption-text">Fig 13</p></div>
<p class="mceTemp">You will see in JDeveloper that you now have a deployment profile listed under you application sources node, right click the .deploy file and select &#8220;Deploy to JAR file&#8221;, You will see a deploy tab appear next to the compile log and this will confirm that the deployment was successfull. If you experience issues with compilation i.e. there are issues with some of the files in your project that are not connected to your custom files then simply remove them from the project by selecting the top level component package i.e. oracle.app.pa and click the &#8220;Exclude Project Content&#8221; button (Little file symbol with a red cross on it) and re-try the deployment. </p>
<div id="attachment_259" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-259" title="jdev_10g_deploytojar" src="http://keithturley.files.wordpress.com/2009/05/jdev_10g_deploytojar.jpg?w=544&#038;h=660" alt="Fig 14" width="544" height="660" /><p class="wp-caption-text">Fig 14</p></div>
<p class="mceTemp">Inspect your myprojects folder and you will see you now have a &#8220;Deploy&#8221; directory, in this directory will be your jar file ready for deployment to the apps server. </p>
<p class="mceTemp">Now that we have both our BC4J objects for java_top and our substituion file for the MDS we need to transfer them both to the apps server, FTP both the files (remember to send the jar file in binary format and the jpx file in ascii) to a convienient directory on the apps server. </p>
<p class="mceTemp">Now extract the jar file to java_top i.e.</p>
<p class="mceTemp">cp home/kturley/*.jar $JAVA_TOP </p>
<p class="mceTemp">jar -xvf /$JAVA_TOP/XXCUST_PROJECTS_LIST_BC4J.jar </p>
<p class="mceTemp">
<p class="mceTemp">Now upload the substitution file to the  MDS using the following command: </p>
<p class="mceTemp">java oracle.jrad.tools.xml.importer.JPXImporter $HOME/kturley/XXCUST_projects_list.jpx -username apps -password xxxx -dbconnection &#8220;(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hostname.oracle.co.uk)(PORT=1551))(CONNECT_DATA=(SID=XXXXX)))&#8221; </p>
<p class="mceTemp">Make sure you specify the correct values for </p>
<p class="mceTemp">1. Path of you jpx file </p>
<p class="mceTemp">2. apps password </p>
<p class="mceTemp">3. host name </p>
<p class="mceTemp">4. port </p>
<p class="mceTemp">5. database SID </p>
<p class="mceTemp">Finally restart the webserver so that you can see your changes in the application </p>
<p>For R11: </p>
<p>$COMMON_TOP/admin/scripts/$TWO_TASK*/adapcctl.sh stop<br />
$COMMON_TOP/admin/scripts/$TWO_TASK*/adapcctl.sh start </p>
<p>For R12: </p>
<p>$INST_TOP/admin/scripts/adoacorectl.sh stop<br />
$INST_TOP/admin/scripts/adoacorectl.sh start  </p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/keithturley.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/keithturley.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/keithturley.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/keithturley.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/keithturley.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/keithturley.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/keithturley.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/keithturley.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/keithturley.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/keithturley.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/keithturley.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/keithturley.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/keithturley.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/keithturley.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=151&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://keithturley.wordpress.com/2009/12/09/oaf-modifying-sql-behind-framework-pages/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f04253998834b7db298a4d3f286b3724?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">keithturley</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/project_search1.jpg" medium="image">
			<media:title type="html">project_search1</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/about_this_page1.jpg" medium="image">
			<media:title type="html">about_this_page1</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_new_workspace_10g.jpg" medium="image">
			<media:title type="html">jdev_new_workspace_10g</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev10g_new_project_step1.jpg" medium="image">
			<media:title type="html">jdev10g_new_project_step1</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev10g_new_project_step31.jpg" medium="image">
			<media:title type="html">jdev10g_new_project_step3</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/java_top_unix2.jpg" medium="image">
			<media:title type="html">java_top_unix2</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/file_structure11.jpg" medium="image">
			<media:title type="html">file_structure1</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_10g_refresh.jpg" medium="image">
			<media:title type="html">jdev_10g_refresh</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_10g_vosub.jpg" medium="image">
			<media:title type="html">jdev_10g_vosub</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_10g_vosub_step71.jpg" medium="image">
			<media:title type="html">jdev_10g_vosub_step7</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_10g_new_bc.jpg" medium="image">
			<media:title type="html">jdev_10g_new_bc</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_10g_substitution.jpg" medium="image">
			<media:title type="html">jdev_10g_substitution</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_10g_deploy.jpg" medium="image">
			<media:title type="html">jdev_10g_deploy</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_10g_deploytojar.jpg" medium="image">
			<media:title type="html">jdev_10g_deploytojar</media:title>
		</media:content>
	</item>
		<item>
		<title>OAF &#8211; Downloading and Configuring JDeveloper</title>
		<link>http://keithturley.wordpress.com/2009/05/07/oaf-downloading-and-configuring-jdeveloper/</link>
		<comments>http://keithturley.wordpress.com/2009/05/07/oaf-downloading-and-configuring-jdeveloper/#comments</comments>
		<pubDate>Thu, 07 May 2009 19:05:37 +0000</pubDate>
		<dc:creator>keithturley</dc:creator>
				<category><![CDATA[Oracle Applications Framework]]></category>
		<category><![CDATA[Configuring JDev]]></category>
		<category><![CDATA[Configuring JDeveloper]]></category>
		<category><![CDATA[E-Business Suite]]></category>
		<category><![CDATA[JDev]]></category>
		<category><![CDATA[JDeveloper]]></category>
		<category><![CDATA[OAF]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Applications]]></category>
		<category><![CDATA[R11]]></category>
		<category><![CDATA[R12]]></category>
		<category><![CDATA[Setting Up JDev]]></category>
		<category><![CDATA[Setting Up Jdeveloper]]></category>

		<guid isPermaLink="false">http://keithturley.wordpress.com/?p=174</guid>
		<description><![CDATA[How to Install the correct version of JDeveloper for your instance of E-Business Suite<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=174&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">
<div class="mceTemp">Download This Article From <a href="http://www.box.net/shared/q6bkepf468" target="_blank">The Download Folder</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p>This article will describe the process for downloading &amp; installing the correct version of JDeveloper for development on your instance of E-Business Suite. It will discuss how to identify the correct version of JDeveloper to use and how to configure your OAF environment on your local machine.</p>
<p>Oracle JDeveloper (JDev) is the development tool we use to develop Oracle Applications Framework components, due to variations in the framework different versions of Oracle Applications require development to be performed on different versions of JDeveloper or at least the OAF flavour of JDeveloper. JDeveloper can be downloaded from metalink however prior to visiting meta link you will need to establish which version and patch set you are running as regards Oracle Apps.</p>
<p>To identify the correct version of Oracle Applications Framework we need to activate diagnostics. You can do this by ensuring the profile option &#8220;FND: Diagnostics&#8221; is set to &#8220;Yes&#8221;. Close your browser session and restart Oracle Applications, Log in and click the &#8220;About this Page&#8221; Link which can be found in the page footer.</p>
<div id="attachment_178" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-178" title="about_page_link_r12" src="http://keithturley.files.wordpress.com/2009/05/about_page_link_r12.jpg?w=544&#038;h=300" alt="Fig 1" width="544" height="300" /><p class="wp-caption-text">Fig 1</p></div>
<p>When the &#8220;About Page&#8221; loads click the &#8220;Technology Components&#8221; Tab. You will be able to identify the version of Oracle Applications from the OA Framework version.</p>
<div id="attachment_179" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-179" title="about_this_page_tech_comp_r12" src="http://keithturley.files.wordpress.com/2009/05/about_this_page_tech_comp_r12.jpg?w=544&#038;h=282" alt="Fig 2" width="544" height="282" /><p class="wp-caption-text">Fig 2</p></div>
<div class="mceTemp"> </div>
<div class="mceTemp">Now that we have identified the correct version of OAF we can visit metalink <a href="https://metalink.oracle.com">https://metalink.oracle.com</a> note 416708.1 and download the corresponding version of JDeveloper. Download the file to a convenient directory on your machine, in this example we would download patch 6908968.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">
<div id="attachment_185" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-185" title="meta_link_jdev_dwnld2" src="http://keithturley.files.wordpress.com/2009/05/meta_link_jdev_dwnld2.jpg?w=544&#038;h=297" alt="Fig 3" width="544" height="297" /><p class="wp-caption-text">Fig 3</p></div>
</div>
<p>JDeveloper comes as a zip file and does not require any installation as such. We do however need to follow a few setup instructions to get up and running particularly if you are a developer that works on various versions of E-Business suite and thus will be using different versions of JDeveloper.</p>
<p>First unzip the JDeveloper zip file to a convenient directory. I recommend that you create a separate directory such as C:\JDeveloper\JDEV_R12_RUP4 . This will allow you to create further directories in the event that you download more versions and they will not conflict with each other. Once unzipped you will have three directories:</p>
<p>JDEVBIN: This is the JDeveloper software directory and contains the executables for the IDE.</p>
<p>JDEVDOC: This contains all help documentation including the OAF Developer Guide which will become invaluable to you as an OAF developer</p>
<p>JDEVHOME: This is where by default all of your project files and code will be created, sort of a my documents folder for JDeveloper.</p>
<p>Once installed we will need to create some shortcut links for your desktop so that you can launch JDeveloper and access the Developer Guide. Locate and create shortcuts for the following files for your desktop:</p>
<p>C:\yourInstallDirectory\jdevbin\jdev\bin\jdevW.exe for windows and jdev.exe for any other operating system.</p>
<p> C:\yourInstallDirectory\devdoc\index.htm</p>
<p>The jdevW.exe/jdev.exe links will launch JDeveloper and the index.htm will open the help documentation which contains a link to the OAF Dev Guide.</p>
<p>Before we launch JDeveloper we will complete one more configuration task and re-point the JDEVHOME directory to a central location i.e. My Documents or another partition where you keep all your files. This process is very helpful when it comes to running multiple versions of JDeveloper. Right Click on the &#8220;My Computer&#8221; icon and select the &#8220;Properties&#8221; option. Click the &#8220;Advanced&#8221; tab and then &#8220;Environment Variables&#8221;. Create a new user variable by clicking on the &#8220;New&#8221; button and enter JDEV_USER_HOME as the environment variable name and the path to your central directory as the value i.e. d:\my_files\jdev_home.</p>
<div id="attachment_188" class="wp-caption alignnone" style="width: 465px"><img class="size-full wp-image-188" title="jdev_user_home" src="http://keithturley.files.wordpress.com/2009/05/jdev_user_home.jpg?w=455&#038;h=532" alt="Fig 4" width="455" height="532" /><p class="wp-caption-text">Fig 4</p></div>
<p>Click OK and close the &#8220;My Computer&#8221; windows.</p>
<p>When JDeveloper is launched it will now automatically save your files and settings to the central user home rather than the default home in the installation directory. Always ensure that you back up your central user home to prevent the loss of critical project files.</p>
<p> Now we have our JDeveloper environment ready we need to get some environment specific setup completed so that you can interact with your E-Business Suite instance. In order to enable us access to apps we will need to obtain the DBC file and copy it to our local machine. The best way of doing this is to log into the application server using a tool like putty and obtain the file from $FND_SECURE by ftp using a tool like winscp, failing this you could obtain it from your DBA. Once you have your DBC file create a folder in your JDEVHOME directory called dbc_files\secure\ (Remember the JDEVHOME is the location that we assigned to the JDEV_USER_HOME environment variable in the previous steps) and copy the DBC file to it.</p>
<div class="mceTemp">
<div id="attachment_220" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-220" title="ftp_dbc1" src="http://keithturley.files.wordpress.com/2009/05/ftp_dbc1.jpg?w=544&#038;h=569" alt="Fig 5" width="544" height="569" /><p class="wp-caption-text">Fig 5</p></div>
<p> </p>
<p>Now that we have our DBC file we can open JDeveloper and configure the database connection. Launch your JDeveloper download by clicking the jdevW.exe link that we created earlier.</p></div>
</div>
<div class="mceTemp"> </div>
<div class="mceTemp">If you are using JDeveloper 10g i.e. for an Oracle Applications Version of R12 then you will be prompted to see if you want to migrate from another version, select &#8220;No&#8221; for this example. You will also see a tip of the day, click the &#8220;Close&#8221; button.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">
<div id="attachment_196" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-196" title="jdev_screen_10g" src="http://keithturley.files.wordpress.com/2009/05/jdev_screen_10g.jpg?w=544&#038;h=340" alt="Fig 6" width="544" height="340" /><p class="wp-caption-text">Fig 6</p></div>
<p>Click on the Connections tab and right click the &#8220;Database&#8221; folder and select &#8220;New Database Connection&#8221;.</p>
<div id="attachment_197" class="wp-caption alignnone" style="width: 420px"><img class="size-full wp-image-197" title="new_dbase_jdev_10g" src="http://keithturley.files.wordpress.com/2009/05/new_dbase_jdev_10g.jpg?w=410&#038;h=323" alt="Fig 7" width="410" height="323" /><p class="wp-caption-text">Fig 7</p></div>
<p>If you are using JDeveloper 9i then the Database folder can be found in the &#8220;System &#8211; Navigator&#8221; pane under the connections node, you will not have the Connections Tab.</p>
<div id="attachment_198" class="wp-caption alignnone" style="width: 507px"><img class="size-full wp-image-198" title="new_dbase_jdev_9i" src="http://keithturley.files.wordpress.com/2009/05/new_dbase_jdev_9i.jpg?w=497&#038;h=355" alt="Fig 8" width="497" height="355" /><p class="wp-caption-text">Fig 8</p></div>
<div class="mceTemp"> </div>
<div class="mceTemp">You will be presented with the Database Connection Wizard. Click &#8220;Next&#8221;</div>
<div class="mceTemp"> </div>
<div class="mceTemp">When prompted enter a name to represent your connection, this can be anything you like however I have just used the database SID for simplicity</div>
<div class="mceTemp"> </div>
<div class="mceTemp">
<div id="attachment_203" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-203" title="jdev_dbase_wiz_11" src="http://keithturley.files.wordpress.com/2009/05/jdev_dbase_wiz_11.jpg?w=544&#038;h=362" alt="Fig 9" width="544" height="362" /><p class="wp-caption-text">Fig 9</p></div>
</div>
<div class="mceTemp">
<div class="mceTemp">Click &#8220;Next&#8221; and enter the database username and password, this will need to be the apps account and password, leave the role field blank.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">
<div id="attachment_204" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-204" title="jdev_dbase_wiz_2" src="http://keithturley.files.wordpress.com/2009/05/jdev_dbase_wiz_2.jpg?w=544&#038;h=366" alt="Fig 10" width="544" height="366" /><p class="wp-caption-text">Fig 10</p></div>
</div>
<div class="mceTemp">Click &#8220;Next&#8221; and enter the database hostname, port and SID</div>
<div class="mceTemp"> </div>
<div class="mceTemp">
<div id="attachment_205" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-205" title="jdev_dbase_wiz_3" src="http://keithturley.files.wordpress.com/2009/05/jdev_dbase_wiz_3.jpg?w=544&#038;h=364" alt="Fig 11" width="544" height="364" /><p class="wp-caption-text">Fig 11</p></div>
<p> Click &#8220;Next&#8221; and click &#8220;Test Connection&#8221;, you should receive a successful connection message.</p></div>
<div class="mceTemp"> </div>
<div id="attachment_202" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-202" title="jdev_dbase_wiz_4" src="http://keithturley.files.wordpress.com/2009/05/jdev_dbase_wiz_4.jpg?w=544&#038;h=363" alt="Fig 12" width="544" height="363" /><p class="wp-caption-text">Fig 12</p></div>
<p> OK, now that we have the database connection configured we need to make sure that we can connect to our E-Business suite instance from within JDeveloper. We can use the toolbox tutorial files to do this which get shipped with the JDeveloper build.</p>
<p>Click File &gt; Open and navigate to JDEV_USER_HOME/myprojects and select the file toolbox.jws If you are running JDeveloper 10g you will automatically be in your JDev User Home with 9i you may have to navigate there manually due to a bug in the IDE.</p>
<p>If you are running JDeveloper 9i select the &#8220;Show Categories&#8221; icon, this will help us identify the test jsp page to run later.</p>
<div id="attachment_211" class="wp-caption alignnone" style="width: 321px"><img class="size-full wp-image-211" title="test_jsp_9i_category" src="http://keithturley.files.wordpress.com/2009/05/test_jsp_9i_category.jpg?w=311&#038;h=238" alt="Fig 13" width="311" height="238" /><p class="wp-caption-text">Fig 13</p></div>
<p>If you are running JDeveloper 10g select the &#8220;Applications Navigator&#8221; tab to see the opened workspace. </p></div>
<div class="mceTemp"> </div>
<div class="mceTemp">Now that we have the toolbox workspace open we need to modify the project settings in Tutorial.jpr, navigate to the project node under the toolbox node and right click on the &#8220;Tutorial&#8221; node and select &#8220;Project Properties&#8221; in 10g and &#8220;Project Settings&#8221; in 9i.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">You will be presented with a properties screen with several options in the left hand pane, expand the &#8220;Oracle Applications&#8221; node and select the &#8220;Run Time&#8221; sub menu item. Your screen will look similar to this.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">
<div class="mceTemp">
<div id="attachment_222" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-222" title="jdev_proj_properties_10g1" src="http://keithturley.files.wordpress.com/2009/05/jdev_proj_properties_10g1.jpg?w=544&#038;h=388" alt="Fig 14" width="544" height="388" /><p class="wp-caption-text">Fig 14</p></div>
<p>Configure the credentials as above. Select your DBC file that we downloaded earlier, enter YOUR username and password for Oracle Applications and ensure that you have the responsibility &#8220;Framework Toolbox Tutorial&#8221; assigned to that logon. To check that your logon is configured correctly run the SQL:</p></div>
</div>
<p class="mceTemp"><code class="km">select fnd_web_sec.validate_login('&lt;UserName&gt;','&lt;Password&gt;') from dual;</code></p>
<p class="mceTemp">This should return &#8216;Y&#8217; as the result indicating that your account is setup correctly.</p>
<p class="mceTemp">Repeat the above test for the Guest account specified in your DBC file (Usually GUEST/ORACLE).</p>
<p class="mceTemp">Enter ICX as the application short name and FWK_TBX_TUTORIAL as the responsibility, these parameters define which responsibility we will be running the project under.</p>
<p class="mceTemp">Select OK when you have finished.</p>
<p class="mceTemp">We are now ready to run the test project:</p>
<p class="mceTemp">In JDeveloper 9i navigate to the file test_fwktutorial under Workspaces &gt; toolbox.jws &gt; Tutorial.jpr &gt; HTML Sources &gt; test_fwktutorial.jsp</p>
<p class="mceTemp">In JDeveloper 10g navigate to the file test_fwktutorial under Applications &gt; toolbox &gt; tutorial &gt; Web Content &gt; test_fwktutorial.jsp</p>
<p class="mceTemp">Right click the test_fwktutorial.jsp node and select &#8220;Run&#8221; in 10g and &#8220;Run test_fwktutorial.jsp&#8221; in 9i</p>
<div id="attachment_213" class="wp-caption alignnone" style="width: 463px"><img class="size-full wp-image-213" title="jdev_run_test" src="http://keithturley.files.wordpress.com/2009/05/jdev_run_test.jpg?w=453&#038;h=530" alt="Fig 15" width="453" height="530" /><p class="wp-caption-text">Fig 15</p></div>
<div class="mceTemp"> </div>
<div class="mceTemp">If you are running on a remotely hosted environment prepare for this process to be slow (anywhere from 2 &#8211; 10 minutes dependant on your network) you are now effectively running an embedded server from your local machine and a lot of information will be pinging to and from your machine and the application server on the environment, normally these two components would be hosted on the same server and thus the performance will be seriously degraded.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">Once complete you should see the below screen.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">
<div id="attachment_218" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-218" title="frk_test_success" src="http://keithturley.files.wordpress.com/2009/05/frk_test_success.jpg?w=544&#038;h=381" alt="Fig 16" width="544" height="381" /><p class="wp-caption-text">Fig 16</p></div>
</div>
<div class="mceTemp"> </div>
<div class="mceTemp">Congratulations! You have successfully configured JDeveloper.</div>
<div class="mceTemp"> </div>
<div class="mceTemp">If you experience problems configuring your JDeveloper version then refer to meta link note 330236.1 for guidelines on raising a service request.</div>
<div class="mceTemp"> </div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/keithturley.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/keithturley.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/keithturley.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/keithturley.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/keithturley.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/keithturley.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/keithturley.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/keithturley.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/keithturley.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/keithturley.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/keithturley.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/keithturley.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/keithturley.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/keithturley.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=174&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://keithturley.wordpress.com/2009/05/07/oaf-downloading-and-configuring-jdeveloper/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f04253998834b7db298a4d3f286b3724?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">keithturley</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/about_page_link_r12.jpg" medium="image">
			<media:title type="html">about_page_link_r12</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/about_this_page_tech_comp_r12.jpg" medium="image">
			<media:title type="html">about_this_page_tech_comp_r12</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/meta_link_jdev_dwnld2.jpg" medium="image">
			<media:title type="html">meta_link_jdev_dwnld2</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_user_home.jpg" medium="image">
			<media:title type="html">jdev_user_home</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/ftp_dbc1.jpg" medium="image">
			<media:title type="html">ftp_dbc1</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_screen_10g.jpg" medium="image">
			<media:title type="html">jdev_screen_10g</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/new_dbase_jdev_10g.jpg" medium="image">
			<media:title type="html">new_dbase_jdev_10g</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/new_dbase_jdev_9i.jpg" medium="image">
			<media:title type="html">new_dbase_jdev_9i</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_dbase_wiz_11.jpg" medium="image">
			<media:title type="html">jdev_dbase_wiz_11</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_dbase_wiz_2.jpg" medium="image">
			<media:title type="html">jdev_dbase_wiz_2</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_dbase_wiz_3.jpg" medium="image">
			<media:title type="html">jdev_dbase_wiz_3</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_dbase_wiz_4.jpg" medium="image">
			<media:title type="html">jdev_dbase_wiz_4</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/test_jsp_9i_category.jpg" medium="image">
			<media:title type="html">test_jsp_9i_category</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_proj_properties_10g1.jpg" medium="image">
			<media:title type="html">jdev_proj_properties_10g1</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/jdev_run_test.jpg" medium="image">
			<media:title type="html">jdev_run_test</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/05/frk_test_success.jpg" medium="image">
			<media:title type="html">frk_test_success</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle Apps Basics &#8211; Session Context</title>
		<link>http://keithturley.wordpress.com/2009/04/30/apps-session-context/</link>
		<comments>http://keithturley.wordpress.com/2009/04/30/apps-session-context/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 12:08:03 +0000</pubDate>
		<dc:creator>keithturley</dc:creator>
				<category><![CDATA[Oracle Applications - The Basics]]></category>
		<category><![CDATA[Apps Context]]></category>
		<category><![CDATA[APPS_INITIALISE]]></category>
		<category><![CDATA[APPS_INITIALIZE]]></category>
		<category><![CDATA[Context]]></category>
		<category><![CDATA[E-Business Suite]]></category>
		<category><![CDATA[FND_GLOBAL]]></category>
		<category><![CDATA[FND_GLOBAL.APPS_INITIALISE]]></category>
		<category><![CDATA[FND_GLOBAL.APPS_INITIALIZE]]></category>
		<category><![CDATA[MOAC]]></category>
		<category><![CDATA[MO_GLOBAL]]></category>
		<category><![CDATA[MO_GLOBAL.INIT]]></category>
		<category><![CDATA[Multi Organization Access Control]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[R11]]></category>
		<category><![CDATA[R12]]></category>
		<category><![CDATA[Session]]></category>

		<guid isPermaLink="false">http://keithturley.wordpress.com/?p=26</guid>
		<description><![CDATA[How to establish an Oracle Applications Context Session<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=26&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
Download This Article From <a href="http://www.box.net/shared/8p42j15vkf" target="_blank">The Download Folder</a></p>
<p class="mceTemp">This is one of several “Oracle Applications Basics” articles that are aimed at oracle applications program developers and cover a number of commonly used development elements when interacting with the E-Business Suite.</p>
</div>
<p>This article covers how to establish an Oracle Applications Context within your SQL session ( i.e. Toad/SQL Developer) when developing outside of the application or when a requirement exists to interact with Oracle Applications from an external source.</p>
<p>When logging into Oracle Applications a number of &#8220;Session&#8221; variables are assigned that are used during the time you spend logged on, these variables and application profile options are referred to collectively as the Apps Context. Some of these variables are used to restrict access to data through the use of secured views. You may find that certain views within Oracle Applications do not return data when you know that they should do, this is probably because you have not set your &#8220;Apps Context&#8221;.</p>
<p>A custom program being developed within the application should not need to establish its own context, that is established when the user logs in via the standard Apps login screen. You may find that certain products such as workflow will want you to establish a session manually within your code in certain scenarios, for details on this you will need to consult the product documentation however as a general rule you should not need to establish a context yourself if you are developing your code to run within Oracle Apps and you are doing so with the correct responsibilities and users with correct security access.</p>
<p>To set a global context session you can use the following code:</p>
<table style="border-right:medium none;border-top:medium none;background:#d9d9d9;border-left:medium none;border-bottom:medium none;border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width:426.45pt;background-color:transparent;border:windowtext .5pt solid;padding:0 5.4pt;" width="569" valign="top">
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:'Courier New';" lang="EN-GB">BEGIN<br />
   fnd_global.apps_initialize<br />
      (  user_id      =&gt; 0<br />
      ,  resp_id      =&gt; 0<br />
      ,  resp_appl_id =&gt; 0<br />
      );<br />
END;</span></p>
<p style="margin:0;"><span style="font-size:small;"><span style="font-family:Arial Unicode MS;"> </span></span></p>
</td>
</tr>
</tbody>
</table>
<p>The values for user_id, resp_id and resp_appl_id can be obtained by running the following query:</p>
<table style="border-right:medium none;border-top:medium none;background:#d9d9d9;border-left:medium none;border-bottom:medium none;border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width:426.45pt;background-color:transparent;border:windowtext .5pt solid;padding:0 5.4pt;" width="569" valign="top">
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:'Courier New';" lang="EN-GB">SELECT u.user_id user_id<br />
,      r.responsibility_id resp_id<br />
,      r.application_id resp_appl_id<br />
,      r.responsibility_key resp_key<br />
FROM   fnd_user u<br />
,      fnd_user_resp_groups ur<br />
,      fnd_responsibility r<br />
WHERE  u.user_name = &#8216;&lt;USER_NAME&gt;&#8217;<br />
AND    ur.responsibility_id = r.responsibility_id<br />
AND    ur.user_id = u.user_id;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
</td>
</tr>
</tbody>
</table>
<p>Substitute &lt;USER_NAME&gt; for the oracle applications user name for the account you wish to use. This query will then return a list of the assigned responsibilities for that user.</p>
<p>Once executed you will have established a context within your database session and will be able to see profile option values at user/responsibility/site level aswell as retrieve data from organisation secured views.</p>
<p><span style="text-decoration:underline;">R12 Considerations</span></p>
<p>With the introduction of R12 Oracle introduced the concept of &#8220;Multi Organization Access Control&#8221; which allowed a user to operate across different organizations using a single responsibility. The introduction of this feature meant that the fnd_global.apps_initialize function was no longer sufficient to establish the context session and an additional API was introduced called MO_GLOBAL.</p>
<p>Within R12 after calling the apps_intialize API you must then call MO_GLOBAL.INIT(&#8216;&lt;PRODUCT_SHORT_NAME&gt;&#8217;) where PRODUCT_SHORT_NAME is the product you are coding for i.e. ONT, PER, AMS etc&#8230;</p>
<p>To read more about Multi Organization Access Control and how it can impact your code see Meta Link note 420787.1 &#8220;White Paper: Oracle Applications Multiple Organizations Access Control for Custom Code&#8221;.</p>
<p>Download This Code From <a href="http://www.box.net/shared/8p42j15vkf" target="_blank">The Download Folder</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/keithturley.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/keithturley.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/keithturley.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/keithturley.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/keithturley.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/keithturley.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/keithturley.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/keithturley.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/keithturley.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/keithturley.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/keithturley.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/keithturley.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/keithturley.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/keithturley.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=26&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://keithturley.wordpress.com/2009/04/30/apps-session-context/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f04253998834b7db298a4d3f286b3724?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">keithturley</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle Apps Basics &#8211; Messages</title>
		<link>http://keithturley.wordpress.com/2009/04/02/oracle-applications-basics-messages/</link>
		<comments>http://keithturley.wordpress.com/2009/04/02/oracle-applications-basics-messages/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 19:14:57 +0000</pubDate>
		<dc:creator>keithturley</dc:creator>
				<category><![CDATA[Oracle Applications - The Basics]]></category>
		<category><![CDATA[Apps Messages]]></category>
		<category><![CDATA[E-Business Suite]]></category>
		<category><![CDATA[FNDLOAD]]></category>
		<category><![CDATA[FND_MESSAGE]]></category>
		<category><![CDATA[FND_MESSAGE.CLEAR]]></category>
		<category><![CDATA[FND_MESSAGE.GET]]></category>
		<category><![CDATA[FND_MESSAGE.SET_NAME]]></category>
		<category><![CDATA[FND_MESSAGE.SET_TOKEN]]></category>
		<category><![CDATA[Message]]></category>
		<category><![CDATA[Message Library]]></category>
		<category><![CDATA[Messages]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Message Library]]></category>

		<guid isPermaLink="false">http://keithturley.wordpress.com/?p=27</guid>
		<description><![CDATA[How to Implement Oracle Applications Messages<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=27&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
Download This Article From <a href="http://www.box.net/shared/vzz39ti2ba" target="_blank">The Download Folder</a></p>
<p class="mceTemp">This is one of several &#8220;Oracle Applications Basics&#8221; articles that are aimed at oracle applications program developers and cover a number of commonly used development elements when interacting with the E-Business Suite.</p>
</div>
<p>This article covers the use of application messages and focuses on the use of the pl/sql package FND_MESSAGE as well as the use of the generic loader to download and upload messages between your environments.</p>
<p>During the development of custom programs it is common to use customised messages in our code to implement error messages, confirmation messages, log entries etc&#8230;</p>
<p>These messages will be seen and interpreted by your end users and it is important to ensure that these messages can easily be changed in the event that your customer wishes to do so. The reason for changing them maybe simple such as a spelling mistake or more complex like assigning a generic error code to all error messages used by the system to aid in support activities.</p>
<p>The Oracle E-Business suite provides a message library that allows us to implement our messages and at the same time provides the facility to easily change these messages via the E-Business suite standard user interface.</p>
<p>This article will cover the creation of messages via the E-Business suite user interface and the implementation of message retrieval via the pl/sql API package provided with Oracle Applications.</p>
<p><span style="text-decoration:underline;"><strong>Creating an Oracle E-Business Suite Message</strong></span></p>
<p>To create a message in the E-Business suite message library you will need the &#8220;Application Developer&#8221; responsibility. Once logged in navigate to Application Developer &gt; Application &gt; Messages. This will launch a form and it will look like figure 1:</p>
<div class="mceTemp"> </div>
<div class="mceTemp">
<p class="mceTemp"> </p>
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"><img class="size-full wp-image-103" title="messages_screen4" src="http://keithturley.files.wordpress.com/2009/04/messages_screen4.jpg?w=613&#038;h=404" alt="Figure 1" width="613" height="404" /></dt>
<dd class="wp-caption-dd">Figure 1</dd>
</dl>
<p> </p></div>
<div class="mceTemp"> </div>
<p> </p>
<p>Enter a unique name for your message, for custom messages this is often in the form XX_NN_MM where</p>
<p>XX is the custom schema prefix you are using (Usually just XX)</p>
<p>NN is the module code or short name for the extension that the message belongs</p>
<p>MM the message description</p>
<p>I would advise that you always use a unique NN portion to the message name to make it easy for you to identify your messages i.e. you can query back all messages for XX_MYMOD%, this will help you later when you are compiling your messages for your installation scripts.</p>
<p>Select the language that your message is written in and the application that the message belongs, this will usually be the custom application setup by your development team lead. If you don&#8217;t yet have a custom application and you are developing custom application modules then you will need one.</p>
<p>Enter the message text in the &#8220;Current Message Text&#8221; box.</p>
<p>Click the save icon.</p>
<p>For message naming conventions you should always consult your build standards documentation for the customer you are implementing for to ensure you have observed any standard development approach that may have been implemented at your site.</p>
<p>Example:</p>
<p class="mceTemp"> </p>
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"><img class="size-full wp-image-104" title="messages_screen24" src="http://keithturley.files.wordpress.com/2009/04/messages_screen24.jpg?w=613&#038;h=413" alt="Figure 2" width="613" height="413" /></dt>
<dd class="wp-caption-dd">Figure 2</dd>
</dl>
<p> </p>
<p><strong><span style="text-decoration:underline;">Retrieving a message using PL/SQL</span></strong></p>
<p>Once we have saved the message in E-Business suite via the standard message form we need to interact with the message library via our custom code to enable us to implement the message in the way it was intended to be used.</p>
<p>In order to retrieve the message from the database we need to use a few different standard foundation API&#8217;s in the FND_MESSAGE package. An E-Business suite message should be retrieved as follows:</p>
<p>1. Clear the current session of any message variables that may already be set</p>
<p>2. Tell E-Business suite which message you wish to retrieve</p>
<p>3. Retrieve the actual message string</p>
<p>4. Clear the session (Not required but good practice)</p>
<p>This process will look like this in your PL/SQL</p>
<p>For more details regarding fnd_global.apps_initialise see my other blog entry <a title="Oracle Apps Basics - Session Context" href="http://keithturley.wordpress.com/2009/04/30/apps-session-context/" target="_blank">&#8220;Oracle Apps Basics &#8211; Session Context&#8221;</a></p>
<table style="border-right:medium none;border-top:medium none;background:#d9d9d9;border-left:medium none;border-bottom:medium none;border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width:426.45pt;background-color:transparent;border:windowtext .5pt solid;padding:0 5.4pt;" width="569" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></p>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">set serveroutput on </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">DECLARE<span>  </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>my_message VARCHAR2(100); </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">BEGIN<span>  </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Initialise Apps Session</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>fnd_global.apps_initialize( user_id<span>      </span>=&gt; 1290</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span>                          </span>,<span>  </span>resp_id<span>      </span>=&gt; 50257</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span>                          </span>,<span>  </span>resp_appl_id =&gt; 10003</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span>                           </span>);</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Clear the existing session<span>  </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>FND_MESSAGE.CLEAR;</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Tell ebusiness suite which message you want (custom application short name/message name)<span>   </span></span></pre>
<pre class="MsoNormal" style="margin:0;"> </pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>FND_MESSAGE.SET_NAME('XX','XX_MYMOD_MESSAGE1');</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Retrieve the message<span>  </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>my_message := FND_MESSAGE.GET;<span>    </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Output the message<span>  </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>DBMS_OUTPUT.PUT_LINE(my_message); </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">END; </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">anonymous block completed </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">Test Message 1</span></pre>
<pre class="MsoNormal" style="margin:0;"> </pre>
</td>
</tr>
</tbody>
</table>
<p> </p>
<p> </p>
<p><strong><span style="text-decoration:underline;">Using Tokens</span></strong></p>
<p>The Oracle E-Business suite allows the substitution of tokens within a message string to enable the programmer to add dynamic content to the message at run time. This is useful for adding things like timestamps and user names to the existing message.</p>
<p>We will expand the example used in the previous section to demonstrate the use of tokens in our messages.</p>
<p>Open the E-Business Suite message creation form and query back your previous message.</p>
<p>In order to insert a token into a message it is necessary to prefix the token with a ampersand e.g. modify your message text from &#8220;Test Message 1&#8243; to &#8220;Test Message Retrieved at &amp;TIMESTAMP by user &amp;USERNAME&#8221;</p>
<p>Tokens can be called what ever you want but they must be prefixed with an ampersand and they must be in uppercase.</p>
<p>To demonstrate the use of our new tokens we will add an additional 2 API calls to our previous code which will set the tokens to the desired values and then resolve the message using the substituted values, our code will now look like this:</p>
<pre>
<table style="border-right:medium none;border-top:medium none;background:#d9d9d9;border-left:medium none;border-bottom:medium none;border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width:426.45pt;background-color:transparent;border:windowtext .5pt solid;padding:0 5.4pt;" width="569" valign="top">
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">set serveroutput on</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">DECLARE</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>my_message VARCHAR2(100);</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">BEGIN</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Initialise Apps Session</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>fnd_global.apps_initialize( user_id<span>      </span>=&gt; 1290</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span>                          </span>,<span>  </span>resp_id<span>      </span>=&gt; 50257</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span>                          </span>,<span>  </span>resp_appl_id =&gt; 10003</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span>                           </span>);</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Clear the existing session</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>FND_MESSAGE.CLEAR;</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Tell ebusiness suite which message you want (custom application short name/message name)</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>FND_MESSAGE.SET_NAME('XXC','XX_MYMOD_MESSAGE1');</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Set the timestamp message token with the current database timestamp </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>FND_MESSAGE.SET_TOKEN('TIMESTAMP',to_char(SYSDATE,'DD-MM-YYYY HH:MI:SS'));</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Set the username message token with the current applications user</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>FND_MESSAGE.SET_TOKEN('USERNAME',FND_GLOBAL.USER_NAME);</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Retrieve the message</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>my_message := FND_MESSAGE.GET;</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span></span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>--Output the message</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"><span> </span>DBMS_OUTPUT.PUT_LINE(my_message);</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">END;</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">anonymous block completed</span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">Test Message Retrieved at 02-04-2009 03:16:59 by user TURLEYK</span></pre>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
</td>
</tr>
</tbody>
</table>
<p> </pre>
<p><strong><span style="text-decoration:underline;">Downloading and Uploading Messages using the Generic Loader</span></strong></p>
<p>The generic loader can be used to download/upload existing E-Business Suite messages.</p>
<p>To download our example message we would use the following command at the Unix prompt on the mid-tier:</p>
<pre>
<table style="border-right:medium none;border-top:medium none;background:#d9d9d9;border-left:medium none;border-bottom:medium none;border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width:426.45pt;background-color:transparent;border:windowtext .5pt solid;padding:0 5.4pt;" width="569" valign="top"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct MSG_XX_MYMOD_MESSAGE1.ldt </span></pre>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">FND_NEW_MESSAGES APPLICATION_SHORT_NAME='XX' MESSAGE_NAME="XX_MYMOD_MESSAGE1"</span></pre>
<pre class="MsoNormal" style="margin:0;"> </pre>
</td>
</tr>
</tbody>
</table>
</pre>
<p>To Upload our example message we would use the following command at the Unix prompt on the mid-tier:</p>
<table style="border-right:medium none;border-top:medium none;background:#d9d9d9;border-left:medium none;border-bottom:medium none;border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width:426.45pt;background-color:transparent;border:windowtext .5pt solid;padding:0 5.4pt;" width="569" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB"> </span></p>
<pre class="MsoNormal" style="margin:0;"><span style="font-size:8pt;font-family:'Courier New';" lang="EN-GB">FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct MSG_XX_MYMOD_MESSAGE1.ldt</span></pre>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
</td>
</tr>
</tbody>
</table>
<address> </address>
<p>Download This Code From <a href="http://www.box.net/shared/vzz39ti2ba" target="_blank">The Download Folder</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/keithturley.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/keithturley.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/keithturley.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/keithturley.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/keithturley.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/keithturley.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/keithturley.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/keithturley.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/keithturley.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/keithturley.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/keithturley.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/keithturley.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/keithturley.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/keithturley.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=27&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://keithturley.wordpress.com/2009/04/02/oracle-applications-basics-messages/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f04253998834b7db298a4d3f286b3724?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">keithturley</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/04/messages_screen4.jpg" medium="image">
			<media:title type="html">messages_screen4</media:title>
		</media:content>

		<media:content url="http://keithturley.files.wordpress.com/2009/04/messages_screen24.jpg" medium="image">
			<media:title type="html">messages_screen24</media:title>
		</media:content>
	</item>
		<item>
		<title>Function Result Cache in Oracle 11g</title>
		<link>http://keithturley.wordpress.com/2009/02/18/function-result-cache-in-oracle-11g/</link>
		<comments>http://keithturley.wordpress.com/2009/02/18/function-result-cache-in-oracle-11g/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 17:00:39 +0000</pubDate>
		<dc:creator>keithturley</dc:creator>
				<category><![CDATA[Oracle Database Technology]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[Function Result Cache]]></category>
		<category><![CDATA[Function Result Caching]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[implementation restriction]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PLS-00999]]></category>
		<category><![CDATA[RELIES_ON]]></category>
		<category><![CDATA[Result]]></category>
		<category><![CDATA[RESULT_CACHE]]></category>

		<guid isPermaLink="false">http://keithturley.wordpress.com/?p=3</guid>
		<description><![CDATA[How to use Function Result Caching in Oracle 11g<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=3&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Download This Article From <a href="http://www.box.net/shared/rcxulk6fk9" target="_blank">The Download Folder</a></p>
<p>I wasn&#8217;t sure what to write about on my first blog entry so I waited for inspiration and it came to me in the form of Function Result Caching in Oracle 11g.</p>
<p>I have recently had cause to use this feature in one of my recent customer engagements to assist with SQL performance. Im sure that anyone in the Business Intelligence arena or anyone who has had to write complex performant SQL queries will appreciate the difficulties that come with using functions in your SQL. Traditionally we work around these performance problems by removing the function calls from our queries and replacing them with other joins and complex SQL logic to achieve something that more often than not is very simple.</p>
<p>The use of functions in SQL simplifies the main query making it more readable and more importantly maintainable. The Oracle 11g database now comes with a new caching feature that will help you overcome some of these difficulties in the right circumstances. Say you had a function that is referenced several times in the same SQL query (maybe you want to include it in your select and where clause or maybe in a decode function and it must be used twice). Each time the function would probably be receiving the same parameters, why does it have to be executed multiple times? Maybe you are interrogating a bunch of records with a date column and you want to work out what financial period that date is in according to your business calendar, maybe these records all have similar dates, say 1 million records all with dates in January. Obviously there will be a fair amount of repetition and you may only be passing 31 distinct values to the function throughout the SQL query execution, Why do we need to execute the function 1 million times?</p>
<p>With the introduction of function result caching in Oracle 11g we no longer have to worry about wasted effort executing functions. By simply adding a declaration of RESULT_CACHE to your functions you can tell Oracle to only execute the code in your function once for every unique set of parameters that are supplied to that function. In the event that a duplicate call is made to that function then Oracle will simply return the same value that it did last time by recalling it from the cache which it updated the first time the function was called with that set of parameters.</p>
<p>The best thing with this new feature is that the cache operates from the shared pool (Global System Memory) rather than the PGA which only operates at a session level. Meaning that all of your users will benefit from the cached values. An additional feature can be used with function caching which enables you to specify that the cache should be refreshed following a DML operation on a specified table. By adding the RELIES_ON(TABLE_NAME) clause to the end of the RESULT_CACHE declaration you can clear the cached values for the function which will force the function body to execute the next time it is called regardless of the fact that it may have been called before the table update with the same parameters. This allows you to take advantage of the fact that your function may use underlying tables to calculate it&#8217;s return value and following an update the data it is returning from the cache maybe stale.</p>
<p>This new Oracle database feature will undoubtedly be a massive help to any of you out there writing big complex SQL queries that use functions or PL/SQL batch processes. I know I will be using it a lot. I have included an example below of the code in action, please note the fact that when specifying a dependant table you do not do so in the package specification (If you are using packages) it must only be added as an option in the package body, failure to do this will result in the following error from the compiler:</p>
<ul>
<li>Error(3,12): PLS-00999: implementation restriction (may be temporary) RELIES_ON clause is disallowed on function declaration</li>
</ul>
<p> </p>
<p>Further reading and examples:</p>
<p><a href="http://www.oracle-developer.net/display.php?id=504">http://www.oracle-developer.net/display.php?id=504</a></p>
<p><a href="http://www.oracle.com/technology/oramag/oracle/07-sep/o57plsql.html">http://www.oracle.com/technology/oramag/oracle/07-sep/o57plsql.html</a></p>
<p>Example: </p>
<pre>--Create a temporary table
CREATE TABLE FUNCTION_CACHING_TEST (COLUMN1 VARCHAR2(10));

--Create the package spec
CREATE OR REPLACE PACKAGE FUNCTION_CACHING_TEST_PKG AS
  FUNCTION DBMS_OUTPUT_TEST(p_test_number VARCHAR2) RETURN VARCHAR2 RESULT_CACHE;
END FUNCTION_CACHING_TEST_PKG;

--Create the package body
CREATE OR REPLACE PACKAGE BODY FUNCTION_CACHING_TEST_PKG AS
  FUNCTION DBMS_OUTPUT_TEST(p_test_number VARCHAR2) RETURN VARCHAR2 RESULT_CACHE RELIES_ON(FUNCTION_CACHING_TEST)
  IS
  BEGIN
    DBMS_OUTPUT.PUT_LINE('DBMS_OUTPUT_TEST Function body executed');
    RETURN 'SUCCESS';
  END DBMS_OUTPUT_TEST;
END FUNCTION_CACHING_TEST_PKG;

--Call the function with value of Test 1
DECLARE
  result VARCHAR2(100);
BEGIN
  result:= FUNCTION_CACHING_TEST_PKG.DBMS_OUTPUT_TEST('Test 1');
END;
--DBMS OUTPUT
--anonymous block completed
--DBMS_OUTPUT_TEST Function body executed</pre>
<p>Note that the DBMS_OUTPUT_TEST message has been printed indicating that the function body was executed</p>
<pre>--Call the function with value of Test 1 again
DECLARE
  result VARCHAR2(100);
BEGIN
  result:= FUNCTION_CACHING_TEST_PKG.DBMS_OUTPUT_TEST('Test 1');
END;
--DBMS OUTPUT
--anonymous block completed</pre>
<p>Note that the DBMS_OUTPUT_TEST message has not been printed, the function body was not executed</p>
<pre>--Call the function with a new value
DECLARE
  result VARCHAR2(100);
BEGIN
  result:= FUNCTION_CACHING_TEST_PKG.DBMS_OUTPUT_TEST('Test 2');
END;
--DBMS OUTPUT
--anonymous block completed
--DBMS_OUTPUT_TEST Function body executed</pre>
<p>A new value was used that is not recorded in the cache so the function was executed</p>
<pre>--Update the relies on table
INSERT INTO FUNCTION_CACHING_TEST VALUES ('DML Update');

--Pass a previously cached value
DECLARE
  result VARCHAR2(100);
BEGIN
  result:= FUNCTION_CACHING_TEST_PKG.DBMS_OUTPUT_TEST('Test 1');
END;
--DBMS OUTPUT
--anonymous block completed
--DBMS_OUTPUT_TEST Function body executed</pre>
<p>Despite the fact that the value &#8220;Test 1&#8243; has already been passed and was logged in the cache the DML update on the table specified in the RELIES_ON clause has forced a cache refresh.</p>
<p>Download This Code From <a href="http://www.box.net/shared/rcxulk6fk9" target="_blank">The Download Folder</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/keithturley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/keithturley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/keithturley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/keithturley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/keithturley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/keithturley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/keithturley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/keithturley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/keithturley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/keithturley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/keithturley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/keithturley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/keithturley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/keithturley.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=keithturley.wordpress.com&amp;blog=6619667&amp;post=3&amp;subd=keithturley&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://keithturley.wordpress.com/2009/02/18/function-result-cache-in-oracle-11g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f04253998834b7db298a4d3f286b3724?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">keithturley</media:title>
		</media:content>
	</item>
	</channel>
</rss>
