Hi reg fetch from View CAUFV
Hi Experts,
below query is taking a long time, what is the fix to tune this,
SELECT aufnr auart kdauf FROM caufv
INTO TABLE tl_caufv
WHERE kdauf EQ i_viqmel-vbeln.
Your problem is that the SELECT cannot use any index. I don't think you can fix this as it stands
But since KDAUF is the sales order number, you might try to approach it from the sales document flow perspective (VBFA).
Rob
Similar Messages
-
Not able to query data from View
Hi,
I am not able to fetch data from views even while running simple select statements. I am using SQL Developer Version 3.0.04,
Same query is fetching data on other computers running SQL Developer or Toad.
Has anyone faced this issue??Is that the first version ever you installed? You unzipped in a clean directory, right?
What OS/JDK/DB versions?
So do you get an error or what?
K. -
Hello,
I have a procedure, which specification is something like that:
procedure proc1 (pcursor OUT SYS_REFCURSOR, parg1 IN NUMBER, parg2 IN NUMBER, ...);Inside the body of proc1 I have
OPEN pcursor FOR
SELECT column1,
column2,
CURSOR (SELECT column1, column2
FROM table2
WHERE <some clauses come here>) icursor1
FROM table1
WHERE <some clauses come here>;In a PL/SQL block I would like to execute proc1 and then to fetch from pcursor. This is what I am doing so far:
DECLARE
ldata SYS_REFCURSOR;
larg1 NUMBER := 123;
larg2 NUMBER := 456;
outcolumn1 dbms_sql.Number_Table;
outcolumn2 dbms_sql.Number_Table;
BEGIN
some_package_name.proc1 (ldata, larg1, larg2, ...);
FETCH ldata BULK COLLECT INTO
outcolumn1, outcolumn2,..., *and here is my problem*;
END;
/How can I rewrite this in order to get the content of icursor1 ?
Thanks a lot!Verdi wrote:
How can I rewrite this in order to get the content of icursor1 ?
Firstly ref cursors contain no data they are not result sets but pointers to compiled SQL statements.
Re: OPEN cursor for large query
PL/SQL 101 : Understanding Ref Cursors
Ref cursors are not supposed to be used within PL/SQL or SQL for that matter, though people keep on insisting on doing this for some reason.
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/static.htm#CIHCJBJJ
Purpose of Cursor Variables
You use cursor variables to pass query result sets between PL/SQL stored subprograms and their clients. This is possible because PL/SQL and its clients share a pointer to the work area where the result set is stored.A ref cursor is supposed to be passed back to a procedural client language, such as Java or .Net.
If you want to re-use a SQL statement in multiple other PL/SQL or SQL statements you would use a view. -
Hi,
I have some doubt about standard view CAUFV.
FIELDS DTYPE LENGTH Short Description
* 0
MANDT CLNT 3 Client
AUFNR CHAR 12 Order Number
AUART CHAR 4 Order Type
AUTYP NUMC 2 Order category
REFNR CHAR 12 Reference order number
ERNAM CHAR 12 Entered by
- NUMC 2 Status reached so far
- CHAR 1 Phase "Order created"
- CHAR 1 Phase "Order released"
The view appears like above.
1. what does that '*' and '-' means in the viewfields???
2. Now, when i am trying to see the entries in our client system it is giving Dump. but in other server it is not giving dump. What can be the reason???
Dump Description: SQL error in the database when accessing a table.
Missing Handling of System Exception
Program /1BCDWB/DBCAUFV
Trigger Location of Exception
Program /1BCDWB/DBCAUFV
Include /1BCDWB/DBCAUFV
Row 548
Module Name START-OF-SELECTION
524 concatenate '/1BCDWB/DB' 'CAUFV' into g_dbdatakey-eu_name.
525 g_dbdatakey-username = c_all.
526 import sort_NAME_TAB to %_TAB2_sort
527 field_name_tab to %_TAB2_field
528 from database dbdata(DB) id g_dbdatakey.
529 if sy-subrc = 0.
530 delete from dbdata
531 where relid = 'DB' and
532 eu_name = g_dbdatakey-eu_name and
533 username = c_all.
534 describe table %_tab2_field lines %_l_lines.
535 if not %_l_lines is initial.
536 %_TAB2[] = %_tab2_field[].
537 endif.
538 endif.
539 ENDIF.
540 CASE ACTION.
541 WHEN 'ANZE'.
542 try.
543 SELECT * FROM CAUFV "client specified
544 APPENDING TABLE ICAUFV
545 UP TO RSEUMOD-TBMAXSEL ROWS BYPASSING BUFFER
546 WHERE AUFNR IN I1.
547
>>> CATCH CX_SY_DYNAMIC_OSQL_SEMANTICS INTO xref.
549 IF xref->kernel_errid = 'SAPSQL_ESCAPE_WITH_POOLTABLE'.
550 message i412(mo).
551 exit.
552 ELSE.
553 RAISE EXCEPTION xref.
Please help if any one has any pointer.
Thanks & Regards,
Abhishek SarkarHi
You can include a table in a view. In this case all the table fields become fields of the view. If fields are inserted in the included table or deleted from it, these fields are also inserted in or deleted from the view.
To include a table in the view, you must enter the character * for View field, the name of the table to be included for Table and again the character * for Field name.
You can also exclude certain fields from an included table. If you do not want to insert a field of the included table in the view, you must enter - for View field, the name of the included table for Table and the name of the table field for Field name.
with regards,
Vamsi -
How the data is fetched from the cube for reporting - with and without BIA
hi all,
I need to understand the below scenario:(as to how the data is fetched from the cube for reporting)
I have a query, on a multiprovider connected to cubes say A and B. A is on BIA index, B is not. There are no aggregates created on both the cubes.
CASE 1: I have taken RSRT stats with BIA on, in aggregation layer it says
Basic InfoProvider *****Table type ***** Viewed at ***** Records, Selected *****Records, Transported
Cube A ***** blank ***** 0.624305 ***** 8,087,502 ***** 2,011
Cube B ***** E ***** 42.002653 ***** 1,669,126 ***** 6
Cube B ***** F ***** 98.696442 ***** 2,426,006 ***** 6
CASE 2:I have taken the RSRT stats, disabling the BIA index, in aggregation layer it says:
Basic InfoProvider *****Table Type *****Viewed at *****Records, Selected *****Records, Transported
Cube B *****E *****46.620825 ****1,669,126**** 6
Cube B *****F ****106.148337**** 2,426,030***** 6
Cube A *****E *****61.939073 *****3,794,113 *****3,499
Cube A *****F ****90.721171**** 4,293,420 *****5,584
now my question is why is here a huge difference in the number of records transported for cube A when compared to case 1. The input criteria for both the cases are the same and the result output is matching. There is no change in the number of records selected for cube A in both cases.It is 8,087,502 in both cases.
Can someone pls clarify on this difference in records being selected.Hi,
yes, Vitaliy could be guess right. Please check if FEMS compression is enabled (note 1308274).
What you can do to get more details about the selection is to activate the execurtion plan SQL/BWA queries in data manager. You can also activate the trace functions for BWA in RSRT. So you need to know how both queries select its data.
Regards,
Jens -
How the data is fetched from the cube for reporting
hi all,
I need to understand the below scenario:(as to how the data is fetched from the cube for reporting)
I have a query, on a multiprovider connected to cubes say A and B. A is on BIA index, B is not. There are no aggregates created on both the cubes.
CASE 1: I have taken RSRT stats with BIA on, in aggregation layer it says
Basic InfoProvider *****Table type ***** Viewed at ***** Records, Selected *****Records, Transported
Cube A ***** blank ***** 0.624305 ***** 8,087,502 ***** 2,011
Cube B ***** E ***** 42.002653 ***** 1,669,126 ***** 6
Cube B ***** F ***** 98.696442 ***** 2,426,006 ***** 6
CASE 2:I have taken the RSRT stats, disabling the BIA index, in aggregation layer it says:
Basic InfoProvider *****Table Type *****Viewed at *****Records, Selected *****Records, Transported
Cube B *****E *****46.620825 ****1,669,126**** 6
Cube B *****F ****106.148337**** 2,426,030***** 6
Cube A *****E *****61.939073 *****3,794,113 *****3,499
Cube A *****F ****90.721171**** 4,293,420 *****5,584
now my question is why is here a huge difference in the number of records transported for cube A when compared to case 1. The input criteria for both the cases are the same and the result output is matching. There is no change in the number of records selected for cube A in both cases.It is 8,087,502 in both cases.
Can someone pls clarify on this difference in records being selected.Hi Jay,
Thanks for sharing your analysis.
The only reason I could think logically is BWA is having information in both E and F tables in one place and hence after selecting the records, it is able to aggregate and transport the reords to OLAP.
In the second case, since E and F tables are separate, aggregation might be happening at OLAP and hence you see more number of records.
Our Experts in BWA forum might be able to answer in a better way, if you post this question over there.
Thanks,
Krishnan -
Which method does the actual bulk fetch from database in ADF?
Hi,
I'm looking to instrument my ADF code to see where bottlenecks are. Does anyone know which method does the bulk fetch from the database so that I can override it?
Thanks
KevinHi,
I think you need to be more specific. ADF is a meta
data binding layer that delegates data queries to the
business service
FrankSorry - to be specific I probably mean BC4J - when a query runs in a view object. -
How to select data from view V_TCURR
Hi all,
how to fetch data from view V_TCURR.
I have to fetch 2 fieds: kursp and *tfact
(what does this * indicates in field name *tfact)The view is a maintenance view and it doesn't even have field tfact available.
Just select from the table directly
PARAMETERS: p_kursp for tcurr-kurst,
p_fcurr for tcurr-fcurr,
p_tcurr for tcurr-tcurr,
p_date for tcurr-gdate.
SELECT SINGLE
kursp
tfact
INTO ( lv_kursp, lv_tfact )
FROM tcurr
WHERE kurst eq p_kurst
AND fcurr eq p_fcurr
AND tcurr eq p_tcurr
AND gdatu le p_date.
Hope that helps,
Michael -
Getting data from view object into backing bean
Hi,
My requirement is explained below -
I have a ADF editable table in a jsf page which is connected to backend database table. In the table there are 6 columns and only 2 are editable. So when user inputs a value in first input column an event is triggered such that the data for all the remaining columns should be fetched from another database table.
Typically if we are not using ADF development environment. We would have had a simple business method which creates the sql query by taking the input from textbox with simple where clause and I would have got the data. I am not getting any idea how to do this in ADF. I have the second table as view object but how to access the view object from backing bean and get data based on the input given.Hi,
step 1) Expose a method on the ViewObject Impl class
step 2) define arguments for the method as needed to identify the row to read data from
step 3) retrieve the row from the VO that holds the data you want to add and return a HashMap with this information
step 4) expose the method on the client interface (Java menu selection on the View Object)
step 5) In the PageDef file, create a method binding to the method you exposed on the ViewObjectImpl
step 6) Call the method binding from the managed bean like
OperationBinding getDataFromVO = (OperationBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("Name of method binding);
getDataFromVO.getParamsMap().put("name of arguments1", value1);
getDataFromVO.getParamsMap().put("name of arguments2", value2);
Object retData = getDataFromVO.execute();
if(retData != null && getDataFromVO.getErrors().size()==0){
HashMap retDataMap = (HashMap) retData;
... follow the rest of your logic ....
Frank -
Can data be fetched from Oracle Database to ApEx websheets?
Hi,
Oracle 11g R2
ApEx 4.2.2
We are in need of giving an MRU form for the customized data by the users. The number of columns will be defined dynamically by the end user. We thought of using apex's standard tabular forms, but they cannot have dynamic columns. We also thought of having manual tabular forms using apex collections, but there is a limitation that the collection can have maximum of 50 character datatypes, 5 numeric, 5 date and 1 each for clob and blob. The number of columns at runtime may exceed these numbers. so we ruled out this. We then thought of using apex websheets. We know that the data can be fetched from Oracle database to websheet reports, but the reports cannot be edited. We know that the data grid gives option to edit the data, but I couldnt find a way to fetch the data from database to it. I understand that the data in the apex websheets can be queried from apex's meta tables apex$_ws_... views and somehow in a back door way of doing these can be updated to the business tables. But we also need to fetch the data from Oracle database to the grid. I do not want to insert into the apex$_ws tables as Oracle does not support it. Is there any other possibility?
Thanks in advance.
Regards,
NatarajanNattu wrote:
Thanks for your reply. Actually it is a data that is fully customized by the end user. These custom attributes are really stored as rows and a complex code returns them as columns at run time. So the number of columns is different user to user based on the number of rows they have.
They'd never have got that far if I'd been around...
They now want to edit them in a tabular form as well.
Well once you've implemented one really bad idea, one more isn't going to make much difference.
It rather sounds like you've got people who know nothing about relational databases or user interfaces responsible for the design of both. You need to be very, very, worried. -
Can not insert/update data from table which is created from view
Hi all
I'm using Oracle database 11g
I've created table from view as the following command:
Create table table_new as select * from View_Old
I can insert/update data into table_new by command line.
But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)
Anybody tell me, what's happend? cause?
Thankyou
thiensu
Edited by: user8248216 on May 5, 2011 8:54 PM
Edited by: user8248216 on May 5, 2011 8:55 PMI can insert/update data into table_new by command line.
But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)so what is wrong with the GUI tools & why posting to DATABASE forum when that works OK? -
How to navigate from view of slave DC to view of matser DC?
Hello!
I've got DC1 (master) and DC2 (slave) in different projects. Both projects are WD Java local DC projects. DC2 has one component (say A) with view, window, view interface, controller and controller interface and has no applications. This view should be called at start of application. Only DC1 has application. Public parts created properly so DC2 visible for DC1.
In main window of DC1 I embedded View Interface from DC2 and make it default. View Interface has outbound plug connected with inbound plug for View of DC1.
What I should to do to allow user navigate from View Interface of DC2 to view of DC1 by press button placed at view of DC2?
I'm working with NW7.0.
Regards, Lev.Hi
What I should to do to allow user navigate from View Interface of DC2 to view of DC1 by press button placed at view of DC2?
Hi
One solution will be already provided by jithin james .
Apart from that if u want to make something generic (For your case View interface of different Dc) follow this [Best practices |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0409d83-5ed5-2910-ef91-e41da6d5b8b4]
Best Regards
Satish Kumar -
How to get first row from View Object cache.
hi,
I am using Jdeveloper 11.1.1.6
can we get first row from View Object cache??
Thanks in Advance.
Best
ShashidharHi Frank,
Thanks for reply!!
My case is:
I have a Query based ViewObject.
One of the field is LOV and remaining fields are in ADF table. the LOV field is out side ADF table when i insert first record in ADF table and i choose LOV filed the value is selected.
when i create second row LOV value got refreshed because both are in same VO.
I need to get the LOV value of first row and set same value to second Row.
Shashidhar -
How to call a custom controller method from view
Hi,
I ve created a simple web service and consumed it in a model. Mapped the input & output parameters to custom controller context which in turn mapped to component controller's context which in turn to view's contexts.
How to call a custom controller method from view?
Please explain the syntax.
Regards,
Manoj.Hi Patralekha,
Give some idea for the below scenario:
I ve created a simple web service and consumed it in a model. What I did was
1) for the input parameters, mapped the node from view->custom controller->model
2)for the output parameter, mapping from model->custom controller->view.
It works fine.
But I don't want to access model nodes directly, rather I want to set the input param in somewhere else (like custom controller) before calling the appropriate method, same for the response also.
Share me your thoughts.
Regards,
Manoj. -
How to select a field from view
Hai All
This is my view name mtl_item_flexfields mif
i can able to select a single column Ie Inventory_item from view when i use this
Select inventory_item from mtl_item_flexfields mif.
But i not able get the values when i use this select statement
SELECT organization_code,
item_number,
mif.organization_id,
COUNT(*)
FROM mtl_item_flexfields mif,
mtl_parameters mp
WHERE mif.organization_id = mp.organization_id
AND mif.organization_id IN (87,85)
GROUP BY organization_code,
item_number,
mif.organization_id
HAVING COUNT(*) > 1
ORDER BY 1,2;
Thanks & Regards
SrikkanthHello Srikkanth,
The query you posted cannot return the inventory_item column because that column isn't part of you GROUP BY clause.
If you need to see the inventory_item column, you should either include it in your GROUP BY clause (but I doubt that's the right thing to do in this case) or, you need to apply an aggregation function to the inventory_item column, such as MAX or MIN (this may be appropriate in this case but, without seeing any data, can't really tell).
The GROUP BY limits the fields you can select to be either, included in the GROUP BY clause or, arguments of an aggregation function whose result is driven by the GROUP BY clause. In any other case, you'll get message complaining about the field not being part of a group by group.
HTH,
John.
P.S: put code (like the select you posted) and data enclosed in [ code ] <your code here> [ / code ]
(without the spaces), that will format the code nicely, like this
nicely formatted code herewhich makes it much easier to understand.
Edited by: 440bx - 11gR2 on Aug 13, 2010 5:44 AM - added "" suggestion
Maybe you are looking for
-
when I upgraded to ios 7.2.0 it would not sync my music playlist correctly. Advised my Apple to pay for suscription to Imatch/ Icloud it rearranged my play list so they are not even close to what they were Icloud made the decision on which ones it wo
-
Changing data in the table control during run time of transaction F-28
Dear Experts, in transaction F-28 of second screen of second column (Field Name: Assignment) currently the data is getting from BSEG table and populating this column of table control, now I have a requirement that the data should be get from the othe
-
We're looking for a compatible internal wireless minicard/module with GPS and preferably 4g for a series of Envy 17 3d 2090NRs. We also NEED to maintain WiFi, but on the Envy 17 3D I believe the Intel WIFI is integrated on the mobo... If not, we'll n
-
Creating Subfolders.... Need Help
Dear Everyone, I'm having trouble with my iWeb. I wanted to know if it's possible to create subfolders (I'm not sure if that's the right terminology here). Basically, I want to be able to Go to the Home page, click on one of the Pages (i.e. "Blog"),
-
ERMS: Issue with setting up charset
Hi Experts, We are using CRM 6.0 ERMS to send out emails to customers. Based on the Setting in transaction SCOT all the out going emails are sent with UTF-8 charset (Code Page: 4110). Today Japanu2019s internet mail standard is ISO-2022-JP, and most