Call query from database as item source
Hello!
I have a query that is too long to paste it as the record source for an Apex item. It exceeds the limit of 32K.
Is there a way to save that query at database level and call it from the apex item?
If there is, please be so kind and give a small example!
Thank you,
Sebastian
Hello,
Why not put that code into a PL/SQL packaged function and use the "PL/SQL Function Body" or "PL/SQL Function or Expression" types instead?
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!
Similar Messages
-
Urgent : Featching query from database
Please any one help for this query
I have two tables Emp, Dept
I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
Query is fetching like this
Empno Ename job Salary Comm deptno deptno dname Loc
15 i1 support 50000 11 5 5 IT sss
15 i1 support 50000 11 3 3 Account sss
16 i2 support 8000 10 5 5 IT sss
16 i2 support 8000 10 3 3 Account sss
16 i2 support 8000 10 3 3 Software sss
16 i2 support 8000 10 4 4 Operation sss
Query is fetching 6 rows.
but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
Here is the example (My Requirement):
This is first row:
Empno Ename job Salary Comm
15 i1 support 50000 11
Deptno dname Loc
5 IT sss
3 Account sss
This is second row:
Empno ename job Salary Comm
16 i2 support 8000 10
Deptno dname Loc
5 IT sss
3 Account sss
2 Software sss
4 Operation sss
thanks
ramumaybe this helps you
if not, i'm sorry:
for rec in (select empno, ename, job, salary, comm, deptno from emp)
loop
dbms_output.put_line(empno||' '||ename||' '||job||' '||salary||' '||comm, deptno);
dbms_output.put_line(rec.empno||' '||rec.ename||' '||rec.job||' '||rec.salary||' '||rec.comm);
for rec1 in (select deptno, dname, loc from dept where deptno=rec.deptno)
loop
dbms_output.put_line(deptno||' '||dname||' '||loc);
dbms_output.put_line(rec1.deptno||' '||rec1.dname||' '||rec1.loc);
end loop;
end loop;
Hope this helps,
Mick -
I am currently working on the query on the BO through a Java application. Following the sample procedure, I can perform a query to extract data from the built-in Universe e-fashion using the JDK-provided web services: QueryService and ReportEngine.
However, I encountered some problems when doing the same thing in a universe that contains million rows of data [let say Unvierse A]. I am not sure how the differences between the 2 universes affect the result.
I have tried several times like setting different query objects and query condition but the results still outputs error. There are some error messages I commonly found when I tried to execute the query from the Universe A.
DataProviderInformation boDataProviderInfo = boQuerySrv.createDataProvider(boUniverseUID, boQuerySpec, boRetProp);
DocumentInformation docInfo = objReportEngine.getDocumentInformation(boQueryDocRef, null, actions, null, retBOData);
org.apache.axis2.AxisFault: Read timed out
org.apache.axis2.AxisFault: Read timed out
When I tried doing the same query job in QaaWS / Webi, the report result looks fine. Am I missing some setting in Java ?
Any help is greatly appreciated.
Here are my findings on the Universe Specification:
(com.businessobjects.datasource.DataSourceSpecification)
e-fashion
getAdvancedConditionSupported() - true
getBothOperatorSupported() - true
getCombinedQuerySupported() - true
getConditionObjectValueSupported() - true
getDuplicateRowSupported() - true
getEditQueryAllowed() - true
getIsNullOperatorSupported() - true
getMaxInListNumber() - 999
getMaxRetrievalTime() - 300
getMaxRowsRetrieved() - 90000
getMissingRowSupported() - false
getName() - eFashion
getNotIsNullOperatorSupported() - true
getPercentageRankConditionSupported() - false
getRankConditionSupported() - false
getSortOnAnyObjectSupported() - true
getViewSQLSupported() - true
Universe A
getAdvancedConditionSupported() - false
getBothOperatorSupported() - false
getCombinedQuerySupported() - false
getConditionObjectValueSupported() - false
getDuplicateRowSupported() - false
getEditQueryAllowed() - true
getIsNullOperatorSupported() - false
getMaxInListNumber() - -1
getMaxRetrievalTime() - 600
getMaxRowsRetrieved() - 5000
getMissingRowSupported() - false
getNotIsNullOperatorSupported() - false
getPercentageRankConditionSupported() - false
getRankConditionSupported() - false
getSortOnAnyObjectSupported() - true
getViewSQLSupported() - falseI am currently working on the query on the BO through a Java application. Following the sample procedure, I can perform a query to extract data from the built-in Universe e-fashion using the JDK-provided web services: QueryService and ReportEngine.
However, I encountered some problems when doing the same thing in a universe that contains million rows of data [let say Unvierse A]. I am not sure how the differences between the 2 universes affect the result.
I have tried several times like setting different query objects and query condition but the results still outputs error. There are some error messages I commonly found when I tried to execute the query from the Universe A.
DataProviderInformation boDataProviderInfo = boQuerySrv.createDataProvider(boUniverseUID, boQuerySpec, boRetProp);
DocumentInformation docInfo = objReportEngine.getDocumentInformation(boQueryDocRef, null, actions, null, retBOData);
org.apache.axis2.AxisFault: Read timed out
org.apache.axis2.AxisFault: Read timed out
When I tried doing the same query job in QaaWS / Webi, the report result looks fine. Am I missing some setting in Java ?
Any help is greatly appreciated.
Here are my findings on the Universe Specification:
(com.businessobjects.datasource.DataSourceSpecification)
e-fashion
getAdvancedConditionSupported() - true
getBothOperatorSupported() - true
getCombinedQuerySupported() - true
getConditionObjectValueSupported() - true
getDuplicateRowSupported() - true
getEditQueryAllowed() - true
getIsNullOperatorSupported() - true
getMaxInListNumber() - 999
getMaxRetrievalTime() - 300
getMaxRowsRetrieved() - 90000
getMissingRowSupported() - false
getName() - eFashion
getNotIsNullOperatorSupported() - true
getPercentageRankConditionSupported() - false
getRankConditionSupported() - false
getSortOnAnyObjectSupported() - true
getViewSQLSupported() - true
Universe A
getAdvancedConditionSupported() - false
getBothOperatorSupported() - false
getCombinedQuerySupported() - false
getConditionObjectValueSupported() - false
getDuplicateRowSupported() - false
getEditQueryAllowed() - true
getIsNullOperatorSupported() - false
getMaxInListNumber() - -1
getMaxRetrievalTime() - 600
getMaxRowsRetrieved() - 5000
getMissingRowSupported() - false
getNotIsNullOperatorSupported() - false
getPercentageRankConditionSupported() - false
getRankConditionSupported() - false
getSortOnAnyObjectSupported() - true
getViewSQLSupported() - false -
Calling javascript from swf (which is source file of frame) - problems with OPERA
hey,
right now i have the swf-file as the source file for a frame,
because i want the swf-width depend on the browser-size.
it looks kinda like this:
<frameset cols="10,*,10">
<frame src="border.htm" name="leftFrame">
<frame src="file.swf" name="mainFrame">
<frame src="border.htm" name="rightFrame">
</frameset>
from the swf i call a javascript-code that is located in the
'border.htm'
file.
the javascript simply opens a popup window.
function open_popup() {
MM_openBrWindow('popup.htm','pop','toolbar=no,location=no,status=no,menubar=no,scrollbars =no,resizable=no,width=400,height=500');}everything
works fine ine firefox, ie, netscape (at least in another tab),but
when it comes to the opera browser (and apparently also safari)i
don't get any reaction at all ...i told opera to allow
popup-windows, so that shouldnt be the reason.now i am thinking
maybe some browsers have a problem with callingjavascripts from
within swfs that are not located in that specifichtml-file?maybe
some of you encountered the same problem ...would be grateful for
any advices ...thanx,evahey,
right now i have the swf-file as the source file for a frame,
because i want the swf-width depend on the browser-size.
it looks kinda like this:
<frameset cols="10,*,10">
<frame src="border.htm" name="leftFrame">
<frame src="file.swf" name="mainFrame">
<frame src="border.htm" name="rightFrame">
</frameset>
from the swf i call a javascript-code that is located in the
'border.htm'
file.
the javascript simply opens a popup window.
function open_popup() {
MM_openBrWindow('popup.htm','pop','toolbar=no,location=no,status=no,menubar=no,scrollbars =no,resizable=no,width=400,height=500');}everything
works fine ine firefox, ie, netscape (at least in another tab),but
when it comes to the opera browser (and apparently also safari)i
don't get any reaction at all ...i told opera to allow
popup-windows, so that shouldnt be the reason.now i am thinking
maybe some browsers have a problem with callingjavascripts from
within swfs that are not located in that specifichtml-file?maybe
some of you encountered the same problem ...would be grateful for
any advices ...thanx,eva -
Calling portlet from an image item
I have two image items and I want to call two report portlets such that If I
click on ImageA, it should call first report portlet and If I click on ImageB,
it should call 2nd report portlet on the same portlet reigon. I mean it should
hide and show the two report portlets on the same page and same region. This is
what I have done so far :-
(1) Created a content area
(2) Created a category
(3) Added two image items in that category
(4) Created two reports and published as portlets
Any help would be much apprecited.
ThanksHi
But the values you have given are hardcoded what if i want to capture the value on which i click and then pass it as a parameter.
My problem is i have a chart in a dynamic page when i click on the deptno i want to call the same chart by capturing deptno and passing the value in the call to the chart as an argument.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
Can you show me the PL/SQL code inside
the dynamic page?
Here is an example to pass params to reports
from a dynalic page:
<ORACLE>
declare
l_arg_names hzeng30.wwv_utl_api_types.vc_arr;
l_arg_values hzeng.wwv_utl_api_types.vc_arr;
begin
l_arg_names(1) := '_show_header';
l_arg_values(1) := 'NO';
l_arg_names(2) := 'deptno';
l_arg_values(2) := '20';
scott.rpt_on_emp.show(p_arg_names=>l_arg_names, p_arg_values=>l_arg_values);
end;
</ORACLE> <HR></BLOCKQUOTE>
null -
How to set the link to the result which are executed my query from database
Hi,
i have successfully displayed the results which are available in the database by jdbc, query.
Then, How to give the link like href to each & every result...
note: The number of records may be change. depending upon the records availablity in the database. but every result have the link.
Thanks in advance.
Regards
Kumarhai kumar..
i post an example code ..
<%
ResultSet rs1=stmt.executeQuery("select fromu,subject,message,mdate,status,mesid from message where to='" + lname +"'" );
while(rs1.next())
l=rs1.getLong(6);
out.println("<tr align='center'> <td> <a href='deletemessage.jsp?mesid="+ l + "'>Delete </a></td><td>" + rs1.getString(1) +"</td><td> <a href='viewmessage.jsp?mesid="+ l +"'>"+ rs1.getString(2) +"</a></td><td>"+ rs1.getString(4) +"</td><td>"+ rs1.getString(5) +"</td></tr>");
%> -
Query from a NTB item to retreive data block
I have two NTB text items. first i have enter values in, then i would like to take these values to query my block (table view)
the context of my form is:
Office{ salesmen---->{Agencies---->{customers and so one.
in my form I would like to allow to the user to enter the office code (from listArea) and choose the salesman code(from a LOV). (this part i got it).
From both values office code and salesman code I want to retreive all agencies, customers products and display them on my block.
the second is:
If i can do that, i would like to put a checkbox(table view) in front each row, so when i'll check a row I could take some values and query another table to display a detail form on new canva for this row.
I know I ask a lot, but you know i'm new in the oracle world
thanksFor your first requirement: Use a Pre-Query trigger to test if your Non-Base Table (NBT) items have values. If yes - use the SET_BLOCK_PROPERTY() built-in to add the values of these items to the default where clause of the base table block. For example:
/** Pre-Query trigger */
DECLARE
vDefWhere VARCHAR2(500) := GET_BLOCK_PROPERTY('PARENT_BLOCK',DEFAULT_WHERE);
BEGIN
IF ( :Control_block.C$Office_code name IS NOT NULL ) THEN
/* Assumes there is an existing WHERE Clause */
vDefWhere := vDefWhere|| ' AND OFFICE_CODE = :control_block.c$office_code';
END IF;
IF ( :Control_block.C$Sales_code IS NOT NULL ) THEN
vDefWhere := vDefWhere||' AND SALES_CODE = :control_block.c$sales_code';
END IF;
END;As to the your second request, why not design your form so you have a section where you select your criteria, a section that displays the queries Parent record and then a section that displays the related Child data. Then create a relationship (see the relationship code of the BLOCK in the Forms Navigator) between the Parent block and the Child block. The relationship will handle synchronizing the Child block with the Parent block as the user navigates through the different Parent records. Your form would like something like this:
|---------------------------------------------------|
| Office Code[ ] Sales Code[ ] |
| |
|--Parent Data--------------------------------------|
| Office Code Sales Code Item1 Item2 Item3 |
| [ ] [ ] [ ] [ ] [ ] ^|
| [ ] [ ] [ ] [ ] [ ] v|
| |
|----Child Data-------------------------------------|
| |
| Child1 Child2 Child3 Child4 |
| [ ] [ ] [ ] [ ] ^ |
| [ ] [ ] [ ] [ ] |
| [ ] [ ] [ ] [ ] |
| [ ] [ ] [ ] [ ] |
| [ ] [ ] [ ] [ ] v |
|---------------------------------------------------|When the user selects an Office and Sales Code - the Parent record will be queried. The relationship will automatically query the child records and display the results in the Child Data section of the form. If the user selects the second Parent record the relationship automatically queries the child records and displays them in the Child Data section again. This makes for an easier form to develop and maintain.
Hope this helps.
Craig...
-- If my response or the response of another is helpful or answers your question, please mark the response accordingly. Thanks! -
Problem in populating lookup values based on the lookup query from database
HI all
I have problem of population look-up values based on look-up query
I am giving the details what i am trying
I need to populate the values from the UD_LDAP_USR table into the field of UD_USRGRPC_NisNetTriple of type lookup
i planned to set the properties of lookup as like this
look up query as select UD_LDAP_USR_COMMON_NAME as NisNetTriple from UD_LDAP_USR
ColumnNames as UD_LDAP_USR_COMMON_NAME
Column captions as UD_LDAP_USR_COMMON_NAME
Column width as 30
Lookup Column Name as UD_LDAP_USR_COMMON_NAME
But when i try to add ColumnName as wht i mentioned above i m getting invalid property exception,update failed
I am not sure about that are we able to use other Connector table prefix with UD into the another processFrom
Let me give update on this issue
Urgent,struck my work here
thanks
NagarajThanks for the reply raghav
I tried but it was not working
I gave like what u specified but no use
It is throwing exception like set look-up query for the field
Any one help me out on this issue
Edited by: Nagaraju Chowdary on Jan 21, 2013 3:41 AM
Edited by: Nagaraju Chowdary on Jan 21, 2013 3:42 AM -
BEx Web: Java Error when calling query from Query Designer
When designing a query in the designer and executing it via the portal,
I get the following error:
com.sap.ip.bi.base.application.variableprocessor.IVariableProcessor.synchronizeStateVariables()V
The complete exception is:
com.sap.ip.bi.webapplications.runtime.controller.MessageException: Error while calling the method "processDialogCommand" at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2366) at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.doProcessRequest(Controller.java:841) at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.processRequest(Controller.java:775) at com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService.handleRequest(BIRuntimeService.java:412) at com.sap.ip.bi.webapplications.runtime.jsp.portal.components.LauncherComponent.doContent(LauncherComponent.java:21) at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209) at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114) at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189) at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215) at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645) at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189) at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753) at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240) at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522) at java.security.AccessController.doPrivileged(Native Method) at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)Caused by: com.sap.ip.bi.base.exception.BIBaseRuntimeException: Error while calling the method "processDialogCommand" at com.sap.ip.bi.util.MethodInvoker.callMethod(MethodInvoker.java:116) at com.sap.ip.bi.webapplications.runtime.command.CommandProcessorHelper.processCommand(CommandProcessorHelper.java:439) at com.sap.ip.bi.webapplications.runtime.command.CommandProcessorHelper.processCommand(CommandProcessorHelper.java:325) at com.sap.ip.bi.webapplications.runtime.base.CommunicationProcessor.processCommand(CommunicationProcessor.java:144) at com.sap.ip.bi.webapplications.runtime.impl.Page.processCommandSuper(Page.java:1451) at com.sap.ip.bi.webapplications.runtime.impl.Page.processCommandInternal(Page.java:1439) at com.sap.ip.bi.webapplications.runtime.impl.Page.processCommandSequence(Page.java:2022) at com.sap.ip.bi.webapplications.runtime.impl.Page.displayVariableScreen(Page.java:1845) at com.sap.ip.bi.webapplications.runtime.impl.Page.processCommandSequence(Page.java:2069) at com.sap.ip.bi.webapplications.runtime.impl.Page.doProcessRequest(Page.java:2755) at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2288) ... 36 moreCaused by: java.lang.NoSuchMethodError: com.sap.ip.bi.base.application.variableprocessor.IVariableProcessor.synchronizeStateVariables()V at com.sap.ip.bi.webapplications.ui.dialogs.variablescreen.DlgVariable.doUiDialogInit(DlgVariable.java:259) at com.sap.ip.bi.webapplications.ui.dialogs.framework.UiDialog.doInit(UiDialog.java:164) at com.sap.ip.bi.webapplications.runtime.base.PageObject.init(PageObject.java:244) at com.sap.ip.bi.webapplications.runtime.base.Dialog.init(Dialog.java:72) at com.sap.ip.bi.webapplications.runtime.base.Dialog.processCommand(Dialog.java:168) at com.sap.ip.bi.webapplications.runtime.base.CommunicationProcessor.processDialogCommand(CommunicationProcessor.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.ip.bi.util.MethodInvoker.callMethod(MethodInvoker.java:101) ... 46 more
The HP LEvel on the Java Stack is 10, on Te ABAP Stack it is 11.
Any ideas?
Thanks in advance, ThomDid you check these posts:
Unable to publish in IE with BEx Query Designer
Web Analyzer Execute failed- System received an expired SSO ticket
null -
Pardon this basic question!
Two users using BC4J against the same database, using Swing applications.
User A inserts a new record into table T. Commits changes.
Later, user B needs to update / access the new record in T. Neither user has logged off (if B exits the program and restarts it, they can see the new record, but this isn't a desirable solution).
The way things are right now, B can't see the new record as a result of BC4J caching.
What are my options?
Thanks!You can reexecute the query for B to freshen all new/removed rows before update. Or if all the caches are in one VM (both A and B are connecting to BC4J apps in a pool in a javaVM), then you can use commitAndSync apis instead of commit() to sync up caches in all AMs in the pool.
-
Call function from data base with clob input parameter.
Hello,
In this project I use Jdev 11g.
I call function from database.
create or replace function get_fa_list (
p_fa_id_list in clob
return sys_refcursor
is
vCursor sys_refcursor;
begin
put_msg ('begin');
if p_fa_id_list is null then
put_msg ('CLOB is null!');
else
put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
end if;
put_msg ('Save');
open vCursor for
select rownum as id, s.*
from (
select f.latitude, f.longitude, count (distinct f.res_id) as res_count, count (*) as fa_count, 16711680 as color, res_concat_distinct (f.res_id) as station_list
from mv_frequency_assignment f, table (SplitClob (p_fa_id_list, ',')) l
where f.ext_system = 'BI' and
f.ext_sys_id = l.column_value
group by f.latitude, f.longitude
) s;
put_msg ('Open and End');
return vCursor;
end get_fa_list;
I use TopLink in ejb.
i use follow code for call function and get result.
public List<TmpResPoints> findAllPointsBI(String p_id){
UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
uow.beginEarlyTransaction();
StoredFunctionCall call = new StoredFunctionCall();
call.setProcedureName("get_fa_list");
call.useUnnamedCursorOutputAsResultSet();
ClobDomain c = new ClobDomain(p_id);
//System.out.println(c.toString());
call.addNamedArgumentValue("p_fa_id_list", c);
ReadAllQuery query = new ReadAllQuery();
query.setReferenceClass(TmpResPoints.class);
query.setCall(call);
List<TmpResPoints> result = (List<TmpResPoints>)uow.executeQuery(query);
uow.commit();
uow.release();
return result;
But size parameter "p_fa_id_list" is 0. (geting from temp table in Data base). this code in function >>
if p_fa_id_list is null then
put_msg ('CLOB is null!');
else
put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
end if;)
How I can call this function from dataBase and get result?
thx,
Demka.What is the SQL generated?
The argument should just be the Clob value (a String) not the domain object.
Also try addNamedArgument, and then pass the named argument to the query.
James : http://www.eclipselink.org -
Oracle form: how to retrieve data from database to pop list
I have problem in retrieving data from database to item list in
oracle forms.
Can anyone help me.
thanks.The next is an example but you can find this information in
Forms Help:
DECLARE
G_DESCS RECORDGROUP;
ERRCODE NUMBER;
rg_id RECORDGROUP;
rg_name VARCHAR2(40) := 'Descripciones';
BEGIN
rg_id := FIND_GROUP(rg_name);
IF Id_Null(rg_id) THEN
G_DESCS := Create_Group_From_Query (rg_name, 'SELECT
DESCRIPCION DESCRIPCION, DESCRIPCION DESC2 FROM FORMAS_PAGO);
ERRCODE := POPULATE_GROUP(G_DESCS);
POPULATE_LIST('FORMAS_PAGO.CMBDESCRIPCION',G_DESCS);
END IF;
END;
Saludos.
Mauricio. -
Help with Retrieve attributes from database
Hi,
I'm using filter "Retrieve from or write to database" with select query from database by selecting attributes as column names radio button.
I'm unable to get these user attributes with column names.
For eg : select tag from test_tag where rownum=1;
I was trying so that result can be used using tag attribute (${tag}).
Please help in this regard.
Thanks,
VaniHi Vani,
After the retrieve filter, add a Trace Filter and leave it as it is. Execute the policy once and in the trace data that now will be displayed there you should be able to read out the exact name and type of the parameter. This way of identifying data/parameters etc is a recommended way of working while developing! Copy paste the Trace Data from the Trace filter here if you need help!
Cheers,
Stefan -
Query from a non database item
Hi everybody,
Can anybody please tell me how can i make any query from a non data base item .
Will you please let me know where to set the trigger or something else which will solve the problem.
Thanks and Regards
Anutosh BhattacharyaHi,
For the block you want to query on use PRE-QUERY trigger.
In the PRE-QUERY trigger use the
SET_BLOCK_PROPERTY ('BLOCK', DEFAULT_WHERE, 'your query condition');
Hope this helps.
Regards
Arif -
Call BEX-Query from VBA with BEX-automatic login?
Hi,
I'm trying to call a query from VBA. I have two problems/questions:
1. Automatic login?
I want to do an automatic login. I found this peace of code here, but I get an error:
Public Function LogonToYourBW()
' create Logon & RFC-Handle
logonToBW = False clear connect Flag the flag can be used to find out if connected or not
'load SAP functionality by opening BEX file ( use your installation path)
Workbooks.Open (c:\sappc\bw\sapbex.xla)
With Run("sapbex.xla!sapbexGetConnection") call the connection
' Set the params for Auto logon
.client = YOUR CLIENT NO
.user = YOUR BW USER
.Password = YOUR BW PWD I recommend to create a dummy reporting user for this task
.Language = YOUR LANGUAGE YOU LIKE TO USE FOR QUERY DISPLAY ( i.E. EN)
.SystemNumber = YOUR SYSTEM NO
.ApplicationServer = YOUR SERVER Name OR IP-ADDRESS
.UseSAPLOgonIni = FALSE 'important for automatic connection
.logon 0, True This will provide a dialog to appear
If .IsConnected <> 1 Then
.logon 0, False
If .IsConnected <> 1 Then Exit Function
Else
Set g_oFunction = CreateObject("SAP.Functions")
Set g_oFunction.Connection = g_oConnection
End If
End With
Run "sapbex.xla!sapbexinitConnection" this will enable the connection you just created
logonToBW = True
End Function
The error is by this row:
Set g_oFunction.Connection = g_oConnection
Object is needed! How is the g_oConnection-object defined?
2. How can I pass values for the parameters from VBA?
If I open the query usually from SAP-BEX-Toolbar, after selecting the query, I get a parameter mask, where I must put in a value. How can I this automatize from VBA? Has anybody a short samplecode for that?
Thank you for your help
Stefan
[email protected]Peter and others:
What I really want to do is write a stand-alone application that I can run from windows scheduler that queries our BW for sales data for certain items (in a tabular form) and pulls that data into a VB recordset, or a .NET dataset so that I can insert the rows into another database (SQL Server, or Access) I already know how to do all the data movement to/from datasets and databases I just cannot figure out how to programmatically grab this sales data from BW our company has workbooks already set up that aggregate WW sales information by region (IE, there is a separate workbook for each region of the world) I can manually go into the Excel interface, tell it which items to pull the sales info for, and it dumps the data into the worksheet (organized by customer, and then by cat #)
So, what Id like to do is write an app that will pull data every week or so from the BW (from each regions sales invoice detail workbook), and insert it into another database that we use for reporting other, non-sales, data.
Thoughts on this ? Is there another, non-BEx method that is better ?
thanks !!
Maybe you are looking for
-
Schedule jobs witj job open, submit and close
Hi gurus, I need to know if there is any way to schedule various jobs using the FM job_open job_submit and job_close. Like schedule the first job for a date and a hour and schedule others jobs to run after the first job sequential. Its this possible?
-
K7N2 delta with Athlon3200_ xp
Can my K7N2 delta mainboard take the Atlhon 3200+ xp to problem? Or should I go for the Atlhon 3000+ xp instead? I got 2 256 mb of memory installed would puting 2 512 in its places make any diffenrence? And if yes with is the best memory for my syste
-
Display Month when RKF =0
Hi everybody I'm building a Quality Notifications (QN) Report for the last 12 months that will be run for one Vendor at the time. I have a Restricted Key Figure [RKF](using an Item Counter RKF pre-built by our company) that is counting how many QN's
-
Why can I not get the NHL Game Center Premium to see live national games?
I am a Verizon Wireless customer with an iPhone 6, have the NHL app, and the NHL GameCenter Live subscription. However, it will not show live nationally televised games due to blackout. Verizon and the NHL both advertise that 4G Wireless devices ma
-
Connecting two WRE54G to on WTR54G
Hi! One customer asked me if I could make wireless network to building across the road on the same internet. My case is as follow: WRT54G Router i placed in building 1 in the basement with thick walls, roof in wood. Network supposed to be wireless ex