How to delete matrix row using rightclick ?
Hi all ,
I have UDO form .when i right click on a matrix then contextual menu appears only(Copy,Remove,Cancel) not appears (DELETE ROW ) .plz help how to contextual menu appears with (Delete Row) and which event fire when i click delete row.
thanks in advance
Surajit
Hi,
Menu Event..
If (pVal.MenuUID = "OnlyOnRCDE") And (pVal.BeforeAction = False) Then
Try
Dim oMenuItem As SAPbouiCOM.MenuItem
Dim oMenus As SAPbouiCOM.Menus
Dim omat As SAPbouiCOM.Matrix
Dim GCols As SAPbouiCOM.Columns
Dim i As Integer
pmat = pcFrm.Items.Item("5").Specific
GCols = pmat.Columns
pcFrm.DataSources.DBDataSources.Item(1).Clear()
pmat = pcFrm.Items.Item(selItem).Specific
For i = 1 To pmat.RowCount
If pmat.IsRowSelected(i) = True Then
pmat.DeleteRow(i)
Exit For
End If
Next
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
Right Click Event
If eventInfo.FormUID = "AAAAAAAAAAAAAAA" Then
If (eventInfo.BeforeAction = True) Then
Dim omat As SAPbouiCOM.Matrix
Dim GCols As SAPbouiCOM.Columns
pmat = pcFrm.Items.Item("5").Specific
GCols = pmat.Columns
pcFrm.DataSources.DBDataSources.Item(1).Clear()
Try
selItem = eventInfo.ItemUID
Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
oCreationPackage.UniqueID = "OnlyOnRCDE"
oCreationPackage.String = "Delete Row"
oCreationPackage.Enabled = True
oMenuItem = SBO_Application.Menus.Item("1280") 'Data'
oMenus = oMenuItem.SubMenus
oMenus.AddEx(oCreationPackage)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Else
Try
SBO_Application.Menus.RemoveEx("OnlyOnRCDE")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
End If
Regards,
Siva
Similar Messages
-
How to Delete duplicates rows without using rowid/distinct.
How to delete duplicates rows present in a table without using rowid or even distinct.
How about:
SQL> SELECT * FROM t1;
A B
1 2
2 3
1 2
4 4
4 4
4 4
SQL> DELETE FROM t1
2 WHERE (a, b) IN (SELECT a, b FROM t1
3 GROUP BY a, b
4 HAVING COUNT(*) > 1) and
5 rownum = 1;
1 row deleted.
SQL> /
1 row deleted.
SQL> /
1 row deleted.
SQL> /
0 rows deleted.
SQL> SELECT * FROM t1;
A B
2 3
1 2
4 4Although, if I was asked a similar question with all those restrictions, my first response would be along the lines of: Is this question indicative of the way I will have to work if I join this company? If so, there is no point answering because I wouldn't touch this job with a ten foot pole. -
How to delete a row in the table in servlets
I have met a problem in deleting a row in table using servlets.
My table looks like this:
ID Name Type
12 Milienium S
15 USIA O
My code looks like this:
String query = "SELECT * FROM tb_Funds";
rs = statement.executeQuery(query);
while(rs.next()) {
StdID=rs.getString("FundID");
StdName=rs.getString("Name");
StdType=rs.getString("Type");
out.print("<td><INPUT TYPE=TEXT NAME=
myName VALUE=" + StdID + "></td>");
out.print("<td>" + StdName + "</td>");
out.print("<td>" + StdType + "</td>");
buf.append("<td>" + "<INPUT TYPE=SUBMIT
NAME=Delete VALUE=DELETE>" + "</td></tr>");
There is a delete button in every row. May I know how to delete the row that I want by getting the ID from the table and delete it from the database.
Deleting from a table is simple -> delete from tb_funds where id = <value>. Obviously replace <value> with the appropriate ID or use a bind variable (a ?) and prepared statements.
Are you asking how to pass the id associated with the table row from the browser when the button is pressed? -
How to delete multiple rows from ADF table
How to delete multiple rows from ADF table
Hi,
best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
Frank -
Another Delete matrix row thread
I have read some threads with Q&A on the delete matrix row subject but I cant make it work properly. Deleted rows have a tendency to return.
I first tried to make my own:
If pVal.MenuUID = "RmLine" And pVal.BeforeAction = True Then
Set oMatrix = m_oForm.Items("MatrixM").Specific
i = 1
While i <= oMatrix.RowCount
If oMatrix.IsRowSelected(i) Then
If oMatrix.RowCount = 1 Then
oMatrix.AddRow
End If
oMatrix.DeleteRow i
m_oForm.DataSources.DBDataSources("@ITCCR_DM").Clear
oMatrix.LoadFromDataSource
m_oForm.Mode = fm_UPDATE_MODE
End If
i = i + 1
Wend
End If
Problem here is that I cant remove last row without having it return right after.(Thats why I tried the addrow)
Then I tried using SAP's function:
m_oForm.EnableMenu "1293", True
But as soon I hit "Update" the row returns so what do I need to add to the menu event to make it work?I use the two following standard methods for add and delete of rows... so far no problems with them (½ a year)
(Please not that I've have wrapped the entire UI for faster use, so not every method in here are core SDK, but hope you get the idea for the approach)
public int Add(B1ItemEvent pVal,B1DBDatasource Dbds, bool SwitchToUpdateMode, string ColumnToSelect) {
InnerMatrix.FlushToDataSource();
if(Dbds.GetValue_String(0,0)!="" || InnerMatrix.RowCount!=0) {
Dbds.InsertRecord(Dbds.Size);
Dbds.SetValue_String(0,Dbds.Size-1,"");
InnerMatrix.LoadFromDataSource();
InnerMatrix.Update();
if(SwitchToUpdateMode) {
if(pVal.IsFormModeOK) {
InnerForm.SwitchToUpdate();
InnerMatrix.Columns[ColumnToSelect].Focus (InnerMatrix.RowCount);
return Dbds.Size-1;
public bool RemoveSelected(B1ItemEvent pVal, B1DBDatasource Dbds, bool SwitchToUpdateMode, string WarningIfNoRowsSelected) {
InnerMatrix.FlushToDataSource();
int row = InnerMatrix.GetNextSelectedRow(0,BoOrderType.ot_RowOrder);
if(row!=-1) {
InnerForm.Freeze(true);
while(row != -1) {
InnerMatrix.DeleteRow(row);
if(InnerMatrix.RowCount==0) {
Dbds.BlankRecord(0);
row = InnerMatrix.GetNextSelectedRow(0,BoOrderType.ot_RowOrder);
InnerForm.Freeze(false);
InnerMatrix.FlushToDataSource();
InnerMatrix.Update();
if(SwitchToUpdateMode) {
if(pVal.IsFormModeOK) {
InnerForm.SwitchToUpdate();
return true;
else {
Notification.Statusbar_Warning (WarningIfNoRowsSelected);
return false; -
Hi every one
Can any one help me out, How to Update a Row using ADF.
Thanks in advanceIn addition to Clear to my question
By Using ADF BC How can I update a record in a database.
I have VO and EO associated with a table.
How can I update a record using ADF BC
Message was edited by:
user616296 -
How To Delete a Row From a TableView !!!!
Hi,
Does any know how to delete a row from a table view model.
I have a TableViewModel being displayed, when the user select the particular row and click delete i want that particular row to be deleted.
Any Suggestions How.
Thanks,
Emmanuel.If u want to delete single row, then set the property of TableView - selectionMode="SINGLESELECT". Select the radio button and click on delete button. In the main program, you can get the row value like...
public void onDeleteButtonClicked(Event event) throws PageException {
TableView table = (TableView) this.getComponentByName ("idTableView");
DefaultTableViewModel dmodel = myBean.beanModel;
String pid = "", row_selected;
// Get the first visible row
int firstVisibleRow = table.getVisibleFirstRow();
// Get the last visible row
int lastVisibleRow = table.getVisibleLastRow();
for (int i = firstVisibleRow; i <= lastVisibleRow; i++) {
if (table.isRowSelected(i)) {
row_selected = i;
pid = dmodel.getValueAt(i, 1).toString();
"i" will give you the row no, pid has the value of the row at first column.
Hope this helps.
Thanks,
Praveen -
How to delete no longer use Purchase Requisition
Dear Experts,
How to delete no longer use Purchase Requisition, thanks!
Wilson HongHi Hong,
Hope you are looking for archiving PR. Please refer below link.
http://help.sap.com/saphelp_nw04s/helpdata/EN/8d/3e4c11462a11d189000000e8323d3a/frameset.htm
As per SAP you cant delete any data....you can only archive it.
Cheers
Arun. -
How to delete JMS Queue using WSLT thru JNDI?
How to delete JMS Queue using WSLT thru JNDI?
Hi,
You can use the following WLST script to delete the queue :-
edit()
cd('/JMSSystemResources/MyModule/JMSResource/MyModule')
startEdit()
cmo.destroyQueue(getMBean('/JMSSystemResources/MyModule/JMSResource/Mymodule/Queues/MyQueue'))
activate()
Is it what you are looking for?
I hope this helps.
Regards.
Edited by: mchellap on Dec 11, 2008 4:27 PM -
How to delete zero rows from a matrix?
Hi,
I have a 2D datamatrix and there are some zero rows. My original program should recognize all zero rows and delete them. How to do that?
I have tried with the Delete From Array function but no success. I also tried with the OpenG array functions but...no.
I attached a vi which simulates my problem. There is one zero row and I want to delete it and have a matrix without zero rows.
Kudos for any good help!
Solved!
Go to Solution.
Attachments:
DeleteZeroRows.vi 19 KBChristian_M wrote:
The idea was to give a hint that people try using their brain....
Stilll, I think your code is fundamentally flawed and will thus lead the student into a deep swamp.
Have you actually tried it with multiple rows of zeroes?
Since "delete from array" rearranges the array indices with each deletion, the code will break if there is more than one row to be deleted. For example if a row is already deleted and it needs to also delete the last row, it would try to delete a row that no longer exists. If a later row still exists, it will delete the wrong row.
Also, since NaN gets coerced to a valid index (2147483647), it's probably not such a good idea. "-1" would be a better choice. (Well, it's an unlikely implossible possibility in LabVIEW 32 bit, but still....)
I also don't understand your logic with "search array". You need to test all elements for zero.
LabVIEW Champion . Do more with less code and in less time . -
How I can delete a row using a simple query?
SZSLIFE_SPRIDEN_PIDM SZSLIFE_SGBSTDN_TERM_CODE_EFF SZSLIFE_SLRRASG_BLDG_CODE SZSLIFE_SLRRASG_ROOM_NUMBER SZSLIFE_SLRRASG_BEGIN_DATE SZSLIFE_SLRRASG_END_DATE
48547 199890
48547 199990
48547 199990 BLU 205 09/03/1999 12/23/1999
48547 200010
48547 200010 BLU 205 01/25/2000 05/25/2000
48547 200090
48547 200090 MOR 406 09/03/2000 12/23/2000
48547 200110
48547 200110 MOR 406 01/25/2001 05/25/2001
48547 200190
48547 200210
48547 200290
48547 200310
48547 200390
48547 200410
48547 200610
Here is what a simple question is probably for some of you; I can not get this to work. I need to delete all the rows that are duplicate like row #2 with the same SZSLIFE_SGBSTDN_TERM_CODE_EFF but with not
SZSLIFE_SLRRASG_BLDG_CODE and SZSLIFE_SLRRASG_ROOM_NUMBER
I need to write a code where it counts the SZSLIFE_SGBSTDN_TERM_CODE_EFF and if it have the same (2 times.
I need to delete the row without SZSLIFE_SLRRASG_BLDG_CODE and SZSLIFE_SLRRASG_ROOM_NUMBER
The SZSLIFE_SLRRASG_BLDG_CODE NEEDS to be not null, because I do an insert in this table I need to be able to insert null values.
How I can use a simple query where I can delete all the duplicate records without bldg_code and room number…
Here is the table description
SZSLIFE_SPRIDEN_PIDM NUMBER(8)
SZSLIFE_SPRIDEN_ID VARCHAR2(10)
SZSLIFE_SPRIDEN_LAST_NAME VARCHAR2(60)
SZSLIFE_SPRIDEN_FIRST_NAME VARCHAR2(60)
SZSLIFE_SPRIDEN_MI VARCHAR2(15)
SZSLIFE_SGBSTDN_TERM_CODE_EFF VARCHAR2(6)
SZSLIFE_SGBSTDN_STST_CODE VARCHAR2(2)
SZSLIFE_STVSTST_DESC VARCHAR2(30)
SZSLIFE_SGBSTDN_STYP_CODE VARCHAR2(2)
SZSLIFE_STVSTYP_DESC VARCHAR2(30)
SZSLIFE_SGBSTDN_LEVL_CODE VARCHAR2(2)
SZSLIFE_STVLEVL_DESC VARCHAR2(30)
SZSLIFE_SGBSTDN_RESD_CODE VARCHAR2(10)
SZSLIFE_STVRESD_DESC VARCHAR2(40)
SZSLIFE_SLRRASG_BLDG_CODE VARCHAR2(10)
SZSLIFE_SLRRASG_ROOM_NUMBER VARCHAR2(10)
SZSLIFE_SLRRASG_BEGIN_DATE VARCHAR2(12)
SZSLIFE_SLRRASG_END_DATE VARCHAR2(12)
SLRRASG_ASCD_CODE VARCHAR2(2)
I will appreciate any help!
SLRRASG_ROLL_IND VARCHAR2(2)Thank you very much Sandeep, this works!
1 DELETE SZSLIFE_TEMP2
2 WHERE
3 SZSLIFE_SGBSTDN_TERM_CODE_EFF
4 IN
5 (SELECT SZSLIFE_SGBSTDN_TERM_CODE_EFF
6 FROM SZSLIFE_TEMP2
7 GROUP BY
8 SZSLIFE_SGBSTDN_TERM_CODE_EFF
9 HAVING COUNT(*) > 1)
10 AND
11* SZSLIFE_SLRRASG_BLDG_CODE = ' '
12 /
4 rows deleted.
The only thing here is that the SZSLIFE_SLRRASG_BLDG_CODE can not be defined as a a NULL, so I can not use
where SZSLIFE_SLRRASG_BLDG_CODE is null
Here is how those two columns are define:
SZSLIFE_SLRRASG_BLDG_CODE VARCHAR2(10)
SZSLIFE_SLRRASG_ROOM_NUMBER VARCHAR2(10)
So,
my question is it will be safe to do SZSLIFE_SLRRASG_BLDG_CODE = ' ' ?
Again, it works, it deleted the rfows that I wanted...
Thank you very much!!!
Rogelio -
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.
-
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 -
How to Delete Multiple Records using selectbox in jsf
Hi!
My Senario is I want to delete multiple records using checkbox. After selecting multiple records when i click the delete button the selected
rows shuld be deleted.if am doing like this but the edit ,delete for each row functionality is not working.
<h:selectBooleanCheckbox id ="bcb" value="#{item.empno}">
</h:selectBooleanCheckbox>
But other functionality is not wokring.
Can any one plz tell how to select the multiple records and how to send the id to the serverside.
I want code code for jsp and as well as backingBean how to accaess .
Any Reply shuld be apreciatedYou may find this article useful as well: http://balusc.blogspot.com/2006/06/using-datatables.html
Check the chapter "Select multiple rows" for two generic ways to select multiple rows in a datatable.
Maybe you are looking for
-
I did my ios7 update and lost all my old text messages, how do I get them back?
I did my ios7 update and lost all my old text messages, how do I get them back?
-
Adobe Updater don't update Acrobat Pro 9.
Hello, Adobe Updater don't update Acrobat Pro 9. It seems that Acrobat don't appears under Adobe Updater, it appears all others Creative Suite CS4 applications but not Acrobat. I dont know how to fix this. Is there any wahy to manually add Acrobat to
-
Switching between documents in Pages
I am in the habit of working with multiple Pages documents at once and must manually click "Window" to move to the other document. I know that if I need to switch to another application I can use "Command + Tab", however is there a way to switch betw
-
How to set classpath for classes in war files
Hi All, After deploying the WAR file I could access the JSP files but gives classnotfound exception when the information is expected from the java servlet.DO I need to set the classpath if yes how to do for the war file. thanks
-
Only year not full date in ABAP HR
i need only year to be selected by the user on selection screen. do anyone know any function which only gives year .