Execute vo query once in a page/region
Hi OAF Experts,
I have a region that executes a VO at processRequest. Now, when I navigate to the next page OR click a subtab to take me to another region (the other region from the subtab has its own controller), the VO is re-executed when I go back to the same region. I only want to execute the vo ONCE when it is called from a source page (the source page in this regards is the Hierarchy Page from HR). How do I do this? It seems that PPR is the answer but I cannot find any example anywhere. Can someone please help shed light on this? Is there any sample code that I can also look at?
Thank you very much.
use if(!vo.isPreparedForExecution()) {vo.executeQuery()}
Similar Messages
-
GO button to execute a query once report parameters are selected.
I am familiar with the GO button depicted in chapter 10 of the 2 Day Developer manual that does not cause the report to be rendered until a user chooses a value from a select list of values. The GO button is used in conjunction with Null Value Text (ex. -Select-), Null Value (ex. -1), and Default (ex.-1).
I need an alternative to the above method that will still force the user to pick a value from the List Of Values parameters prior to executing the query and rendering the report. Please provide.
Thanks, Don From MaineWhy don't you use a validation process?
Denes Kubicek -
Can I stop a report from Re-executing the query when I go back to that page
I have a report that has a complicated query and looks at a lot of information to display the results. This query then links of to show details of individual items that were displayed in the result. But when I hit the back button on the browser, it executes the query again and it takes a while for the page to load.
Is there any way to stop this and only execute the query when the User pushes a Button on the page else display the previous results.
Thanks
SriramAnother alternative is to make that detail link open in a popup window using
javascript:popupURL(...);This way, the complicated report page is always visible. -
ADF how can i execute a query with parameters when the page renders
hi
i am using ADF web 11g
i need to execute a query with parameters when the page renders
thankshello,
I'm a fan of Java code, I really am.
But when you use ADF, you decided to move to a more declarative environment.
So why not do it declarative, the adf way?
In your pagedef insert a action binding.
This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
Create an invokeAction in your pagedef and set the condition.
This example refreshes(Action 2 is execute query) the data.
First the method binding:
<action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
<invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
-Anton
PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming. -
Stop executing query once the result is more than n rows
Hi,
Is it possible to stop executing a query for a View Object once the result hits n rows?
Any pointers are appreciated
Thank you for your time.
Edited by: user594688 on Sep 12, 2008 8:21 AMRownum is indeed the attribute. If you really want to stop the query after the first n rows, that's pretty much the only way to do it, to my knowledge.
If you're primarily worried about database load, but want to give the user the option to query more rows if and when they really need them, check out the following in the Fusion Dev Guide for Forms/4GL developers:
37.1.5 Efficiently Scrolling Through Large Result Sets Using Range Paging
(Note that this is not the same as simply using a range size, which ADF does by default--the range size simply limits the number of rows displayed ot the user, not the number queried. It's also not the same as setting the JDBC Fetch size, which limits the number of rows loaded into the cache, and therefore onto the app server, at one time, but again not the actual query result.) -
How to use same page fragment more than once in a page,
Hi Gurus,
How to use same page fragment more than once in a page. I have a complex page fragment which has lots of Bindings (Binding Property set with backingBean variables).
I want to use the same page fragment multiple times on the same page with different tabs.
I want different ApplicationModule Instance for the page fragment in different tabs.
So I have created a Bounded Taskflow with pagefragments which has this complex pagefragment.
I've dragged the taskflow to page and created regions.
I'm able to execute the page successfully when I have only one region but fails if I have region more than once in the page.
Can anyone help me how to resolve this issue.
Web User Interface Developer's Guide for Oracle Application Development Framework: section 19-2 states we can have same pagefragment more than once in a page.
Thanks,
Satyajava.lang.IllegalStateException: Duplicate component id: 'pt1:r1:0:t2:si5', first used in tag: 'com.sun.faces.taglib.jsf_core.SelectItemsTag'
+id: j_id_id1
type: javax.faces.component.UIViewRoot@1d23189
+id: d1
type: RichDocument[UIXFacesBeanImpl, id=d1]
+id: j_id_id5
type: HtmlScript[UIXFacesBeanImpl, id=j_id_id5]
+id: j_id0
type: javax.faces.component.html.HtmlOutputText@bc252
+id: m1
type: RichMessages[UINodeFacesBean, id=m1]
+id: f1
type: RichForm[UIXFacesBeanImpl, id=f1]
+id: pt1
type: RichPageTemplate[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@2a0cc, id=pt1]
+id: ps1
type: RichPanelSplitter[UIXFacesBeanImpl, id=ps1]
+id: pt3
at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1199)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag265(__projectrevenuern_jsff.java:12356)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag264(__projectrevenuern_jsff.java:12317)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag263(__projectrevenuern_jsff.java:12262)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag262(__projectrevenuern_jsff.java:12200)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag261(__projectrevenuern_jsff.java:12147)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag260(__projectrevenuern_jsff.java:12099)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag259(__projectrevenuern_jsff.java:12047)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag258(__projectrevenuern_jsff.java:11992)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag257(__projectrevenuern_jsff.java:11948)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag255(__projectrevenuern_jsff.java:11860)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag254(__projectrevenuern_jsff.java:11808)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag9(__projectrevenuern_jsff.java:510)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag8(__projectrevenuern_jsff.java:461)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag1(__projectrevenuern_jsff.java:149)
at jsp_servlet.__projectrevenuern_jsff._jspService(__projectrevenuern_jsff.java:67)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:429)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184)
at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(IncludeTag.java:443)
at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:153)
at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:128)
at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:492)
at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:127)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag50(__projectrevenuepg_jspx.java:2392)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag49(__projectrevenuepg_jspx.java:2353)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag46(__projectrevenuepg_jspx.java:2209)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag45(__projectrevenuepg_jspx.java:2162)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag9(__projectrevenuepg_jspx.java:526)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag8(__projectrevenuepg_jspx.java:475)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag7(__projectrevenuepg_jspx.java:424)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag6(__projectrevenuepg_jspx.java:373)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag2(__projectrevenuepg_jspx.java:202)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag1(__projectrevenuepg_jspx.java:144)
at jsp_servlet.__projectrevenuepg_jspx._jspService(__projectrevenuepg_jspx.java:71)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:473)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:141)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:710)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = CAMIND1 TXID = CONTEXTID = TIMESTAMP = 1262712477691
WatchAlarmType: AutomaticReset
WatchAlarmResetPeriod: 30000
>
<JMXWatchNotificationListener><handleNotification> failure creating incident from WLDF notification
oracle.dfw.incident.IncidentCreationException: DFW-40116: failure creating incident
Cause: DFW-40112: There was an error executing adrci commands; the following errors have been found "DIA-48415: Syntax error found in string [create home base=C:\\Documents and Settings\\tammineedis\\Application] at column [69]
DIA-48447: The input path [C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr] does not contain any ADR homes
DIA-48447: The input path [diag\ofm\defaultdomain\defaultserver] does not contain any ADR homes
DIA-48494: ADR home is not set, the corresponding operation cannot be done
Action: Ensure that command line tool "adrci" can be executed from the command line.
at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:708)
at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createIncident(DiagnosticsDataExtractorImpl.java:246)
at oracle.dfw.spi.weblogic.JMXWatchNotificationListener.handleNotification(JMXWatchNotificationListener.java:195)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor$ListenerWrapper.handleNotification(DefaultMBeanServerInterceptor.java:1732)
at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
at weblogic.management.jmx.modelmbean.WLSModelMBean.sendNotification(WLSModelMBean.java:824)
at weblogic.diagnostics.watch.JMXNotificationProducer.postJMXNotification(JMXNotificationProducer.java:79)
at weblogic.diagnostics.watch.JMXNotificationProducer.sendNotification(JMXNotificationProducer.java:104)
at com.bea.diagnostics.notifications.JMXNotificationService.send(JMXNotificationService.java:122)
at weblogic.diagnostics.watch.JMXNotificationListener.processWatchNotification(JMXNotificationListener.java:103)
at weblogic.diagnostics.watch.Watch.performNotifications(Watch.java:621)
at weblogic.diagnostics.watch.Watch.evaluateLogRuleWatch(Watch.java:546)
at weblogic.diagnostics.watch.WatchManager.evaluateLogEventRulesAsync(WatchManager.java:765)
at weblogic.diagnostics.watch.WatchManager.run(WatchManager.java:525)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: oracle.dfw.common.DiagnosticsException: DFW-40112: failed to execute the adrci commands "create home base=C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr product_type=ofm product_id=defaultdomain instance_id=defaultserver
set base C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr
set homepath diag\ofm\defaultdomain\defaultserver
create incident problem_key="BEA-101020 [HTTP]" error_facility="BEA" error_number=101020 error_message="null" create_time="2010-01-05 12:27:58.155 -05:00" ecid="0000INzXpbB7u1MLqMS4yY1BGrHn00000K"
Cause: There was an error executing adrci commands; the following errors have been found "DIA-48415: Syntax error found in string [create home base=C:\\Documents and Settings\\tammineedis\\Application] at column [69]
DIA-48447: The input path [C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr] does not contain any ADR homes
DIA-48447: The input path [diag\ofm\defaultdomain\defaultserver] does not contain any ADR homes
DIA-48494: ADR home is not set, the corresponding operation cannot be done
Action: Ensure that command line tool "adrci" can be executed from the command line.
at oracle.dfw.impl.incident.ADRHelper.invoke(ADRHelper.java:1052)
at oracle.dfw.impl.incident.ADRHelper.createIncident(ADRHelper.java:786)
at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:688)
... 19 moreI get the above Error.
I have checked the bindings and it has 2 instances of the taskflow.
I have changed the backingbean scope to backingBean -
Server resources availability while executing a query
hi,
lets say we have a query that requires XX MB to be executed.
the needed memory is available, and while the query is getting memory, another threads jump on the database, and the memory needed to execute the query is not available.
under those circunstances, can the query change the memory requirements to execute the query (i.e. page out to temp objects), or the query will NEED the XX MB to be executed?
can the execution plan change the resources requirements based on database recourses availability ?
Thank you,
EladioThe Execution Plan is determined before the query begins executing.
The query cannot stop and restart with a new execution plan.
However, if the same query is executed more than once, even inside a loop
in a PLSQL block, it may get re-parsed and may acquire a different Execution
Plan.
PGA_AGGREGATE_TARGET is a "guide" for Oracle to dtermine the available
memory for an SQL (it looks at PGA memory currently used by other concurrently
executing SQLs). However, considering the dynamics of multiple processes
co-existing on a server, this is not and cannot be a hard limit so the actual
PGA in use at any time can fluctuate.
(consider, for example that other, Non-Oracle, processess might start up and
take memory and Oracle isn't aware of those processes "stealing" available
memory. Or consider a bug in sort / hash algorithms which cause an Oracle
process to take (or request from the OS) much more memory than it "should",
resulting in ORA-4030s !)
However, as a general rule, Oracle uses PGA_AGGREGATE_TARGET
and also provides an advisory view that you can query. (Oracle periodically
collects statistics about PGA usage and SGA usage and updates the
respective advisory views). -
Pass values to bind variales and execute VO query
Hi All,
I have a requirement to add validation to an appraisal page via OAF.
As a part of testing I need to check, if the values in the query of VO is displayed in the page.
VO - QuestAnsValuesVO
EO - QuestAnswerValueEO, QuestFieldEO
The VO query is
SELECT * FROM (SELECT QuestAnswerValueEO.QUEST_ANSWER_VAL_ID, QuestAnswerValueEO.QUESTIONNAIRE_ANSWER_ID, QuestAnswerValueEO.FIELD_ID, QuestAnswerValueEO.OBJECT_VERSION_NUMBER, QuestAnswerValueEO.VALUE, QuestFieldEO.FIELD_ID AS QUEST_FIELD_ID, QuestFieldEO.NAME, QuestFieldEO.TYPE, QuestFieldEO.HTML_TEXT, rank() over (partition by QuestFieldEO.NAME order by QuestFieldEO.FIELD_ID) AS RANK, QuestAnswerValueEO.QUESTIONNAIRE_ANSWER_ID AS QUESTIONNAIRE_ANSWER_ID1 FROM HR_QUEST_ANSWER_VALUES QuestAnswerValueEO, HR_QUEST_FIELDS QuestFieldEO WHERE QuestFieldEO.QUESTIONNAIRE_TEMPLATE_ID(+) = :1 and QuestAnswerValueEO.QUESTIONNAIRE_ANSWER_ID(+) = :2 AND QuestFieldEO.FIELD_ID = QuestAnswerValueEO.FIELD_ID (+)) QRSLT ORDER BY QUEST_FIELD_ID
I am trying to execute this query in the extended controller class so that i can get the values printed on the page. I am getting SQL exception saying - not all variables are bound.
How do i pass values to bind variables :1 and :2 and execute this query?
Please help.
Thanks
GeethaGeetha,
Instead of :1 and :2 use a named bind variable as part of your VO and then set either a default value or set its value during runtime. See this example on how to create bind variable:
http://formattc.wordpress.com/2010/04/02/custom-java-bind-variable-in-a-where-clause-of-an-adf-view-object/
Once created, you can set its value during runtime either in ApplicationModuleImpl or in ViewObjectImpl class
e.g.,
ViewObjectImpl view = this.getEmpView();
VariableValueManager vm = view.ensureVariableManager();
vm.setVariableValue("empNo", value);
view.executeQuery();regards,
~Krithika -
APEX 'crawling' whilst executing a query using CONNECT BY
Hi Folks.
Anyone seen this behaviour before?
I can run this SQL (with the appropriate page item values substitued) in PL/SQL developer and I get the result in less than 0.094 seconds with a COST of 13
SELECT NULL LINK
,a.data_points
,5000 forecast_value
FROM
(SELECT to_char(trunc(add_months((SELECT iag.agreement_start_date
FROM iot_agreement iag
WHERE iag.iot_agreement_id =
:P317_IOT_REBATE_AGREEMENT_ID)
,LEVEL - 1)
,'mm')
,'MON-RR') data_points
FROM dual
CONNECT BY LEVEL <=
trunc(months_between((SELECT iag.agreement_end_date
FROM iot_agreement iag
WHERE iag.iot_agreement_id =
:P317_IOT_REBATE_AGREEMENT_ID)
,(SELECT iag.agreement_start_date
FROM iot_agreement iag
WHERE iag.iot_agreement_id =
:P317_IOT_REBATE_AGREEMENT_ID)))
MINUS
SELECT pkg_ngc_utilities.get_long_traffic_month(imps.traffic_period_id)
FROM iot_mfs_plus_summary imps
WHERE imps.client_master_entity_id = :P317_CLIENT_MASTER_ENTITY_ID
AND imps.home_master_entity_id IN
(SELECT ipy.master_entity_id
FROM iot_party ipy
WHERE ipy.iot_agreement_id = :P317_IOT_REBATE_AGREEMENT_ID
AND ipy.client_side = 0) -- Roaming Partner
AND imps.visited_master_entity_id = imps.client_master_entity_id
AND pkg_ngc_utilities.get_long_traffic_month(imps.traffic_period_id) IN
(SELECT to_char(trunc(add_months((SELECT iag.agreement_start_date
FROM iot_agreement iag
WHERE iag.iot_agreement_id =
:P317_IOT_REBATE_AGREEMENT_ID)
,LEVEL - 1)
,'mm')
,'MON-RR') data_points
FROM dual
CONNECT BY LEVEL <= trunc(months_between ((SELECT iag.agreement_end_date
FROM iot_agreement iag
WHERE iag.iot_agreement_id =
:P317_IOT_REBATE_AGREEMENT_ID) ,
(SELECT iag.agreement_start_date
FROM iot_agreement iag
WHERE iag.iot_agreement_id =
:P317_IOT_REBATE_AGREEMENT_ID)
)))) a
ORDER BY to_date(a.data_points, 'MON-RR')If I use the same query in a Flash Chart the page still only takes a few seconds to display but the chart takes over a minute to display. APEX ADMIN shows the page being served in 2 - 3 seconds.
If I drop the chart and drop the query into a simple report region, the entire page takes over a minute to display.
Has anyone experienced anything similar?
This is the first time I have used CONNECT BY LEVEL in my SQL so that is my main suspect. But please remember, in SQL/Developer the query executes very quickly indeed.
Many thanks
Kind regards
Simon GaddHi Simon,
I had something similar. When my code ran is SQL is took seconds, but took minutes in an ApEx page. There seems to the something strange with the way ApEx and/or the optimizer execute code via ApEx pages.
I gave my code to one of my tuning experts and they added a simple rule to force index use:
select /*+RULE index(r AMS_REQUESTS_IDX4) */
r.requester_name,
r.ams_type_code_name,
d.display_date
from
(select TO_DATE(:P23_CALENDAR_DATE,'YYYYMMDD')-100+rownum display_date from all_objects where rownum < 300) d,
ams_requests_v r
where
trunc(d.display_date) between trunc(r.start_date) and trunc(r.end_date)
and r.approval_status != 'R'
and to_char(d.display_date,'DY') NOT IN ('SAT','SUN')
and d.display_date not in (select trunc(closure_date) from ams_closures)
and (nvl(r.restricted_view_flag,'N') = 'N' or trunc(r.end_date) >= trunc(sysdate))
and r.department_id in ( select
d.department_id
from
ams_departments d
connect by ( PRIOR DEPARTMENT_ID = PARENT_DEPARTMENT_ID)
start with department_id = (
select
department_id
from
ams_departments
where
nvl(terminating_dept_flag,'N') = 'Y'
and level = (select
min(level)
from
ams_departments
where
nvl(terminating_dept_flag,'N') = 'Y'
connect by department_id = prior parent_department_id
start with department_id = :P0_DEPARTMENT_ID)
connect by department_id = prior parent_department_id
start with department_id = :P0_DEPARTMENT_ID))
UNION
select /*+RULE index(r AMS_REQUESTS_IDX4) */
r.requester_name,
r.ams_type_code_name,
d.display_date
from
(select TO_DATE(:P23_CALENDAR_DATE,'YYYYMMDD')-100+rownum display_date from all_objects where rownum < 300) d,
ams_requests_v r
where
trunc(d.display_date) between trunc(r.start_date) and trunc(r.end_date)
and r.approval_status != 'R'
and to_char(d.display_date,'DY') NOT IN ('SAT','SUN')
and d.display_date not in (select trunc(closure_date) from ams_closures)
and nvl(r.restricted_view_flag,'N') = 'Y'
and r.department_id in ( select distinct
d.department_id
from
ams_departments d
connect by ( PRIOR DEPARTMENT_ID = PARENT_DEPARTMENT_ID)
start with department_id in (
select
department_id
from
ams_departments_v
where
:P0_PERSON_ID in (manager_id, deputy_id,administrator_id)))
UNION
select
NULL requester_name,
t.name ams_type_code_name,
trunc(c.closure_date) display_date
from
ams_closures c,
ams_closure_type_codes_v t
where
c.AMS_CLOSURE_TYPE_CODE = t.AMS_CLOSURE_TYPE_CODE
order by 3,1It might be worth you trying something similar.
best regards,
Martin -
Invalid read mode while executing the query
Hi,
I have developed a query based on a cube in MM module.
When I try to execute the query, the following error is being displayed:
Invalid read mode
Message no. BRAIN017
Diagnosis
If queries (often unintentionally) are assigned the read mode "Query to Read All Data at Once", this often results in performance problems. To eliminate this problem, this warning is displayed when you execute a query with this read mode when the query is generated.
Procedure for System Administration
Before you execute the query, repair the read mode:
u2022 You can repair the read mode for this query in the Query Monitor (transaction RSRT1). You can set the read mode for the selected query by choosing Query -> Read Mode.
u2022 If this warning is displayed when you check a query, you need to change the default read mode for new queries in the InfoCube in InfoCube maintenance. In InfoProvider maintenance, choose Environment -> InfoProvider Properties -> Change and make the relevant settings on the Query/Cache tab page.
Please let me know what are the exact setting that I need to do and where.
Thanks in advance.
Will assign points for the solution.
Thanks & Regards.Hi Ganesh,
You can change the read mode by going to transaction RSRT, entering the query name and then clicking the properties button. A dialog box will then be displayed that allows you to change the read mode.
The question of what's the best read mode for you query depends on the requirements of the query:
If you choose "read all data at once", it will take quite awhile before the first view of the query is shown. This is because it basically reads all data needed for your query (e.g. data for hierarchy nodes etc). However, after the initial view, successive navigations might be a lot faster.
The read mode "Read data during navigation and expansion of hierarchies" is usually the best mode. The initial view will show up in the least amount of time in this mode. However, when the users start to navigate, data will then be read from the database (aggregates, or the main cube tables) or the cache.
The read mode "Read data during navigation" is like the "Read data during navigation and expansion of hierarchies" mode. However, it will also read the data for the hierarchy nodes. Expansions of the hierarchy will therefore be faster in this mode. Of course, there's additional overhead for the initial view.
Hope this helps. Cheers. -
Error in executing Std query - Incorrect FRANGE row in FORM/DIM?FAC
Hi,
NOTE: We are on BI 7.0 Spport Pack 12 (SAPKW70012)...
When I try to execute a query(one of the standard queries in HR - 0PA_C01_Q021), I got the following error messages:
ABEND: Incorrect FRANGE row in FORM/DIM?FAC for InfoObject 0AGE
ABEND: Incorrect FRANGE row in FORM/DIM?FAC for InfoObject 0ORGUNIT
ABEND: Program error in class SAPMSSY1 method: UNCAUGHT EXCEPTION
I searched the OSS and found a note 1001621 which said apply support package: SAP_BW_VIRTUAL_COMP - Rel 700 - Pkg name SAPK70012NVCBWTECH
But, our basis guys came back with the reply that the solution suggested in OSS note is for SAPKW70011, but our system is already on SAPKW70012. So, this note cannot be applied.
Is there any hidden solution out there? Please respond asap.
ThanksHi Raj and Sunny,
Actually solution is very simple. You have to open this query in Query Designer and redefine the corresponding selection. The problem is that OLAP in BW 7.x is much more strict to query definition than in BW 3.x. Therefore queries from BW 3.x are not accepted quite often. This error is just one example. So try to touch the corresponding selection using hierarchy and save a query once again. For sure this will help. If not, create a message, we will look at the problem directly in your system.
Best regards,
Maxim -
While executing the query in the web template I am facing below issue
Hello SAP geniuses,
Please help me on my issue ,
while executing the query in the web template i am facing below issue.
The variable for characteristic (region) is appearing but this characteristic (region) is not appearing in the free characteristic zone but when we are executing the query with out webtemplate it is showing both variable and free characteristic
can anybody help us to identify what is the issue with the web template.
Thanks
AlokHi,
Plz check ur report and execute at the designer and take its technical name and go to RSRT. log out and log in and try..
if not check ur authorisation.
Regards....KP -
ORA-27092 Error while executing any query from client
Hello
I am getting following error while executing any query from client remotly.
IAMDBA@TEST_OAT.ABCD > select userid from dual;
select userid from dual
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 1
ORA-01110: data file 1: '/u01/prod/system/system01.dbf'
ORA-27092: size of file exceeds file size limit of the process
Additional information: 131071
Additional information: 286209
But while local connection,its working.hi,
ulimit command- Limit user resources
su - oracle
ulimit -n (this command will show you the current value for ulimit the default value is 1024)
to increase its value:---
ulimit -n <some value> ( this command will change value for current session only)
example
ulimit -n 101062
once done check the value as:--
ulimit -n( for verification)
search in google for more explanation or revert back to me for any suggestions.... :)
Edited by: varun4dba on Jan 31, 2011 4:09 PM -
Another Error Executing Database Query.
I am getting this error.
12:40:54.054 - Database Exception - in
C:\CFusionMX7\wwwroot\Author\dropdown2\EmployeeAddAction.cfm : line
26
Error Executing Database Query.
i have added extra fields in the mdb and added extra code to
the form page and the action page.
i am getting this error still.
this is how i broke it down.
If I run my 2 files EmployeeAddForm.cfm and
EmployeeAddAction.cfm
I get this error:
NOTE: if i take out the comments from the code and ignore the
new fields added to the db it works fine!!!!!
The web site you are accessing has experienced an unexpected
error.
Please contact the website administrator.
The following information is meant for the website developer
for debugging purposes.
Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
INSERT INTO statement.
Resources:
Enable Robust Exception Information to provide greater detail
about the source of errors. In the Administrator, click Debugging
& Logging > Debugging Settings, and select the Robust
Exception Information option.
Check the ColdFusion documentation to verify that you are
using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Remote Address 127.0.0.1
Referrer
http://127.0.0.1:8500/Author/dropdown2/EmployeeAddForm.cfm
Date/Time 06-Jun-07 12:40 PM
NOTE: if i take out the comments from the code and ignore the
new fields added to the db it works fine!!!!!Try using '###CreateODBCDate(Form.DateOfBirth)###'. Access is
strange on
handling dates. It has a been a while since I have used
Access so it could
be as simple as wrapping it single quotes as well. I am
assuming the
"<!-----------" wasn't intended, but I could be wrong.
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technology, Inc.
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) ::
http://www.adobe.com/communities/experts/
"Coldfusionstudent" <[email protected]>
wrote in message
news:[email protected]...
>I am getting this error.
> 12:40:54.054 - Database Exception - in
>
C:\CFusionMX7\wwwroot\Author\dropdown2\EmployeeAddAction.cfm : line
26
> Error Executing Database Query.
>
> i have added extra fields in the mdb and added extra
code to the form page
> and
> the action page.
> i am getting this error still.
> this is how i broke it down.
>
> If I run my 2 files EmployeeAddForm.cfm and
EmployeeAddAction.cfm
> I get this error:
>
> The web site you are accessing has experienced an
unexpected error.
> Please contact the website administrator.
>
> The following information is meant for the website
developer for debugging
> purposes.
>
> Error Occurred While Processing Request
> Error Executing Database Query.
> [Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft
> Access Driver] Syntax error in INSERT INTO statement.
>
>
> Resources:
> Enable Robust Exception Information to provide greater
detail about the
> source
> of errors. In the Administrator, click Debugging &
Logging > Debugging
> Settings, and select the Robust Exception Information
option.
> Check the ColdFusion documentation to verify that you
are using the
> correct
> syntax.
> Search the Knowledge Base to find a solution to your
problem.
>
>
> Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; SV1; .NET CLR
> 1.1.4322; .NET CLR 2.0.50727)
> Remote Address 127.0.0.1
> Referrer
http://127.0.0.1:8500/Author/dropdown2/EmployeeAddForm.cfm
> Date/Time 06-Jun-07 12:40 PM
>
>
>
> EmployeeAddForm.cfm
>
> <cfquery name="GetCompanies"
> datasource="#Request.MainDSN#">
> SELECT
> CompanyID,
> CompanyName
> FROM
> Company
> ORDER BY
> CompanyName
> </cfquery>
>
> <html>
> <head>
> <title>ColdFusion MX Bible</title>
> <link rel="stylesheet" href="styles.css">
> </head>
>
> <body>
>
> <h1> </h1>
>
> <table>
> <cfform action="EmployeeAddAction.cfm"
method="POST">
>
> <tr>
> <td>Company</td>
> <td>
> <cfselect name="CompanyID"
> size="1"
> query="GetCompanies"
> value="CompanyID"
> display="CompanyName"
> required="Yes"
> message="Please select a Company."></cfselect>
> </td>
> </tr>
>
> <tr>
> <td>SSN</td>
> <td>
> <cfinput type="Text"
> name="SSN"
> message="Please enter the employee's Social Security
Number."
> validate="social_security_number"
> required="Yes"
> size="12"
> maxlength="11">
> </td>
> </tr>
>
> <tr>
> <td>First Name</td>
> <td>
> <cfinput type="Text"
> name="Firstname"
> message="Please enter the employee's first name."
> required="Yes"
> size="22"
> maxlength="20">
> </td>
> </tr>
>
> <tr>
> <td>Last Name</td>
> <td>
> <cfinput type="Text"
> name="Lastname"
> message="Please enter the employee's last name."
> required="Yes"
> size="22"
> maxlength="20">
> </td>
> </tr>
>
> <tr>
> <td>Salary</td>
> <td>
> <cfinput type="Text"
> name="Salary"
> message="Please enter a valid salary."
> validate="float"
> required="Yes"
> size="22"
> maxlength="20">
> </td>
> </tr>
>
> <tr>
> <td>DOB</td>
> <td>
> <cfinput type="Text"
> name="DateOfBirth"
> message="Please enter a valid date of birth in the
format mm/dd/yyyy"
> validate="date"
> required="Yes"
> size="11"
> maxlength="10">
> </td>
> </tr><!-------------
> <tr>
> <td>device_typ</td>
> <td>
> <cfinput type="Text"
> name="device_typ"
> message="Please enter the employee's device_typ."
> required="Yes"
> size="22"
> maxlength="20">
> </td>
> </tr><tr>
> <td>device_Email</td>
> <td>
> <cfinput type="Text"
> name="device_Email"
> message="Please enter the employee's device_Email."
> required="Yes"
> size="22"
> maxlength="20">
> </td>
> </tr><tr>
> <td>Work_email</td>
> <td>
> <cfinput type="Text"
> name="Work_email"
> message="Please enter the employee's Work_email."
> required="Yes"
> size="22"
> maxlength="20">
> </td>
> </tr><tr>
> <td>Pin_Number</td>
> <td>
> <cfinput type="Text"
> name="Pin_Number"
> message="Please enter the employee's Pin_Number."
> required="Yes"
> size="22"
> maxlength="20">
> </td>
> </tr>------------------>
> <tr>
> <td> </td>
> <td>
> <input type="submit" value="Add to Database">
> </td>
> </tr>
>
> </cfform>
> </table>
>
> </body>
> </html>
> ---------------------------
> EmployeeAddAction.cfm
>
> <cfquery name="InsertEmployee"
> datasource="#Request.MainDSN#">
> INSERT INTO Employee(
> SSN,
> CompanyID,
> Firstname,
> Lastname,
> Salary,
> DateOfBirth<!----------,
> device_typ,
> device_Email,
> Work_email,
> Pin_Number-------------->
>
> )
> VALUES (
> '#Trim(Form.SSN)#',
> #Val(Form.CompanyID)#,
> '#Trim(Form.Firstname)#',
> '#Trim(Form.Lastname)#',
> #Val(Form.Salary)#,
> #CreateODBCDate(Form.DateOfBirth)#<!-----------,
> '#Trim(Form.device_typ)#',
> '#Trim(Form.device_Email)#',
> '#Trim(Form.Work_email)#',
> '#Trim(Form.Pin_Number)#'------------------>
> )
> </cfquery>
>
> <cfmail
to="#Form.Firstname#.#Form.Lastname#@somewhere.com"
> from="[email protected]"
> subject="Welcome to your new company!">
> Welcome to your new company, #Form.Firstname#
#Form.Lastname#!
> </cfmail>
> <!----
> <cflocation url="EmployeeList.cfm">----->
> -
Error executing a query (validity interval problem in variable)
Hi all,
I have an issue in a query.
While executing the query i am getting following error
"THE VALIDITY INTERVAL HAS THE INITIAL VALUE AS LOWER LIMIT"
There are two CALMONTH variables that are being used in the query and are also used as selection variables
1) interval characteristic mandatory variable
2) single value characteristic mandatory variable
Please suggest me what might be the problem.
Any suggestions are welcome.
Thanks
MuditHello,
I tried debugging my query in RSRT and i have found a possible reason for that.
My query was built on a multiprovider in which data was not loaded in one of the cube.Since no request was loaded in the infocube initial fields of all time characteristics were empty which was the reason for the error.
Thanks once again for your valuable inputs.
Mudit
Maybe you are looking for
-
Dynamic Table row breaks only on the first page (not on second)
Hello, I biuld a dynamic table with Livecycle. If the text in the last field is to long, the table grows automatically. If the end of the first page is reached, the row breaks over from the first to the second page(= 1st break) This works correctly.
-
hi I have got tomcat5.0 running and am having trouble mapping my servlet so that it will run with the browser. Please tell me where I am going wrong. Java servlet test.HelloServlet compiles OK I have place the HelloServlet.class file in the following
-
How can i build a looping effect
Hi everybody, I'm currently cutting an interview and want to build the branding in Motion 5. I need a "station identifier" - a logo in the to right corner, and a line naming the website in the lower third. Bur the line with the website should only be
-
Testing abap program: creating checklist
Hello, I am creating a checklist to test some abap programs. I dont have experience to create a checklist, with the right and objective questions. I need the checklist questions specific for abap programs. Can you help me?
-
Hi everyone, Does anyone know how I can get text to curve in the same way as the word "Primo" in the following logo? Is there an easy way to do this or would I have to manually adjust the points on the path? Appreciate any advice.