How to delete the committed row from a table from its VOImpl class ??
I am new to ADF and I have problem to solve. To perform roll back I am using fetching key before roll back and setting it after undo operation, so that I can stay back in the currently selected row. But in my case I am using application model commit for one LOV attribute selection in the row. So when ever I am performing roll back operation after inserting a row, the values other than this committed LOV attribute gets roll backed, but I need remove the entire row from table. Does there any option to remove a row based on the attribute values of a row from VO's row implementation or from bean class in a performance optimized way ?
Thanks in advance..........
http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#removeRow(int)
Why did you mark it answered but gave no dukes to finalight? That's not how it works.
You should mark his answer as correct and give him at least one duke, for the effort!
Similar Messages
-
How to delete the duplicate rows from the table
Hi,
I have 2 tbales namely component, component_audit
For each record in component table there are multiple entries in component_audit table.
I need to keep the first record and delete the others from the component_audit table
say for example
select a.component_id,a.dt_ti_stamp,a.component_name,a.column_before,b.comments from component_audit a,component b where a.component_id=b.component_id
( on the above result set only I shold apply the actual delete query )
PLease help me in this regards.
Thanks.delete from component_audit a where dt_ti_stamp not in (select
min(b.dt_ti_stamp)
from
component_audit b
where
a.component_id = b.component_id) -
How to delete the duplicate data from PSA Table
Dear All,
How to delete the duplicate data from PSA Table, I have the purchase cube and I am getting the data from Item data source.
In PSA table, I found the some cancellation records for that particular records quantity would be negative for the same record value would be positive.
Due to this reason the quantity is updated to target but the values would summarized and got the summarized value of all normal and cancellation .
Please let me know the solution how to delete the data while updating to the target.
Thanks
Regards,
SaiHi,
in deleting the records in PSA table difficult and how many you will the delete.
you can achieve the different ways.
1. creating the DSO maintain the some key fields it will overwrite the based on key fields.
2. you can write the ABAP logic deleting the duplicate records at info package level check with the your ABAPer.
3.you can restrict the cancellation records at query level.
Thanks,
Phani. -
How to delete the selected rows in a JTable on pressing a button?
How to delete the selected rows in a JTable on pressing a button?
You are right. I did the same.
Following is the code where some of them might find it useful in future.
jTable1.selectAll();
int[] array = jTable1.getSelectedRows();
for(int i=array.length-1;i>=0;i--)
DefaultTableModel model = (DefaultTableModel)jTable1.getModel();
model.removeRow(i);
} -
How to delete the Hierarchy data from Infoobjects.
How to delete the Hierarchy data from Infoobjects. In my case I had 300 records in the corresponding table of info object.
When i was trying to delete the hierarchy data, I am getting error message. "Some master data not deleted". Can any one tell me to delete all these records by using a program.Hi
Go to SE11 and enter the hierarchy table name.
/BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
Thanks
TG -
How to delete the unwanted songs from my account?
how to delete the unwanted songs from my account?
You can't permanently delete any purchase from your account, all you can do is hide them from the cloud via your computer's iTunes: iTunes Store: Hiding and unhiding purchases - Apple Support
Unless you are referring to the U2 Songs Of Innocence album that was given free to everyone last year : http://itunes.com/soi-remove -
How to delete the movie "Hugo" from my itouch5 after downloading it from the free app "12 days" from apple?
I do not know what you mean left or right, but if I press the edit button it still will not give the option to delete.
-
How to delete a particular row in ALV table
Hi,
How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
Thanks
Bala DuvvuriHello Bala,
Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
data : lr_table_settings TYPE REF TO if_salv_wd_table_settings,
lr_config TYPE REF TO cl_salv_wd_config_table.
lr_table_settings ?= lr_config.
** Setting the ALV selection to multiple selection with no lead selection
lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
Next delete the selected rows in the action triggered by the button:
METHOD onactiondelete_rows .
DATA: wd_node TYPE REF TO if_wd_context_node,
lt_node1 TYPE ig_componentcontroller=>elements_node,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set,
row_number TYPE i VALUE 0.
wd_node = wd_context->get_child_node( name = 'NODE' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
wd_node->remove_element( EXPORTING element = wa_temp ).
ENDLOOP.
CALL METHOD wd_node->get_static_attributes_table
EXPORTING
from = 1
to = 2147483647
IMPORTING
table = lt_node1.
wd_node->bind_table( new_items = lt_node1 ).
ENDMETHOD.
If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
Regards,
Uday -
How to delete the selected rows with a condition in alv
dear all,
i am using the code in object oriented alv.
WHEN 'DEL'.
PERFORM delete_rows.
FORM delete_rows.
DATA : lv_rows LIKE lvc_s_row.
data : wa_ROWs like LVC_S_ROW.
FREE : gt_rows.
CALL METHOD alv_grid->get_selected_rows
IMPORTING
et_index_rows = gt_rows.
IF gt_rows[] IS INITIAL.
MESSAGE s000 WITH text-046.
EXIT.
ENDIF.
loop at gt_rows into wa_ROWs .
if sy-tabix ne 1.
wa_ROWs-INDEX = wa_ROWs-INDEX - ( sy-tabix - 1 ).
endif.
delete gt_sim INDEX wa_ROWs-INDEX .
endloop.
the rows to be deleted from int.tab gt_sim not in the alv display.
all the rows should not be deleted if one of the field in gt_sim eq 'R'.
how to check this conditiondear jayanthi,
ok if i am coding like that as u mentioned ,
it will exit the loop when first time the field value is 'R'.
if any of the selected rows contains field value 'R'. it shold not delete all the selected rows.
as u suggested it will not delete after first time the field value is r.
i am deleting it by tab index so,
suppose if i am selecting the row without field value R say its tabix is 1.
the next row with tabix 2 with field value R.
it deletes the first row and exits , it should not delete the first row also. -
How to delete the Generated files from application server(open hub)?
hi experts,
when i try to execute process chain the DTP it is giving below dump. Exception CX_RSBK_REQUEST_LOCKED logged.
when i execute the DTP manually and trying to delete the previous request, it is giving for dump ITAB_DUPLICATE_KEY.
so to delete the generated file from application server, how to delete it for specific dates?
Information on where terminated
Termination occurred in the ABAP program "GPD6S3OE0BCVGC6L9DBNVYQARZM" - in
"START_ROUTINE".
The main program was "RSBATCH_EXECUTE_PROZESS ".
In the source code you have the termination point in line 2874
of the (Include) program "GPD6S3OE0BCVGC6L9DBNVYQARZM".
The program "GPD6S3OE0BCVGC6L9DBNVYQARZM" was started as a background job.
and when i check the dump it is point out at below code
" Populate the lookup table for 0STOR_LOC
SELECT * from /BI0/TSTOR_LOC
into CORRESPONDING FIELDS OF table L_0STOR_LOC_TEXT
FOR ALL ENTRIES IN SOURCE_PACKAGE WHERE
STOR_LOC = SOURCE_PACKAGE-STOR_LOC.
but the programme is syntactically correct only.
how to rectify the issue.
regards
venuscm
Edited by: venugopal vadlamudi on Sep 28, 2010 1:59 PMhi experts,
We have written start routine to get the storage location text and sending to File located at Application server through OPEN HUB.
here is the code written in the Transformations
In the global section
Text for 0STOR_LOC
DATA: l_0stor_loc_text TYPE HASHED TABLE OF /bi0/tstor_loc
WITH UNIQUE KEY stor_loc.
DATA: l_0stor_loc_text_wa TYPE /bi0/tstor_loc.
and in the code to get the text
" Populate the lookup table for 0STOR_LOC
*SELECT * from /BI0/TSTOR_LOC*
into CORRESPONDING FIELDS OF table L_0STOR_LOC_TEXT
FOR ALL ENTRIES IN SOURCE_PACKAGE WHERE
STOR_LOC = SOURCE_PACKAGE-STOR_LOC.
im sure there is problem with the Routine only. i think i need to change the code if so please provide me the modified one.
thanks
venuscm
Edited by: venugopal vadlamudi on Sep 29, 2010 9:37 AM -
Master Child tables how to get the latest rows from both
Hi,
Need some help with the sql. I have two tables Master & Child. In my Master table I have multiple rows for the same record and in the child table also multiple rows for the same master row how can I get the latest one's from both.
For example Data in my Master table looks like
CONT_ID SEQ_NUM DESCRIPTION
1 189 Update 2
1 188 Update 1
1 187 NewNow in the child table for the same CONT_ID I may have the following rows
CONT_ID UPDATED_DATE STATUS
1 3/16/2010 2:19:01.552700 PM P
1 3/16/2010 12:29:01.552700 PM A
1 3/16/2010 12:29:01.552700 PM P
1 3/16/2010 12:19:01.552700 PM NIn my final query how can I get the row with seq_num 189 as it's the latest in Master table and from child table the row with status of P as it's the latest one based on the time. Here is the query i have but it returns the latest row from the child table only and basically repeats the master table rows as opposed to one row that is latest from both:
ThanksHi,
You can use the analytic ROW_NUMKBER function to find the latest row for each cont_id in each table:
WITH got_m_rnum AS
SELECT cont_id, seq_num, description
, ROW_NUMBER () OVER ( PARTITION BY cont_id
ORDER BY seq_num DESC
) AS m_rnum
FROM master_table
-- WHERE ... -- any filtering goes here
, got_c_rnum AS
SELECT cont_id, updated_date, status
, ROW_NUMBER () OVER ( PARTITION BY cont_id
ORDER BY updated_date DESC
) AS c_rnum
FROM child_table
-- WHERE ... -- any filtering goes here
SELECT m.cont_id, m.seq_num, m.description
, c.updated_date, c.status
FROM got_m_rnum m
JOIN got_c_rnum c ON m.cont_id = c.cont_id
AND m.m_rnum = c.c_rnum
AND m.m_rnum = 1
;If you'd like to post CREATE TABLE and INSERT statements for the sample data, then I could test this.
If there happens to be a tie for the latest row (say, there are only two rows in the child_table with a certain cont_id, and both have exactly the same updated_date), then this query will arbitrarily choose one of them as the latest. -
How to delete the single record from the ODS
HI,
I want to DELETE the particular record from ODS.. how to delete that..
plz give me the solution.. it's urgent..
with regards
@jayHi Prakash,
You can delete a particular record from ODS by specifying the key field name in Selective deletion button available in Contents tab in the manage screen of ODS. But it will only delete the record from the active data table and not from the Change log and new data table . You should be very carefull if you are doing in Production system as there is chance of deleting other records accidentally.
Go to Selective deletion button - > Click on delete selection -> Enter the key field values of the record you want to delete-> Press save button to save as Variant -> Go back and click on selection button -> Chosse the background job type -> Click on start button.
Regards,
Prakash -
How to delete the line item from a sales order
Hi all,
how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
Regards
KumarHi Kumar,
I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
Regards,
Rachel -
How to return the entire row from a table
Hi guys,
Tabl A
FirstName varchar2(10),
Age Number,
Add varchar2(100),
Table B
Filedname varchar2(200), -- contains all the fields of table A
Datatype varchar2(100), -- Contains the datatypes of the filedname
Length Number -- contains the length of the fileds
Now how can i return the entire row from table A with the datatype and its length.
Any help would be appreciated ?
Here is the query I wrote but it how to take the datatype and its length..
create or replace procedure disp_table_data
as
type r_cursor is REF CURSOR;
c_A r_cursor;
er A%rowtype;
begin
open c_A for select * from A;
loop
fetch c_A into er;
exit when c_A%notfound;
dbms_output.put_line(er.FirstName||'--'||er.Age);
end loop;
close c_A;
END;
/Guys,
I want column value from table A and its corresponding data_type and length from table B. I think I cant do it through joins.
Any idea would be appreciated ?.
Example ..
Tabl A
FirstName varchar2(10),
Age Number,
Add varchar2(100)
insert into A values('John',24,'Boston');
Table B
Filedname varchar2(200), -- contains all the fields of table A
Datatype varchar2(100), -- Contains the datatypes of the filedname
Length Number -- contains the length of the fileds
insert into B values('FirstName','varchar2',10); -- this is coming from table A.
Output should be like this...
John,Varchar2,10
Here (John is the FirstName - coming from table A, Varchar2 is a Datatype and 10 is the Length which are coming from table B ). Only column values are coming from table A , corresponding datatype and length are coming from B.
Any idea would be appreciated ?
Thanks. -
How to save the selected rows from Advance table into database
Hi
I have requirement like..
In custom page , Manager Search the Candidates and selects the candidate ROWS from advance table.
The reqt is how to save the selected multiple rows into the database.hi Reetesh,
In Custom page
Supoose the Recruiter Search is for Position Finance Mangager , it retrieves 100 rows , out of which Recruiter select 10 rows .
So in Such scenario how to save this 10 rows against Recruiter
, i mean , Is i need to create custom table, to save Recruiter , these selected 10 rows.
I hope u understand my question
Maybe you are looking for
-
I want to backup my email messages and archives. I intend to them put into my 'Documents' folder for 'Cloud' backup and also into an external hard drive which I have always used in the past and, as a 76 year old with a new computer, 8.1 in place of X
-
How can i create a multilingual website with a menu for each one?
I have all the pages in spanish and the same pages in english ej. Contacto and Contact ...should be sister or child pages? I need two diferent menus (one for spanish pages master, another menu for the english pages master) but the menu feature mixes
-
Not setting retension policy when MML in place .
Hi, we are doing backups on Legato Networker. I've noticed that there is no retension policy set in rman repository. DBA claims thats the best solution, because Tape Library got their own policy ,and crosscheck does the work . RMAN catalog is 10.2.0.
-
I am trying to add an HP PhotoSmart All-in-One C3180 printer that is connected to my Aiprort Extreme. It will show up in the Printer Set-up utility, but when I click on Add it returns an erro -9672. I can connect the printer to the USB on the MacBook
-
Changing a standard structure erec_s_api_p5126.
Is it ok to change a standard structure erec_s_api_p5126 . If not, can anybody tell how to create a new structure based on erec_s_api_p5126. Or if I can, how can I change it. Thanks and Regards. Srinivas