<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3536012502243359546</id><updated>2024-10-04T23:51:27.152-07:00</updated><category term="Array"/><category term="Debug Log Level"/><category term="Diagnostics"/><category term="How to create logs in OAF"/><category term="OAF logs"/><category term="Return Object from Procedure"/><category term="VARRRAY"/><category term="oracle apps logging"/><category term="writeDiagnostics"/><title type='text'>OAF Basics</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ashishoafbasics.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3536012502243359546/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ashishoafbasics.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ashish</name><uri>http://www.blogger.com/profile/03511149905175986239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFseR7RELkgzvgLyYSa6bkLcHIDtv5QCMOXl0Nd_chcYRryqJUCJBkB1TELkpPRw0teUdifRo97W-_Yp6pDU3gSZ1KYi8gaTE4TNNJniAyZpb1SnFWirCGmFoogmsh6g/s220/DSC_0021.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3536012502243359546.post-7673838971413724330</id><published>2012-05-28T10:52:00.000-07:00</published><updated>2012-05-28T11:01:52.354-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Array"/><category scheme="http://www.blogger.com/atom/ns#" term="Return Object from Procedure"/><category scheme="http://www.blogger.com/atom/ns#" term="VARRRAY"/><title type='text'>OAF Return String Array from Procedure</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
One of the issue we face in OAF is how to get Object from a Procedure. In this post we&#39;ll get String Array from Procedure.&lt;br /&gt;
&lt;br /&gt;
Create a VARRAY in PlSql&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;CREATE OR REPLACE TYPE&amp;nbsp; STR_ARRAY IS VARRAY(100)
OF VARCHAR2(50);&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
Java code&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
//setting out parameter&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;OADBTransaction transaction = getOADBTransaction();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;try{ &lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;OracleCallableStatement cst = (OracleCallableStatement)transaction.createCallableStatement(&quot;begin apps.returnArray(:1,:2);end;&quot;,1); &lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;cst.registerOutParameter(2, Types.ARRAY,
&quot;APPS.STR_ARRAY&quot;);&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;cst.setString(1,&quot;Hello&quot;);&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
cst.execute();&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
//returning array type variable&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;java.sql.Array arr = (java.sql.Array)cst.getObject(2);&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
//Reading Array&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; if (arr != null) {&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String[] strArray = (String[])arr.getArray();&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i
&amp;lt; strArray.length; i++) &lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;array at &quot;+i+&quot;:&quot;+strArray[i]);&lt;/i&gt;&lt;/div&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/i&gt;&lt;br /&gt;
&lt;div class=&quot;yiv1120816422MsoNormal&quot;&gt;
&lt;i&gt;}catch(SQLException ex){&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;System.out.println(ex);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;}&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashishoafbasics.blogspot.com/feeds/7673838971413724330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashishoafbasics.blogspot.com/2012/05/oaf-return-string-array-from-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3536012502243359546/posts/default/7673838971413724330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3536012502243359546/posts/default/7673838971413724330'/><link rel='alternate' type='text/html' href='http://ashishoafbasics.blogspot.com/2012/05/oaf-return-string-array-from-procedure.html' title='OAF Return String Array from Procedure'/><author><name>ashish</name><uri>http://www.blogger.com/profile/03511149905175986239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFseR7RELkgzvgLyYSa6bkLcHIDtv5QCMOXl0Nd_chcYRryqJUCJBkB1TELkpPRw0teUdifRo97W-_Yp6pDU3gSZ1KYi8gaTE4TNNJniAyZpb1SnFWirCGmFoogmsh6g/s220/DSC_0021.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3536012502243359546.post-2819875802554669015</id><published>2012-05-19T11:59:00.003-07:00</published><updated>2012-05-19T12:24:21.546-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debug Log Level"/><category scheme="http://www.blogger.com/atom/ns#" term="Diagnostics"/><category scheme="http://www.blogger.com/atom/ns#" term="How to create logs in OAF"/><category scheme="http://www.blogger.com/atom/ns#" term="OAF logs"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle apps logging"/><category scheme="http://www.blogger.com/atom/ns#" term="writeDiagnostics"/><title type='text'>writeDiagnostics() method of OAF</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Hi All, for the first time I am writing any blog. In this I&#39;ve tried to share my OAF knowledge with all. Kindly bear with me and my language :). Your comments will be highly appreciated to improve it.&lt;br /&gt;
&lt;br /&gt;
For creating logs from OAF java pages &amp;nbsp;&lt;b&gt;writeDiagnostics()&lt;/b&gt;&amp;nbsp;method is used.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&lt;b&gt;writeDiagnostics&lt;/b&gt;(Object module ,String message,int logLevel);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;dd&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&lt;code&gt;module&lt;/code&gt;&amp;nbsp;- current module, usually the &quot;this&quot; pointer&lt;/span&gt;&lt;/dd&gt;&lt;dd&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&lt;code&gt;messageText&lt;/code&gt;&amp;nbsp;- message to be included in the log. Limit 4000 characters.&lt;/span&gt;&lt;/dd&gt;&lt;dd&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&lt;code&gt;logLevel&lt;/code&gt;&amp;nbsp;- category or type of log message. Valid values are are from&amp;nbsp;&lt;code&gt;OAFwkConstants&lt;/code&gt;. (&lt;code&gt;UNEXPECTED&lt;/code&gt;,&lt;code&gt;ERROR&lt;/code&gt;,&amp;nbsp;&lt;code&gt;EXCEPTION&lt;/code&gt;,&lt;code&gt;EVENT&lt;/code&gt;,&lt;code&gt;PROCEDURE&lt;/code&gt;,&lt;code&gt;STATEMENT&lt;/code&gt;,&lt;code&gt;PERFORMANCE&lt;/code&gt;)&lt;/span&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;br /&gt;
In controller this method can be accessed by&amp;nbsp;&lt;i&gt;OAPageContext&lt;/i&gt;&amp;nbsp;class object&lt;br /&gt;
&lt;code style=&quot;background-color: #fff2cc;&quot;&gt;pageContext.writeDiagnostics(this,&quot;Write Log&quot;,OAFwkConstants.STATEMENT) ;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
While in AM, VO and EO the method can be accessed by the&amp;nbsp;&lt;i&gt;OADBTransactionImpl&lt;/i&gt;&amp;nbsp;class object&lt;br /&gt;
&lt;code style=&quot;background-color: #fff2cc;&quot;&gt;OADBTransactionImpl.writeDiagnostics(this,&quot;Log Message&quot;,OAFwkConstants.STATEMENT) ;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;Set the profile option&amp;nbsp;&lt;i style=&quot;background-color: #fff2cc;&quot;&gt;FND: Debug Log Level&lt;/i&gt;&amp;nbsp;at user-level.&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;The logs written through this method can be viewed by enabling the Diagnostics on the OA Pages.&lt;/code&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvTvFTSmfhnx_8famKP2jN89YOnoNgAh9wlGLrC2YNQ25az7RIc7XJKtyxpTUnS_Zt2xWYpHjaUByrv2wQ6xnoVHVgk_2Z3c_gACEOApPRsCFbKjs8jT-owAgRnYyIU5Uxn7jsBehkjEQ/s1600/log_levels.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvTvFTSmfhnx_8famKP2jN89YOnoNgAh9wlGLrC2YNQ25az7RIc7XJKtyxpTUnS_Zt2xWYpHjaUByrv2wQ6xnoVHVgk_2Z3c_gACEOApPRsCFbKjs8jT-owAgRnYyIU5Uxn7jsBehkjEQ/s320/log_levels.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvTvFTSmfhnx_8famKP2jN89YOnoNgAh9wlGLrC2YNQ25az7RIc7XJKtyxpTUnS_Zt2xWYpHjaUByrv2wQ6xnoVHVgk_2Z3c_gACEOApPRsCFbKjs8jT-owAgRnYyIU5Uxn7jsBehkjEQ/s1600/log_levels.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: monospace; text-align: left;&quot;&gt;In DB the logs can be accessed by querying&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fff2cc; color: black; font-family: monospace; text-align: left;&quot;&gt;FND_LOG_MESSAGES&lt;/span&gt;&lt;span style=&quot;color: black; font-family: monospace; text-align: left;&quot;&gt;.&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashishoafbasics.blogspot.com/feeds/2819875802554669015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashishoafbasics.blogspot.com/2012/05/writediagnostics-method-of-oaf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3536012502243359546/posts/default/2819875802554669015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3536012502243359546/posts/default/2819875802554669015'/><link rel='alternate' type='text/html' href='http://ashishoafbasics.blogspot.com/2012/05/writediagnostics-method-of-oaf.html' title='writeDiagnostics() method of OAF'/><author><name>ashish</name><uri>http://www.blogger.com/profile/03511149905175986239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFseR7RELkgzvgLyYSa6bkLcHIDtv5QCMOXl0Nd_chcYRryqJUCJBkB1TELkpPRw0teUdifRo97W-_Yp6pDU3gSZ1KYi8gaTE4TNNJniAyZpb1SnFWirCGmFoogmsh6g/s220/DSC_0021.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvTvFTSmfhnx_8famKP2jN89YOnoNgAh9wlGLrC2YNQ25az7RIc7XJKtyxpTUnS_Zt2xWYpHjaUByrv2wQ6xnoVHVgk_2Z3c_gACEOApPRsCFbKjs8jT-owAgRnYyIU5Uxn7jsBehkjEQ/s72-c/log_levels.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>