Delete dup. rows
Hi ,
I want to delete duplicate rows from a large table.
I wrote a query using rowid not in ...
which is taking lot of time ... more than 4 hr still running.
can i get a more opt. query ..
thanks in advance
Ravi Kumar
Can i get a query to delete dup. rows without using ROWID...Why would you want to?
If the two rows are wholly identical then physical location in the database (i.e. ROWID) is the only differentiator. But if you are just checking for (say) duplicate columns that are supposed to be primary keys then you can use some other column to distinguish rows.
Cheers, APC
Similar Messages
-
How to delete the row in table control with respect to one field in module pool programming?
Hi,
Can I know the way to delete the row in table control with respect to one field in module pool programming
Regards
Darshan MSHI,
I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
I have written this code,
module USER_COMMAND_9000 input.
DATA OK_CODE TYPE SY-UCOMM.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'DELETE'.
LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
APPEND LS_SOURCE TO LT_RESTORE.
DELETE TABLE LT_SOURCE FROM LS_SOURCE.
SOURCE-LINES = SOURCE-LINES - 1.
ENDLOOP.
But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
So I thought of doing with respect to the field. -
Error while deleting a row in entity
Hi
I am facing a problem while trying to delete a row from a entity.
Below is the scenario where i am facinmg a problrm.
I have a ViewObject which has attributes from two entity and on e transient variable.
in the RowImpl java class for the above Viewobject i changes the getter method of the transient variable to some text.
I display all the Viewobject as a table in the UI.
When a user selects a row and press delete method.
I get a id(one of the attribute from the Viewobject) from the selected row and remove the row from the Entity.
When i try to commit the changes i am getting the below error
Another user has changed the row with primary key oracle.jbo.Key [742]. (Another user has changed the row with primary key {0}.)
Can any one please help me in this
Thanks
Ranjithcheck {message:id=9271952}
-
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 1 row from a table takes too long...why?
We are running the following query...
delete gemdev.lu_messagecode where mess_code ='SSY'
and it takes way too long as there is only 1 record in this table with SSY as the mess_code.
SQL> set timing on;
SQL> delete gemdev.lu_messagecode where mess_code ='SSY';
1 row deleted
Executed in 293.469 seconds
The table structure is very simple as you can see below.
CREATE TABLE GEMDEV.LU_MESSAGECODE
MESS_CODE VARCHAR2(3) NOT NULL,
ROUTE_CODE VARCHAR2(4) NULL,
REPORT_CES_MNEMONIC VARCHAR2(3) NULL,
CONSTRAINT SYS_IOT_TOP_52662
PRIMARY KEY (MESS_CODE)
VALIDATE
ORGANIZATION INDEX
NOCOMPRESS
TABLESPACE IWORKS_IOT
LOGGING
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE(BUFFER_POOL DEFAULT)
PCTTHRESHOLD 50
NOPARALLEL
ALTER TABLE GEMDEV.LU_MESSAGECODE
ADD CONSTRAINT LU_ROUTECODE_FK3
FOREIGN KEY (ROUTE_CODE)
REFERENCES GEMDEV.LU_ROUTECODE (ROUTE_CODE)
ENABLE
ALTER TABLE GEMDEV.LU_MESSAGECODE
ADD CONSTRAINT MSGCODE_FK_CESMNEMONIC
FOREIGN KEY (REPORT_CES_MNEMONIC)
REFERENCES GEMDEV.SYS_CESMNEMONIC (CES_MNEMONIC)
ENABLE
My explain reads as follows.
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | DELETE STATEMENT | | | | 1 (100)| |
| 1 | DELETE | LU_MESSAGECODE | | | | |
| 2 | INDEX UNIQUE SCAN| SYS_IOT_TOP_52662 | 1 | 133 | 1 (0)| 00:00:01 |
Also in my AWR Sql Report I see this as well
Plan Statistics DB/Inst: IWORKSDB/iworksdb Snaps: 778-780
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
Stat Name Statement Per Execution % Snap
Elapsed Time (ms) 521,102 N/A 12.0
CPU Time (ms) 73,922 N/A 5.1
Executions 0 N/A N/A
Buffer Gets 2,892,144 N/A 3.4
Disk Reads 2,847,609 N/A 8.6
Parse Calls 1 N/A 0.0
Rows 0 N/A N/A
User I/O Wait Time (ms) 475,882 N/A N/A
Cluster Wait Time (ms) 0 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 2 N/A N/A
Invalidations 1 N/A N/A
Version Count 1 N/A N/A
Sharable Mem(KB) 45 N/A N/A
Now, since the table only has 150 rows, and I am only try to delete 1 row, why is there so much disk read and why does it take 5 minutes to delete? This just weird. Does this have something to do with the Child tables?Any triggers on the table?
If you trace the session, what statement(s) seem to
be taking all that time?
JustinWell I traced my session and I noticed that my query does take a while, but I also noticed several other queries that I was not running. Not too sure where it came from. Have a look below. It is a sample from my TKPROF utility report.
delete gemdev.lu_messagecode
where
mess_code ='SSY'
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.01 0.04 0 2 23 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.01 0.04 0 2 23 1
Misses in library cache during parse: 1
Optimizer mode: FIRST_ROWS
Parsing user id: 57
Rows Row Source Operation
1 DELETE LU_MESSAGECODE (cr=3446672 pr=3442028 pw=0 time=309363335 us)
1 INDEX UNIQUE SCAN SYS_IOT_TOP_52662 (cr=2 pr=0 pw=0 time=35 us)(object id 52663)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 35.87 35.87
select /*+ all_rows */ count(1)
from
"GEMDEV"."TBLCLAIMCHARGE" where "CONTRACT_FEE_MESS_CODE" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 10.53 44.95 381779 382893 0 1
total 3 10.53 44.95 381779 382893 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 SORT AGGREGATE (cr=382893 pr=381779 pw=0 time=44953436 us)
0 TABLE ACCESS FULL TBLCLAIMCHARGE (cr=382893 pr=381779 pw=0 time=44953403 us)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file scattered read 47795 0.03 37.87
db file sequential read 101 0.00 0.02
select /*+ all_rows */ count(1)
from
"GEMDEV"."TBLCLAIMCHARGE" where "FEE_INEL_MESS_CODE" = :1 -
How to delete empty row without validation error in ADF Table(EMP)
Hi Everyone,
I am using EMP Table in ADF jspx page to insert the data into database.when i insert a row into table by createInsert operation,it inserting the row.But I need to delete that row immediately with out entering any value.
But it showing some validation error at empno.Is there any ways to delete the empty row?if not,what are the reasons that we can't delete the row.
could any one tell me the reasons!!
Thanks in advance!!
With Best Regards,
Amar
Edited by: 973755 on Dec 11, 2012 6:42 AMAmar,
I am little confused with your logic here.....
but if you are trying to remove the row by clicking Remove button, you can set the immediate property to true and that remove function will run without executing any entity validation.......
-R -
How to delete a row in Numbers on iPhone?
I'm pulling my hair out on this one. The "Help" for Numbers for iPhone both in-app and on the web states that to:
Delete a row anywhere in the table: Tap the bar left of the row, then tap Delete.
So here is what I see before I tap the bar left of the row:
There is no bar left of the row unless I first tap into one of the cells. Then, when I tap the bar left of the row, this is what I get:
I see no "Delete" on which to tap. Nor do I see "Hide" or "Insert", which, according the the Help, should also be available options once I've tapped that left side bar. The only things I am able to do with the row are move it up or down, and change its height.
Am I missing something, doing something wrong, or is this a bug in Numbers? I'm on an iPhone 5s with auto app updates, so I have the latest version of Numbers.
ThanksHi Varcar,
Usually when I tap the bar, as you did, I get a popup menu with some choices. Cut, Copy, Paste then an arrow taht I can then tap to reveal Delete, Hide, Chart. Have you tried to retap on the blue highlight on that bar? It might just want more attention.
Quinn -
How to delete a row in target when corresponding row in source is deleted
Greetings
Environment:
Repository - OWB 10.1.0.4 - going to 10gR2 very soon
- IBM RS6000 running AIX 5.3
I have a target table being updated with an INSERT/UPDATE. The user deleted a row in the source table and I want to delete the corresponding row in the target table.
How do I do this in the map?
Many thanks.
-garyThanks very much for the responses. Now that I have thought it through more carefully I see I can still have a single instance of the source table and send it through the MINUS operator with the target table followed by a DELETE into the target table and still have the existing logic for the INSERT/UPDATE into a second occurrence of the target table.
It won't matter what order OWB puts together the two operations on the target table:
- if it does the DELETE first the new rows that haven't been added to the target table will come out of the MINUS operator but not be found yet in the target table so not deleted.
- if it does the INSERT/UPDATE first the newly added rows will not come out of the MINUS operator and hence not deleted from the target.
Must have been a brain fart.
Thanks again.
-gary -
How to delete particular row in ALV list display
Hi All,
My requirement is :
I am displaying ouput using lav list dispplay befor the first colomn i am displaying check box. i defined my own pf status here . in pf status i have 3 buttons .
1 select all
2 deselect all
3 delete.
First two options are working fine when i click select all it is selecting all the rown in a program(selectiong all the check boxex) like working fine for deselecting all.
3 optioin Delete when i click delete option it has to delete partcular row in a list display and at the same time this entry should delete from the table. this is my requirement. for the third point(delete) option i dont have any logic. anybody can suggest me or send me the sameple code. i am sending my code below.if possible please modify the code and resend it to me.
type-pools : slis.
tables : zuser_secobjects.
data : t_header1 like zuser_secobjects.
data : begin of it_secobjects occurs 0.
include structure t_header1.
*data : box,
input(1) type c,
data : checkbox type c,
flag type c,
end of it_secobjects.
data : wa_ita like line of it_secobjects.
*data : it_secobjects like zuser_secobjects occurs 0 with header line.
data : i_field type slis_t_fieldcat_alv with header line.
data : w_field like line of i_field.
data : i_sort type slis_t_sortinfo_alv.
data : w_sort like line of i_sort.
data : it_filt1 type slis_t_filter_alv with header line.
data:
i_tabname type tabname,
i_repid like sy-repid,
is_lout type slis_layout_alv.
data : it_filt type slis_t_filter_alv with header line,
it_evts type slis_t_event with header line.
DATA : is_vari type disvariant.
constants : c_default_vari value 'X',
c_save_vari value 'U',
c_checkfield type slis_fieldname value 'ACTION',
c_f2code type sy-ucomm value '&ETA'.
data : chk_box type slis_fieldname.
selection-screen: begin of block b1 with frame title text-t01.
parameters : p_appln type zuser_secobjects-appln.
parameters : p_user type usr02-bname, "zuser_secobjects-appln_user,
p_partnr type zuser_secobjects-appln_partner,
p_ptype type zuser_secobjects-partner_type default '02',
p_upostn type zuser_secobjects-user_position,
p_sdate like likp-erdat default sy-datum,
p_edate(10) default '12/31/9999',
p_revnum type zuser_secobjects-revnum,
p_cted type zuser_secobjects-created_by,
p_cdate type zuser_secobjects-creation_date,
p_ctime type zuser_secobjects-creation_time,
p_chnby type zuser_secobjects-changed_by,
p_cdate1 type zuser_secobjects-changed_date,
p_ctime1 type zuser_secobjects-changed_time.
selection-screen: end of block b1.
form user_command using p_ucomm like sy-ucomm
rs_selfield type slis_selfield.
*DATA : it_filt type slis_t_filter_alv with header line.
case p_ucomm.
when 'SELECT_ALL'. " SELALL is the FCODE of ur push button
loop at it_secobjects into wa_ita.
wa_ita-checkbox = 'X'.
modify it_secobjects from wa_ita.
endloop.
rs_selfield-refresh = 'X'. "<- ADD THIS
when 'DESLCT_ALL'.
loop at it_secobjects into wa_ita.
wa_ita-checkbox = ' '.
modify it_secobjects from wa_ita.
endloop.
rs_selfield-refresh = 'X'. "<- ADD THIS
is_lout-f2code = c_f2code.
is_lout-box_fieldname = c_checkfield.
is_lout-get_selinfos = 'X'.
is_lout-detail_popup = 'X'.
is_lout-detail_initial_lines = 'X'.
when 'HIDE_DEL'.
rs_selfield-exit = 'X'.
it_filt-fieldname = 'ACTION'.
it_filt-tabname = '1'.
it_filt-valuf = 'X'.
it_filt-intlen = '1'.
it_filt-inttype = 'C'.
it_filt-datatype = 'CHAR'.
it_filt-valuf_int = 'X'.
it_filt-sign0 = 'E'.
it_filt-optio = 'EQ'.
if it_filt[] is initial.
append it_filt.
else.
modify it_filt index 1.
endif.
perform display using i_object.
PERForm ALV_LIST_DISPLAY.
WHEN 'SHOW_DEL'.
rs_selfield-exit = 'X'.
free it_filt.
PERForm ALV_LIST_DISPLAY.
when 'SAVE1'.
select * from zuser_secobjects where
appln = zuser_secobjects-appln
and appln_partner = zuser_secobjects-appln_partner
and partner_type = zuser_secobjects-partner_type
and start_date = zuser_secobjects-start_date
and end_date = zuser_secobjects-end_date.
endselect.
if sy-subrc eq 0.
message e000(ZV) with 'Duplicate Entry'.
endif.
endcase.
endform.
*& Form delete
form delete.
data : begin of is_secobjects occurs 0.
include structure zuser_secobjects.
data : checkbox type c.
data : end of is_secobjects.
is_secobjects-checkbox = 'X'.
modify is_secobjects
from it_secobjects
transporting checkbox
where checkbox = 'X'.
endform.
*& Form get_data
form get_data.
select * from zuser_secobjects
into table it_secobjects.
endform. " get_data
*& Form prepare_fieldcatalog
text
--> p1 text
<-- p2 text
form prepare_fieldcatalog.
clear: w_field,i_field.
refresh:i_field.
i_field-key = 'X'.
i_field-col_pos = 1.
i_field-ddictxt = 'S'.
i_field-seltext_s = '@11@'.
i_field-checkbox = 'X'.
i_field-input = 'X'.
i_field-fieldname = 'HEADER'.
i_field-outputlen = 0.
append i_field.
clear i_field.
w_field-fieldname = 'APPLN'.
w_field-tabname = 'IT_SECOBJECTS'.
w_field-seltext_l = text-m01.
w_field-outputlen = '10'.
w_field-col_pos = 1.
append w_field to i_field.
clear w_field.
w_field-fieldname = 'APPLN_USER'.
w_field-tabname = 'IT_SECOBJECTS'.
w_field-just = 'C'.
w_field-seltext_l = text-m02.
w_field-outputlen = '7'.
w_field-col_pos = 2.
append w_field to i_field.
clear w_field.
endform. " prepare_fieldcatalog
*& Form ALV_LIST_DISPLAY
text
--> p1 text
<-- p2 text
form alv_list_display.
i_repid = sy-repid.
is_lout-box_fieldname = 'CHECKBOX'.
it_filt-fieldname = 'ACTION'.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = i_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
is_layout = is_lout
it_fieldcat = i_field[]
it_filter = it_filt[]
it_events = it_evts[]
i_default = c_default_vari
i_save = c_save_vari
is_variant = is_vari
tables
t_outtab = it_secobjects.
endform. " ALV_LIST_DISPLAY
*& Form display
text
-->P_I_OBJECT text
form display using object.
case object.
ENDCASE.
endform. " display
thanks,
maheedhar.tHI
In my program checkbox(before the record is displayed)
I used following lines to display checkbox .
i_field-key = 'X'.
i_field-col_pos = 1.
i_field-ddictxt = 'S'.
i_field-seltext_s = '@11@'.
i_field-checkbox = 'X'. <- Using this command i am getting checkbox
i_field-input = 'X'.
when i select this checkbox i press delete option then this entry will remove from internal table and refresh the screen and at the same time i will click on save button this ztable has to update according to that action.
this is my requirement.
thanks,
maheedhar. -
How to delete the row created by AddAnotherRow Button
Hi Every one,
We have a seeded page in Oracle Sales Opportunity Update.
Here we have an activities region where we can add activities by clicking on AddAnotherRow Button.
But there are no restriction of the row created in activities
The issue we are facing is the end users are clicking the AddAnotherRow Button but not able to clear the row from the table.
Is there any functionality where the user can delete the row created by AddAnotherRow
Regards,
KrishnaHi Krishna,
If the delete functionality is not available on the page then there is no other way, you need to implement it.
Regards,
Reetesh Sharma -
HOW TO DELETE THE ROW FROM DATABASE
hI,
Iam pasting my code below.My problem isi retrieve rows from database and display them in jsp page in rows.For each row there is delete hyperlink.Now when i click that link i should only delete the row corresponding to that delete link temporarily but it should not delete the row from database now.It should only delete the row from database when i click the save button.How can i do this can any one give some code.
thanks
naveen
[email protected]
<%@ page language="java" import="Utils.*,java.sql.*,SQLCon.ConnectionPool,java.util.Vector,java.util.StringTokenizer" %>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Item Details</title>
<script>
function submitPage()
document.details.action = "itemdetails.jsp" ;
document.details.submit();
</script>
</head>
<body>
<form name="details" action="itemdetails.jsp" method="post">
<%
ConnectionPool pool;
Connection con = null;
Statement st;
ResultSet rs =null;
%>
<table border="0" cellpadding="0" cellspacing="0" width="328">
<tr>
<td width="323" colspan="4"><b>Reference No :</b> <input type="text" name="txt_refno" size="14">
<input type="submit" value="search" name="search" ></td>
</tr>
<tr>
<td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Item Code</b></font></td>
<td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Item No</b></font></td>
<td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Amount </b></font></td>
<td width="80" bgcolor="#000099"> </td>
</tr>
<%
pool= new ConnectionPool();
Utils utils = new Utils();
double total =0.00;
String search =utils.returnString(request.getParameter("search"));
if(search.equals("search"))
try
String ref_no =utils.returnString(request.getParameter("txt_refno"));
String strSQL="select * from ref_table where refno='" + ref_no + "' ";
con = pool.getConnection();
st=con.createStatement();
rs = st.executeQuery(strSQL);
while(rs.next())
String itemcode=rs.getString(2);
int item_no=rs.getInt(3);
double amount= rs.getDouble(4);
total= total + amount;
%>
<tr>
<td width="81"><input type=hidden name=hitem value=<%=itemcode%>><%=itemcode%></td>
<td width="81"><input type=hidden name=hitemno value=<%=item_no%>><%=item_no%></td>
<td width="81"><input type=hidden name=hamount value=<%=amount%>><%=amount%></td>
<td width="80"><a href="delete</td>
</tr>
<%
}catch(Exception e){}
finally {
if (con != null) pool.returnConnection(con);
%>
<tr>
<td width="323" colspan="4">
<p align="right"><b>Total:</b><input type="text" name="txt_total" size="10" value="<%=total%>"></td>
</tr>
<tr>
<td width="323" colspan="4">
<input type="button" value="save" name="save"></td>
</tr>
</table>
</form>
</body>
</html>You mean when you click on the hyperlink you want that row to disappear from the page, but not delete the row from the database until a commit/submit button is pressed?
Personally, I think I'd prefer that you have a delete checkbox next to every row and NOT remove them from the display if I was a user. You give your users a chance to change their mind about their choice, and when they're done they can see exactly which rows will be deleted before they commit.
You know your problem, of course, so you might have a good reason for designing it this way. But I'd prefer not removing them from the display. JMO - MOD -
How to delete a row of table in Word using powershell.
I want to search for a word which is present in Table. If that word is present than I want to delete that row from table.
Can anybody help me with that. The script I am using is:
$objWord = New-Object -ComObject word.application
$objWord.Visible = $True
$objDoc = $objWord.Documents.Open("C:\temp\Recipe.docx")
$FindText = "DP1"
$objSelection.Find.Execute($FindText)
$objWord.Table.Cells.EntireRow.Delete()
$objDoc.SaveAs("C:\Temp\P.docx")
$Doc.Close()Maybe try this:
$objWord = New-Object -ComObject word.application
$objWord.Visible = $True
$objWord.Documents.Open("C:\temp\Recipe.docx")
$FindText = "DP1"
$objWord.Selection.Find.Execute($FindText) | Out-Null
$objWord.Selection.SelectRow()
$objWord.Selection.Cells.Delete()
$objWord.Documents.SaveAs("C:\Temp\P.docx")
$objWord.Close()
$objWord.Quit()
[System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$objWord) | Out-Null
This definitely assumes the text you're trying to find only exists in a table, per your specified requirements. If it exists anywhere else, or in multiple tables, the code above is inadequate.
I hope this post has helped! -
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.
-
Unable to delete a row in table control
Hi,
I'm unable to delete a row in table control.
I have defined a selection column for my table control but it is not getting value 'X' when i'm selecting a row for deletion.
Also, when I press enter, some of the columns in table control are getting initialized. I'm passing these values to the internal table along with other columns.
Please help.
Regards,
Manasee
Message was edited by: Manasee Chandorkarhi,
kindly chk this.
PROCESS BEFORE OUTPUT.
MODULE status_9010.
LOOP WITH CONTROL tab_control.
MODULE move_data_to_table.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL tab_control.
MODULE move_data_from_table.
ENDLOOP.
*& Module move_data_to_table OUTPUT
This is to move the data from the internal table to the table control
MODULE move_data_to_table OUTPUT.
This is to move the data from the internal table to the table control
zmpets_mode-modecode,zmpets_range-rangeid,zmpets_servfacto-factor are column name of table control
READ TABLE int_factor INDEX tab_control-current_line.
IF sy-subrc = 0.
zmpets_mode-modecode = int_factor-modecode.
zmpets_range-rangeid = int_factor-rangeid.
zmpets_servfacto-factor = int_factor-factor.
ENDIF.
ENDMODULE. " move_data_to_table OUTPUT
*& Module move_data_from_table INPUT
Date is moved from the table control to the Internal Table
MODULE move_data_from_table INPUT.
To move the data from the table control to internal table 'INT_FACTOR'.
int_factor-modecode = zmpets_mode-modecode.
int_factor-rangeid = zmpets_range-rangeid.
int_factor-factor = zmpets_servfacto-factor.
int_factor-chk = line.
*here if the data is there, it will modify
MODIFY int_factor INDEX tab_control-current_line.
IF sy-subrc NE 0. "data not exixting in table control . ie new data, then append it
APPEND int_factor.
CLEAR int_factor.
ENDIF.
ENDMODULE. " move_data_from_table INPUT
*delete a line from table control
MODULE user_command_9010 INPUT.
CASE sy-ucomm.
When an entry is deleted, and the entry is removed from the table
control.
WHEN 'DELETE'.
PERFORM f_del_frm_tab_cntrl.
ENDCASE.
ENDMODULE.
FORM f_del_frm_tab_cntrl .
LOOP AT int_factor WHERE chk = 'X'.
DELETE int_factor WHERE chk = 'X' .
CONTINUE.
ENDLOOP.
CLEAR int_factor.
ENDFORM.
for any clarifiaction pls mail me.
pls reward points, if this helped u.
regards,
anversha.
[email protected]
Message was edited by: Anversha s -
How to delete a row in ADF Table by pressing "Delete" Key
I want to delete a row in my ADF table by pressing the "Delete" key..How can i achieve it?
hai ,
I write clientListener and ServerListener..But in the script i printed the event.getKeyCode() ...*When i press Delete Key or EnterKey ,it is not printing the value*..
The code i write is pasted below..
In the code backing_Comm is my backingbean..Is there any problem in the code that i had written?I want to delete a selected row from my table using keypress Event...pls advice..
<script type="text/javascript">
onPressDeleteKey=function(event){
alert(event.getKeyCode()); // *Here i am not getting the alert, when i press Delete Key or Enter Key..But getting alert when i press A- Z or 1 - 0*
if(event.getKeyCode()==AdfKeyStroke.ENTER_KEY) {
var source = event.getSource();
AdfCustomEvent.queue(source,performDeleteOnPress,{},false);
</script>
<*af:table* value="#{bindings.ComMastVO.collectionModel}"
var="row"
rows="#{bindings.ComMastVO.rangeSize}"
emptyText="#{bindings.ComMastVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
fetchSize="#{bindings.CompMastVO.rangeSize}"
rowSelection="single"
id="tblCom"
columnStretching="last" inlineStyle="width:100%;"
width="273"
selectionListener="#{backing_Comm.rowSelectCom}"
binding="#{backing_Comm.tblCom}"
clientComponent="true" >
<*af:column* sortProperty="Com" sortable="true">
<*af:inputText* value="#{row.bindings.Com.inputValue}"
label="#{bindings.ComMastVO.hints.Com.label}"
required="#{bindings.ComMastVO.hints.Com.mandatory}"
columns="150"
maximumLength="#{bindings.ComMastVO.hints.Com.precision}"
shortDesc="#{bindings.ComMastVO.hints.Com.tooltip}">
valueChangeListener="#{backing_Comm.onValueChange}"
autoSubmit="true" >
<f:validator binding="#{row.bindings.Com.validator}"/>
*</af:inputText>*
*<af:serverListener type="performDeleteOnPress"*
*method="#{backing_Comm.goDeleteCurrentRow}"/>*
</af:column>
*<af:clientListener type="keyPress"*
*method="onPressDeleteKey"/>*
</af:table>
=================================================
anybody pls help??
Edited by: Briston Thomas on Jun 3, 2009 2:25 AM
Maybe you are looking for
-
Smart forms- how to get the copies of form in other pages as duplicate
hi experts, i am facing problem in smartforms. one copy is ready for me. i have to take that one in 4 pages as 1st page original, 2nd duplicate, 3rd triplicate, 4th quadriplicate............. how to get them.... all theremaining data is same .... Me
-
What should I do when setting up my new iPad?
I am getting a New iPad on Sunday! Really excited! But since this will be my first iPad, I am a little confused on the set up when you first take it out of the box. Should I turn on Location Services? And what other options would I have that I should
-
How to embed audio into file for export to pdf
Hello, I've transcribed a two-hour lecture and copied it into Indesign. I would like to create a pdf with the audio of the lecture embedded in it so that when the reader clicks on a paragraph or a button the audio for that particular sentence or sec
-
Consecutive data with time stamp
Hi, I have a table named schedules, it has the following columns: SCHEDULE_ID SCHEDULE_DATE HOME_TEAM_ID VISITOR_TEAM_ID SEASON_ID VISIT_TEAM_DECISION HOME_TEAM_DECISION 20071228NCAAFMICHIGANST0 12/28/2007 6639 5408 21586 W L 20071201NCAAFBOSTCOLL--0
-
How can I get firefox to remember my most used websites when I change tabs?
Have downloaded a new firefox and whilst the history is remembered I can't get my most used websites to comeup and when I move away from home page I get trovi which I have never used and don't want to use - just want things as they were