Deleting a row from the item table
Hi All,
I have a requirement where I need to put a button to delete the selected row from the item table and for this I have written the following code:
DATA lo_nd_t_bseg TYPE REF TO if_wd_context_node.
DATA lo_el_t_bseg TYPE REF TO if_wd_context_element.
DATA ls_t_bseg TYPE wd_this->element_t_bseg.
data: it_tab type table of wd_this->element_t_bseg.
lo_nd_t_bseg = wd_context->path_get_node( path = `Z.T_BSEG` ).
lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
lo_el_t_bseg->get_static_attributes(
IMPORTING
static_attributes = ls_t_bseg ).
lo_nd_t_bseg = wd_context->path_get_node( path = `Z.T_BSEG` ).
lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
IF lo_el_t_bseg IS not INITIAL.
lo_nd_t_bseg->remove_element( lo_el_t_bseg ).
ENDIF.
Now the problem is although it's deleteing the selected line correctly but because of this I am losing one line on the screen for the user to enter... my form has a fixed number of lines and in my case it's 10... so everytime I am using deleting a line item I am losing one line to enter..... can you please tell me how can I avoid this?
Edited by: rajatg on Aug 4, 2011 3:12 PM
lets say...
i have 1,2,3 documents
i have cleared , document 2....
1. when the user selects this record.... you can read the context_element....using the context element you can get the values and clear those values and set the blank values...
when the user click on save ...you can have only those two records in the table.
2. conitnue with your logic .... remove_element. once it is done ,,, create_element at the deleted index...
3. when clicked on delete ...remove_element ( current code).... bind the table to the node... and you will have ur values
Similar Messages
-
How to soft delete a row from the target table?
Could someone help me on this requirement?
How to implement the below logic using only ODI? I am able to implement the below logic with the "DELETE_FLAG" as "N".
I want to make the latest record with the flag as "N" and all the previous other records with the flag as "D".
Thanks a lot in advance.
I have a source table "EMP".
EMP
EMPID FIRST_NAME
1 A
2 B
First name is changed from A to C and then, C to D etc. For each data change, I would add a target row and mark the latest row as "N" and the rest as "D". The target table would contain the following data:
Target_EMP
EMPID FIRST_NAME DELETE_FLAG
1 A D
1 C D
1 D NThe problem is that I can't delete the row cause it demands from me to fill the mandatory field previously. It takes place when the key field is ROWID. In other cases delete is succesful.
-
I HAVE A SOURCE TABLE WITH 10 RECORDS AND TARGET TABLE 15 RECORDS. MY QUESTION IS USING WITH THE TABLE COMPARISON TRANSFORM .I WANT TO DELETE UNMATCHED RECORDS FROM THE TARGET TABLE ?? HOW IT IS ??
Hi Kishore,
First identify deleted records by selecting "Detect deleted rows from comparison table" feature in Table Comparison
Then Use Map Operation with Input row type as "delete" and output row type as "delete" to delete records from target table. -
Delete all entries from the following tables - Follow-up Activities (oracle)
Hello,
I performed a homogeneous system copy of our development BW system with the database (oracle 11.2.0.3) from the BW production system!
I already start the oracle database and the SAP system in the target system/server (development BW system) and I´m doing some follow-up activities. One of this activities is (at the system copy guide 6.2.3.2 Activities at Database Level) is to delete all entries from the following tables:
DBSTATHORA, DBSTAIHORA, DBSTATIORA, DBSTATTORA
I tried to delete them using SQL Plus:
sqlplus /nolog
SQL> connect /as sysdba
SQL> delete from DBSTATTORA;
delete from DBSTATTORA
ERROR at line 1:
ORA-00942: table or view does not exist
... and it show me that error message.
This is strange because when I go to transaction SE14 and check the DBSTATTORA I see that table exist and contain a lot of entries!
Why this is happened in SQL Plus!? I´m running the correct SQL statement for doing this type of task or not?
How can I delete the entries of that tables? Can I do that using the transaction SE14?
Can you help me please?
Thank you,
samid raifHello
sqlplus /nolog
SQL> connect /as sysdba
SQL> delete from DBSTATTORA;
delete from DBSTATTORA
ERROR at line 1:
ORA-00942: table or view does not exist
It doesn't surprise me as you are not mentioning the schema name here. Instead it should be
delete from SAPSR3.DBSTATTORA;
Assuming the schema owner is SAPSR3. if the owner is different then replace that with the correct one.
Regards
RB -
SUM two fileds from different rows from the same table
I would like to SUM two fileds from different rows from the same table but I don't know how to do that.
E.g.
BillingTransactionsIndex CreateDate UserType UserIndex TransType Reference Total Balance
2 6/5/2008 15:02 1 51 1 150 -288.2 -288.2
5 6/8/2008 11:55 1 51 1 157 -1.58674 -289.787
In the table above I want SUM fields Total and Balance for the first row and the the next row SUM 2nd row Total with 1st row Balance
Please help
ThanksSQL> with tbl as
2 (select 1 as ID, 90 as total from dual
3 union all
4 select 2 as ID, 23 as total from dual
5 union all
6 select 3 as ID, 15 as total from dual
7 union all
8 select 4 as ID, 20 as total from dual)
9 select id , total, sum(total) over (order by ID) as balance from tbl
10 /
ID TOTAL BALANCE
1 90 90
2 23 113
3 15 128
4 20 148
SQL> -
Delete duplicate entriess from the internal table its urgent pls help.
Hi friends,
Hope everybody is doing good,Here is m query on delete duplicate data from the intenal table.
I have an internal table which contain data in the following format.
Doc No Comp Cod Vendor Assignment
1500000009 JM11 00000000
1500000008 JM11 20070212(Repeating)
1500000007 JM11 20070212
1500000006 JM11 00000000
1500000005 JM11 00000000
1500000004 JM11 00000000(Repeating)
1500000003 JM11 00000000 (Repeating)
1500000002 JM11 00000000
1500000001 JM11 20050302
1500000000 JM11 00000000
1500000003 JM11 10000088
1500000001 JM11 10000088
1500000030 JM11 10006260
1500000010 JM11 10006269
1500000008 JM11 10006269
1500000006 JM11 10006269
1500000004 JM11 10006269
if you see the document numbers,there are some document number which are repeating here,there are some document numer which contain vendor number but not the assignments,some of the document numbers contain the assignments but not the vendors.
If my internal table contain this kind of data with repeted document numbers than i want the document number which contains only the vendor number.
Pls help me with the appropriate logic,its urgent.
Thanks a lot
mrutyun^Hi,
<u><b>Deleting Adjacent Duplicate Entries</b></u>
To delete adjacent duplicate entries use the following statement:
DELETE ADJACENT DUPLICATE ENTRIES FROM <itab>
[COMPARING <f1> <f2> ...
|ALL FIELDS].
The system deletes all adjacent duplicate entries from the internal table <itab>. Entries are
duplicate if they fulfill one of the following compare criteria:
Without the COMPARING addition, the contents of the key fields of the table must be
identical in both lines.
If you use the addition COMPARING <f1> <f2> ... the contents of the specified fields <f1>
<f2> ... must be identical in both lines. You can also specify a field <fi> dynamically as
the contents of a field <ni> in the form (<ni>). If <ni> is empty when the statement is
executed, it is ignored. You can restrict the search to partial fields by
specifying offset and length.
If you use the addition COMPARING ALL FIELDS the contents of all fields of both lines
must be identical.
You can use this statement to delete all duplicate entries from an internal table if the table is
sorted by the specified compare criterion.
If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4.
Examples
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1.
DO 4 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
INSERT LINE INTO TABLE ITAB.
ENDDO.
LINE-COL1 = 1.
DELETE TABLE ITAB: FROM LINE,
WITH TABLE KEY COL1 = 3.
LOOP AT ITAB INTO LINE.
WRITE: / LINE-COL1, LINE-COL2.
ENDLOOP.
The output is:
2 4
4 16
The program fills a hashed table with a list of square numbers. The DELETE
statement delete the lines from the table where the key field COL1 has the contents 1 or 3.
Regards,
Bhaskar -
How to delete the row from the ADF table using popup box
Hi,
I have one requirement like need to delete a record from the table, but that time need to show one popup window for confirmation of the deletion. I am using Delete buttom from the vo operations. I am able to delete the row with out popup but when i used the popup that time deletion is not happening.
Can any one help me in this.
Regards,Issue was resolved.
-
Deleting a row from a UIData table
I am trying to select a row from a jsf table then call a backing bean method to delete it using this backing bean method.
void deleterow(){
dataitem =(item) dataTable.getrowdata();
List newlist = new ArrayList();
table = model.getwrappeddata();
for (int i=0; i<table.size(); i++){
product = (product)table.get(i);
if (!product.name.equals(dataitem.name)){
newlist.add(product);
model.setwrappeddata(newlist);
}all the getter/setter methods are set and it does seem to work.However the results are very inconsistent,sometimes rows are deleted and then magically reappear on the the table latter! Anyone knows of a fail proof method of achieving this?
Ta.A decent IDE ships with a code debugger which allows you tracking variables and running code step by step. If you don't use an IDE or you're unable to use it, then just add some sysouts which prints the desired variables at strategic locations and/or moments.
-
Error while deleting a row from the Entity Object
Hi OAF Guys,
i am unable to delete the newly created row from the entity object.
let me explain my scenario.
1. i have a table of which some of the columns are mandatory.
2. I am writing the code in the validateEntity to check wether the user really enter anything into the fields.
3. My problem is, when the user creates row and wanted to delete the row without entering any details, the validate entity of the EO gets fired which will not allows to delete the row.
Is there any workaround for this problem.
Regards,
Nagesh Manda.Hi Tapash,
I am very sorry for not providing you the complete details of my scenario. Here i am explaining
1. what code you have placed while creating the row and in validation method on EOImpl.
while creating a new row i am initializing the primary key of the EO with the sequence value.
2.When you say, you are unable to delete the row, are you getting a error message ? if yes, custom message or fwk error ?
its not the fwk error, its the custom message which wrote in my validateEntity method of EO to check whether the user had entered all the necesary columns or not.
3.How are you trying to delete the row ?
while the user clicks on the delete switcher i am getting the primary key of the row and searching for the row in the vo and finally deleting it.
The problem arises when the user creates a row, and later doesnt want to enter the details and delete it. Here while deleting the row the validateEntity method of the EO gets fired and doesnt allow me to do so :(.
Any way appreciate your help tapash.
Regards,
Nagesh Manda. -
Deleting multiple rows from SUD dialog table
Hi,
I have some SUD dialog tables that I would like to delete some rows from. I can select and delete all or one row (using a SUD button that finds out which one row was selected or if all, and then deleting them with the table.rows.remove command), but I seem to have troubles if I want to select multiple rows (either in a range, ex: rows 3-10, or non-sequential, ex: 1, 4, 6 and 23). I just started working on this but thought maybe someone has already done this and can save me the trouble!
Thanks!
Julia MoellerHi Julia,
Just a quick guess-- try looping backwards and deleting the last rows first:
FOR i = 10 TO 3 Step -1
table.rows.remove i
NEXT
Haven't tested it, so no guarantees,
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
Randomly selecting some rows from the database table
Hi can some one help me in selecting some rows from a database table which has around 90,000 rows.
Thanks.One thing you might try is the "sample" clause if you have 8i which is supposed to return a random percentage of the table. Say for example, you have a sequence number on your table as the pkey. Then you might try:
select * from <table_name> where pkey in(select pkey from <table_name> sample(10));
This should give you a random 10 percent of the rows in the table but I tried this once and the results seemed unpredictable. For example it returned a different number of rows each time even though the number of rows in the table didn't change.
Hope this works for you. -
Can I restore the deleted statistical data from the database tables?
Hi all,
I have deleted the statistical data from the database tables like(Ex: RSDDSTAT, RSDDSTATWHM,..) by mistake through RSA1> Tools> BW Statistics for Infoproviders--> Delete.
Is there any way to restore the deleted data back? Thanks in advance.Now I'm really confused-
Your first post said
"<b>I have deleted the statistical data from the database tables like(Ex: RSDDSTAT, RSDDSTATWHM</b>,..) by mistake through RSA1> Tools> BW Statistics for Infoproviders--> Delete."
but your last respsonse said
"I have deleted the BW Statistics data, <b>not the actual data in RSDDSTAT tables</b> through
RSA1 -> Tools -> BW Statistics for InfoProviders -> clicked 'Delete' bin to delete data."
If you used the RSA1 -> Tools -> BW Statistics for InfoProviders -> clicked 'Delete' - <b>then you deleted the data from the RSDDSTAT tables</b>. This assumes you accepted the default date range that would have popped up after the clicking on the Delete button which specified to delete thru the current date. If this is what you did, the data is gone. Your only hope is be to recover from a DB backup.
The data in the RSDDSTAT tables is what is used to feed the BW Statistics cubes, generally on a daily basis. -
How can i select the rows from the 3 tables by particular column name?
Vehicle Passing Summary table structure
PsngSmry_ID(Number),Vehicle_iD(Number),PsngSmryTime(datetime)
Vehicle table structure
Vehicle_iD(Number),VehicleName(VarChar2),VehicleType(VarChar2)
Here Vehicle_iD is the Primary Key
Equipment Table Structure
Eqpmt_id(Number),Vehicle_iD(Number),EqpmtName(VarChar2),EqpmtType(VarChar2)
Here Eqpmt_id is the Primary Key and Vehicle_iD is the foreign Key
Equipment Component Table Structure
Eqpmt_Cmpnt_id(Number) ,Eqpmt_id(Number),EqpmtCmpntName(VarChar2),EqpmtCmpntName(VarChar2),Parent_Eqpmnt_ID(Number)
Here Eqpmt_Cmpnt_id is the Primary Key and Eqpmt_id is the foreign Key
The rows in the Vehicle Passing Summary table
PsngSmry_ID Vehicle_ID PsngSmryTime
111111 80986246 2010/10/11
111112 80986247 2010/10/12
111113 80986248 2010/10/10
The rows in the Vehicle Table
Vehicle_iD VehicleName VehicleType
80986246 Lorry Four Wheeler
80986247 Van Four Wheeler
80986248 Bus Four Wheeler
The rows in the Equipment Table:
Eqpmt_id Vehicle_iD EqpmtName EqpmtType
109846 80986246 2 Axle Lorry CAR
109821 80986246 4 Axle Lorry CAR
109825 80986246 4 Axle Lorry CAR
109562 80986247 2 Axle VAn CAR
109555 80986247 3 Axle VAn CAR
109777 80986247 3 Axle VAn CAR
109587 80986248 2 Axle Bus CAR
The rows in the Equipment Component Table :
Eqpmt_Cmpnt_id Eqpmt_id EqpmtCmpntName Parent_Eqpmnt_ID
20904146 109846 Truck
20904147 109846 Truck
20904148 109846 Axle 20904146
20904159 109846 Axle 20904146
20904167 109846 Wheel 20904148
20904177 109846 Wheel 20904148
20904185 109846 Wheel 20904159
20904325 109846 Wheel 20904159
20904188 109846 Axle 20904147
20904189 109846 Axle 20904147
20904195 109846 Wheel 20904188
20904196 109846 Wheel 20904188
20904197 109846 Wheel 20904189
20904398 109846 Wheel 20904189
10904146 109562 Truck
10904147 109562 Truck
10904148 109562 Axle 10904146
10904159 109562 Axle 10904146
10904167 109562 Wheel 10904148
10904177 109562 Wheel 10904148
10904185 109562 Wheel 10904159
10904325 109562 Wheel 10904159
10904188 109562 Axle 10904147
10904189 109562 Axle 10904147
10904195 109562 Wheel 10904188
10904196 109562 Wheel 10904188
10904197 109562 Wheel 10904189
10904398 109562 Wheel 10904189
Note : In Equipment Component Table,the hierarchy will be Truck-->Axle-->Wheel.So
1.the Parent_Eqpmnt_ID of Axle is Truck's Eqpmt_Cmpnt_id.
2.the Parent_Eqpmnt_ID of Wheel is Axle's Eqpmt_Cmpnt_id.
Now I want to write the store procedure which will take "PsngSmry_ID(Number)" as input and the o/p will be in the format :
Eqpmt_Cmpnt_id Eqpmt_id EqpmtCmpntName Parent_Eqpmnt_ID
20904146 109846 Truck
20904148 109846 Axle 20904146
20904167 109846 Wheel 20904148
20904177 109846 Wheel 20904148
20904159 109846 Axle 20904146
20904185 109846 Wheel 20904159
20904325 109846 Wheel 20904159
20904147 109846 Truck
20904188 109846 Axle 20904147
20904195 109846 Wheel 20904188
20904196 109846 Wheel 20904188
20904189 109846 Axle 20904147
20904197 109846 Wheel 20904189
20904398 109846 Wheel 20904189
10904146 109562 Truck
10904148 109562 Axle 10904146
10904167 109562 Wheel 10904148
10904177 109562 Wheel 10904148
10904159 109562 Axle 10904146
10904185 109562 Wheel 10904159
10904325 109562 Wheel 10904159
10904147 109562 Truck
10904188 109562 Axle 10904147
10904195 109562 Wheel 10904188
10904196 109562 Wheel 10904188
10904189 109562 Axle 10904147
10904197 109562 Wheel 10904189
10904398 109562 Wheel 10904189
**Please add these columns in the o/p **
1.EqpmtName and EqpmtType from Eqpmt table
2.VehicleName and Vehicle Type from Vehicle table
3.PsngSmryTime from PassingSummary table **
Can anyone tell me the solution?
Edited by: 865216 on Jun 22, 2011 2:14 AMHi,
I am new to this technology;But, just wanted to help you.
Please refer the code it might be atleast helpful for you.
But am facing PL/SQL: ORA-00933: error and unable to resolve it.could anyone please correct this code.
sorry if my code is totally wrong.
Thank you,
Rupa
create or replace procedure Equipment_proc
is
begin
DECLARE
TYPE EQP_record IS RECORD (
Vehicle_iD Vehicle.Vehicle_iD%TYPE,
Eqpmt_Cmpnt_id Equipment_Component.Eqpmt_Cmpnt_id%type,
EqpmtCmpntName Equipment_Component.EqpmtCmpntName%type,
Parent_Eqpmnt_ID Equipment_Component.Parent_Eqpmnt_ID%type,
Eqpmt_id Equipment.Eqpmt_id%type,
vehicleId NUMBER);
EQP_rec EQP_record;
CURSOR EQP_cursor IS
select a.Vehicle_iD,c.Eqpmt_Cmpnt_id,b.Eqpmt_id,c.EqpmtCmpntName,c.Parent_Eqpmnt_ID
from Vehicle a,Equipment b,Equipment_Component c
where a.Vehicle_iD=b.Vehicle_iD
and b.Eqpmt_id=c.Eqpmt_id
and a.vehicle_id=&EQP_rec.vehicleId;
BEGIN
OPEN EQP_cursor;
FETCH EQP_cursor INTO EQP_rec;
dbms_output.put_line(EQP_rec.Vehicle_iD,EQP_rec.Eqpmt_Cmpnt_id||','||EQP_rec.Eqpmt_id||','||EQP_rec.EqpmtCmpntName||','||EQP_rec.Parent_Eqpmnt_ID);
CLOSE EQP_cursor;
END;
END; -
Problem Deleting a row from the bottom level of a tree binding
We have the following requirement: To allow user to delete an item on an order (which is the lowest level node in tree) by updating the quantity textbox to zero in a jsp page.
We display a listing of Ad Items for a Department with quantity textboxes. The user enters quantities and clicks on âadd to my orderâ button. The items in which they have entered quantities for are persisted to a database table. The user is then directed to an order summary screen (shown below) where it displays the items and quantities for which they have placed an order for. The quantities are updateable. If the user changes a quantity to zero, we want to remove that item from the Order Items View Object (all VOs described are Entity based).
Update Screen - click here (http://members.awiweb.com/images/adspl_summary.jpg)
We are using a 3-level tree binding
-- Department Level
---- Ad Items Level (items that they can order)
------ Order Items Level (items that they have ordered)
Attributes on the Order Items View Object:
ConfoOrderDeptId (key attribute)
Itemcode (key attribute)
DeliveryDate (key attribute)
Quantity
Customercode
Custom method in the app module:
//Gets the VO for the Order Items Level
ConfoOrderItemEOVOImpl confoOrderItem = (ConfoOrderItemEOVOImpl)getConfoOrderItemEOVO1();
//Creates an Object from the values being passed into the custom method.
//There is a value for each key attribute in the Order Items VO
Object [] myKeyObj = new Object[]{confoOrderDeptId,itemcode,date};
Key myKey = new Key(myKeyObj);
Row [] orderItemRow = confoOrderItem.findByKey(myKey,1);
//newQty is updated quantity
if ("0".equals(newQty))
orderItemRow[0].remove();
else
orderItemRow[0].setAttribute("Quantity",newQty);
The updates (setAttribute) is working fine. The deletes (.remove()) is throwing a null pointer exception (see stack trace below).
We also tried overloading the setQuantity method in the RowImple class and called this.remove() if the quantity being passed in was zero, but we got the same null pointer result.
04/08/27 16:57:29 java.lang.NullPointerException
04/08/27 16:57:29 at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.myUpdateValuesFromRows(JUCtrlHierNodeBinding.java:419)
04/08/27 16:57:29 at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.updateRowDeleted(JUCtrlHierNodeBinding.java:326)
04/08/27 16:57:29 at oracle.jbo.uicli.binding.JUIteratorBinding.rowDeleted(JUIteratorBinding.java:220)
04/08/27 16:57:29 at oracle.jbo.common.RowSetHelper.fireRowDeleted(RowSetHelper.java:222)
04/08/27 16:57:29 at oracle.jbo.server.ViewRowSetIteratorImpl.deliverRowDeletedEvent(ViewRowSetIteratorImpl.java:3026)
04/08/27 16:57:29 at oracle.jbo.server.ViewRowSetIteratorImpl.notifyRowDeleted(ViewRowSetIteratorImpl.java:2915)
04/08/27 16:57:29 at oracle.jbo.server.ViewRowSetImpl.notifyRowDeleted(ViewRowSetImpl.java)
04/08/27 16:57:29 at oracle.jbo.server.ViewObjectImpl.notifyRowDeleted(ViewObjectImpl.java:6565)
04/08/27 16:57:29 at oracle.jbo.server.ViewObjectImpl.notifyRowDeleted(ViewObjectImpl.java:6603)
04/08/27 16:57:29 at oracle.jbo.server.QueryCollection.removeRow(QueryCollection.java:2118)
04/08/27 16:57:29 at oracle.jbo.server.QueryCollection.afterRemove(QueryCollection.java:2083)
04/08/27 16:57:29 at oracle.jbo.server.ViewObjectImpl.sourceChanged(ViewObjectImpl.java:7770)
04/08/27 16:57:29 at oracle.jbo.server.EntityCache.sendEvent(EntityCache.java:616)
04/08/27 16:57:29 at oracle.jbo.server.EntityCache.deliverEntityEvent(EntityCache.java:642)
04/08/27 16:57:29 at oracle.jbo.server.EntityCache.notifyStateChange(EntityCache.java:763)
04/08/27 16:57:29 at oracle.jbo.server.EntityImpl.setState(EntityImpl.java:2875)
04/08/27 16:57:29 at oracle.jbo.server.EntityImpl.remove(EntityImpl.java:5548)
04/08/27 16:57:29 at oracle.jbo.server.ViewRowImpl.doRemove(ViewRowImpl.java:1773)
04/08/27 16:57:29 at oracle.jbo.server.ViewRowImpl.remove(ViewRowImpl.java:1813)
04/08/27 16:57:29 at com.awiweb.om.model.dataaccess.ConfoOrderItemEOVORowImpl.setQuantity(ConfoOrderItemEOVORowImpl.java:112)
04/08/27 16:57:29 at com.awiweb.om.model.services.ConfoOrderingAppModuleImpl.updateConfoOrderItemWithValues(ConfoOrderingAppModuleImpl.java:247)
04/08/27 16:57:29 at com.awiweb.om.view.CurrentOrderSummaryAction.onUpdateCurrentOrder(CurrentOrderSummaryAction.java:39)
04/08/27 16:57:29 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
04/08/27 16:57:29 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
04/08/27 16:57:29 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
04/08/27 16:57:29 at java.lang.reflect.Method.invoke(Method.java)
04/08/27 16:57:29 at oracle.adf.controller.lifecycle.PageLifecycle.handleEvent(PageLifecycle.java:512)
04/08/27 16:57:29 at oracle.adf.controller.struts.actions.StrutsPageLifecycle.handleEvent(StrutsPageLifecycle.java:211)
04/08/27 16:57:29 at oracle.adf.controller.lifecycle.PageLifecycle.processComponentEvents(PageLifecycle.java:447)
04/08/27 16:57:29 at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:246)
04/08/27 16:57:29 at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:440)
04/08/27 16:57:29 at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:114)
04/08/27 16:57:29 at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:233)
04/08/27 16:57:29 at com.awiweb.om.ext.AWIDataAction.handleLifecycle(AWIDataAction.java:191)
04/08/27 16:57:29 at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:163)
04/08/27 16:57:29 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
04/08/27 16:57:29 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
04/08/27 16:57:29 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
04/08/27 16:57:29 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
04/08/27 16:57:29 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
04/08/27 16:57:29 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
04/08/27 16:57:29 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
04/08/27 16:57:30 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
04/08/27 16:57:30 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
04/08/27 16:57:30 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
04/08/27 16:57:30 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
04/08/27 16:57:30 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
04/08/27 16:57:30 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
04/08/27 16:57:30 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
04/08/27 16:57:30 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
04/08/27 16:57:30 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
04/08/27 16:57:30 at java.lang.Thread.run(Thread.java:534)This looks like a bug in TreeBinding. Please file this as a bug/tar with OracleSupport with your reproducible testcase (or steps to reproduce). Thanks.
-
How do I select rows from the same table that have multiple occurances
Hi Everybody,
I am trying to select records from a detail table by grouping it. The table has more than 1 million records and the query is not performing well. The basic question is how to select a distinct record from a table which matches all values in one column and any in the other.
desc SCV
ID NUMBER PK (ID + SCRID)
SCRID NUMBER FK(SC)
ID SCRID
1 1
2 1
3 1
4 2
5 2
6 3
7 4
8 4
desc PROJECTS
ID NUMBER PK
NAME VARCHAR2(100)
ID NAME
1 PROJECT1
2 PROJECT2
3 PROJECT3
4 PROJECT4
desc PJS
ID NUMBER
PROID NUMBER FK (PROJECTS)
SCRID NUMBER FK (SCV(SCRID + SCVID)
SCVID NUMBER
ID PROID SCRID SCVID
1 1 1 1
2 1 1 2
3 1 2 5
4 1 3 6
5 1 4 7
6 2 1 3
7 2 2 4
8 2 2 5
9 2 4 7
There are over 1 million records in PJS.
desc TBP
SCRID NUMBER
SCVID NUMBER
SCRID SCVID
1 1
1 2
1 3
2 4
2 5
3 6
4 7
4 8
The requirement is to select projects that have matching SCRID, SCVID from TBP such that
all distinct SCRID should match and within that and any SCVID match will do. (A "AND" between each SCRID and an "OR" for each SCVID in that SCRID like 'SCRID = 1 AND (SCVID = 1 OR SCVID = 2 OR SCVID = 3) AND SCRID = 2 AND (SCVID =....)
So, for the sample data it should return us PROID = 1
I have few queries written for this:
SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 1
INTERSECT
SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 2
INTERSECT
SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 3
INTERSECT
SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 4
This query performs well but the cost is very high, hardcoding, sorting.
The 2nd option is to:
SELECT pjs.PROID proid
FROM TBP tbp,
PJS pjs
WHERE pjs.SCVID = tbp.SCVID
AND pjs.SCRID = tbp.SCRID
GROUP BY pjs.PROID
HAVING COUNT(DISTINCT pjs.SCRID) = (SELECT COUNT(DISTINCT SCRID ) FROM TBP)
This has a low cost but runs slowly.
One more way I tried was with the IN operator like
SELECT DISTINCT PROID FROM PJS A,TBP T WHERE T.SCRID = 1 AND T.SCVID = A.SCVID
AND PROID IN (SELECT PROID FROM PJS A,TBP T WHERE T.SCRID = 2 AND T.SCVID = A.SCVID
AND PROID IN (...SO ON with each DISTINCT SCRID.
Again this involves too much of sorting.
Any help will be appriciated.
Thanks in advance.Hi Andrew,
Use DELETE t_itab statement inside the loop.
I have modified your code. It is perfectly working.See bellow -
LOOP AT it_zmember01 INTO wa_zmember01.
WRITE: / wa_zmember01-mnumber UNDER 'NUMBER',
wa_zmember01-mname UNDER 'NAME',
wa_zmember01-mdob UNDER 'DOB'.
WRITE / '-----------------------------------------------------------------'.
DELETE it_zmember01. " Modified
ENDLOOP.
DELETE it_zmember01. statement inside the loop will delete the current row of the table.
Regards
Pinaki
Maybe you are looking for
-
Nmew32rg.dll - Unable to find EM location in the registry : RegQueryValue f
Hi All, I am getting below error while installing companions "10203_vista_w2k8_x86_production_companion.zip" (32-bit) (HTTP server) on Windows 2008 sp2 64-bit machine. .....CALL INTO REGISTRY..... DLL TO LOAD = \nmew32rg.dll DLL LOADED Unable to find
-
I cannot upload attachments to e-mails. When I click on browse in the attachment pop up nothing happens, I cant even type in a document address in the file location box == This happened == Every time Firefox opened == I downloaded the latest version
-
Obiee11g upgrade: Preventing authenticated-user from accessing obiee system
HI Gurus, We have a problem regarding security and request your inputs. Please see the issue below: Current Situation: We have successfully integrated OBIEE11g with our enterprise MS Active DIrectory. With the current set up, any user in the company
-
Products needed for XML Support
One simple question: If I want to store a XML document into a ORACLE database, which additional Products do I have to install beside the Oracle 8i server.
-
Oracle Connection Problems.
I am on Business Objects Crystal Decisions. Trying to run a Crystal XI R2 report through InfoView. It works on Crystal, when I try to run it on InfoView, I get the following error: loupap04.reportjobserver Error in File D:\Program Files\Business Obje