How to Delete a Specific Cell in a Matrix + plz Give sample code for Lost F

hello there !!!!
i m in Great Trouble please help me out..
i have to search for a specific Column n then i have to validate that portion, similarly after validating i have to add update delete all the fuction apply... so please help me i m very upset.
Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
        Try
            Dim Count As Int32
            If FormUID.Equals("Allowance") Then
                If (pVal.BeforeAction = True) And (pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                    If pVal.Row = 0 Then
                        'BubbleEvent = False
                    End If
                    o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                    Count = o_Matrix.RowCount()
                    SBO_Application1.MessageBox("Matrix Count is " & o_Matrix.RowCount)
                    Validate(pVal, EventEnum, FormUID, BubbleEvent)
                End If
            End If
        Catch ex As Exception
            SBO_Application1.MessageBox(ex.Message)
        End Try
    End Sub
    Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
        Dim Row, ii As Integer
        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
        o_Matrix.FlushToDataSource()
        Try
            For Row = 2 To o_Matrix.RowCount
                StrName = Convert.ToString(DBtable.GetValue("CardCode", Row - 1)).Trim()''' i got Error over there n rest of my code is also not working pls...
                StrUId = Convert.ToString(DBtable.GetValue("U_AlwID", Row - 1)).Trim()
                StrEnter = Convert.ToString(DBtable.GetValue("U_SupEnter", Row - 1)).Trim()
                StrExist = Convert.ToString(DBtable.GetValue("U_SupExist", Row - 1)).Trim()
                If Row - 1 < DBtable.Rows.Count - 1 Or (Not (StrName.Equals(String.Empty) And StrUId.Equals(String.Empty) And (StrEnter.Equals(String.Empty) Or StrExist.Equals(String.Empty))) And (Row - 1 = DBtable.Rows.Count - 1)) Then
                    If (Not StrName.Equals(String.Empty)) And ((StrUId.Equals(String.Empty) Or StrEnter.Equals(String.Empty)) Or StrExist.Trim.Equals(String.Empty)) Then
                        SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                        BubbleEvent = False
                        Exit Sub
                    End If
                    For ii = Row To DBtable.Rows.Count - 1
                        If Convert.ToString(DBtable.GetValue("ColName", ii)).Trim().Equals(StrName.Trim()) Then
                            SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Duplication Not Allowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
                            BubbleEvent = False
                            Exit Sub
                        End If
                    Next
                    If CDbl(StrName) < 0 Then
                        SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                        BubbleEvent = False
                        Exit Sub
                    End If
                End If
            Next Row
        Catch ex As Exception
            SBO_Application1.MessageBox(ex.Message)
        End Try
    End Sub

Hello there
sir i want to Add Update and delete these three basic operation onto the Matrix, Sir u game me a Sample code of Delete a specific Column...
Sir can u do me a favour pls leave every thing n just told me how to update a matrix ,like i have to fill the matrix field through the DATABASE table now i want to update the DataBase table from the matrix..
i just only know thta i have to fill back database table with the help of FLUSHTODATABASE()
here is my Sample Code...n i have to update in the validate portion...
Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
        Try
            Dim oCellValue As SAPbouiCOM.EditText
            If FormUID.Equals("Allowance") Then
                If (pVal.ItemUID = "MatAllow") Then
                    If pVal.Row = 0 Then Exit Sub
                    o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                    If (pVal.Row > o_Matrix.RowCount) Then Exit Sub
                    oForm = SBO_Application1.Forms.Item(FormUID)
                    If (pVal.ItemUID = "1" Or EventEnum = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        If pVal.ColUID = "ColName" And pVal.BeforeAction = True Then
                            If pVal.Row = 0 Then Exit Sub
                            oCellValue = CType(o_Matrix.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific(), SAPbouiCOM.EditText)
                            If (oCellValue.Value.Trim().Equals(String.Empty) And o_Matrix.RowCount <> pVal.Row) Then
                                SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Blank Value Not Allowed", )
                                oCellValue.Active = True
                                BubbleEvent = False
                                Exit Sub
                            End If
                        End If
                    End If
                End If
            End If
            Validate(pVal, EventEnum, FormUID, BubbleEvent)
        Catch ex As Exception
            SBO_Application1.MessageBox(ex.Message)
        End Try
    End Sub
Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
        Dim str, str1 As String
        Dim checkbox1, Checkbox2 As SAPbouiCOM.CheckBox
        Dim o_Matrix As SAPbouiCOM.Matrix
        Dim Sum As Integer
        Dim oRecordset As SAPbobsCOM.Recordset
        Dim Container As Integer
        Dim Count As Int32
        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
        oRecordset = o_CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
        Try
            For Count = 0 To DBtable.Rows.Count - 1
                CodeFill = Convert.ToString(DBtable.GetValue("Name", Count).Trme())
                NameID = Convert.ToString(DBtable.GetValue("ColUID", Count).Trim())
                Price = Convert.ToString(DBtable.GetValue("ColPrice", Count).Trim())
                Quantity = Convert.ToString(DBtable.GetValue("ColQuant", Count).Trim())
                Total = Convert.ToString(DBtable.GetValue("ColTotal", Count).Trim())
                checkbox1 = o_Matrix.Columns.Item("ColSEnter").Cells.Item(Count).Specific
                Checkbox2 = o_Matrix.Columns.Item("ColSExist").Cells.Item(Count).Specific
                If (checkbox1.Checked = True) And (Checkbox2.Checked = True) Then
                    Dim Sql As String
                    Sql = "Update [@Supplier] Set U_Price=' " & Price & " ',U_ID=" & NameID & "Where Name ='" & CodeFill & " '"
                    oRecordset.DoQuery(Sql)
                End If
            Next Count
            SBO_Application1.MessageBox("Record was Updated")
        Catch ex As Exception
            SBO_Application1.MessageBox(ex.Message)
        End Try
    End Sub

Similar Messages

  • How to print a specific cell in numbers

    how to print a specific cell in numbers?

    Copy the cell (contents), Paste onto a page of a separate document, or onto a separate sheet of your Numbers document, Print.
    Or insert a single cell table onto your Numbers document, type an = sign in the cell then click on the cell you want to print. Drag the new table to a second sheet, set up your page there, and print.
    See the Numbers '09 User Guide for other useful tools and techniques. Download the guide via the Help menu in Nuimbers.
    Regards,
    Barry

  • How can I link specific cells in two different speadsheets so the data from a specific cell in spreadsheet A automatically updates in a specific cell in spreadsheet B. It works in Xcel- Any ideas?

    How can I link specific cells in two different tables so the data from a specific cell in table A automatically updates in a specific cell in table B? It works in Xcel- Any ideas?

    (1) your title ask the way to link different spreadsheets.
    In Numberland, a spreadsheet is an entire document.
    There is no way to link different documents.
    (2) in the message, you ask the way to link different tables.
    This feature is available and is described in iWork Formulas and Functions User Guide (which is available for free from the Help menu).
    Getting the info just requires a simple search in this available resource !
    Yvan KOENIG (VALLAURIS, France) 14 mai 2011 10:37:50

  • How can I disable/enable specific cell on the matrix?

    Hi,
    Please help me, how can I disable/enable specific cell on the matrix?
    Regards,
    vinoth

    Hi,
    Do you want to control by sdk?
    If yes, then you can use CommonSetting property.
    Try this,
         Dim oMatrix As SAPbouiCOM.Matrix
               Dim oRowCtrl As SAPbouiCOM.CommonSetting
               oMatrix = frm_id.Items.Item("mat_id").Specific
               oRowCtrl = oMatrix.CommonSetting()
               oRowCtrl.SetCellEditable(1, 2, False)
    Regards,
    silambu

  • How to get the selected cell in a Matrix.

    Hi all,
    Does any one know how to get the selected cell in a Matrix. Please help to answer. Thanks in advance.
    Regards,
    Thanh Tran

    Hi,
    You can get the value of every cell  using UI API but using datasources is a better aproach.
    Using UI API you need to know the event you want to catch. Example: Catching click event in itemcode column and getting the value (C#):Ki
          if ((pVal.EventType == BoEventTypes.et_CLICK) &&  //CLICK EVENT
              (pVal.ItemUID == "38")  &&                                       //MATRIX-> ITEM 38
              (pVal.ColUID == "1") &&                                           //ITEMCODE COLUMN
              (!pVal.InnerEvent) &&                                
              (!pVal.BeforeAction))
                    Form form = null;
                    try
                        form = kernel.Application.Forms.Item(pVal.FormUID);
                        form.Freeze(true);
                        Matrix mtx = (form.Items.Item(pVal.ItemUID).Specific as Matrix);  //MATRIX OBJECT
                        string itemCode = (mtx.Columns.Item("1").Cells.Item(pVal.Row).Specific as EditText).Value.Trim();  //itemcode = VALUE OF CELL. COLUMN "1": ITEMCODE COLUMN. CURRENT ROW: pVal.Row
                    catch (Exception ex)
                        kernel.Application.MessageBox("Error " + ex.Message, 0, "", "", "");
                    finally
                         if (form != null)
                            form.Freeze(false);
    Kind regards,
    Nauzet Díaz

  • How do I sort specific cells without affecting entire rows?

    In Excel I can sort specific cells ascending/descending and only what I highlight will sort.
    In Numbers, when I try to do that the entire row sorts.
    Is there a way to only sort the highlighted cells and not have the rest of the rows sort as well?

    Here's a link (Dropbox download) to a Copy Sort Acending service, that in your menu would look similar to this:
    To use it, select the cells you want to sort, just as in Excel, and make the choice from the menu.
    After that, unlike Excel, click once in the first cell where you want the sorted values to start appearing (either the original range, or a different range if you want) and type command-v or option-shift-command-v to paste.
    The one-time installation takes a double-click on the .workflow package and a click on 'Install'. You may also have to go to System Preferences > Security & Privacy and click 'Download anyway'.  Installing simply moves the service to your Library > Services folder so that it will appear in your menu. It does nothing to the innards of your Mac, and does not run unless you specifically tell it to by choosing it from the menu or running it from within Automator. You can view the script by opening it in Automator.  You can remove the service if you don't need it by holding down the option key in Finder, choosing Go from the menu and navigating to Library > Services, where you can delete it the way you would any other folder or package.
    SG

  • How to select a specific cell in a JTable?

    Hi there,
    in a JTable, I would like to select a specific cell (to highlight it) from a JButton.
    Here a sample code...
    Who could help me to fill it?
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TableSelection{
        public static void main (String args[]) {
          JFrame frame = new MyFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.show();
    class MyFrame extends JFrame{
      public MyFrame(){
        setTitle("TableSelection");
        setSize(WIDTH,HEIGHT);
        DefaultTableModel myModel = new DefaultTableModel(2,2);
        JTable myTable = new JTable(myModel);
        myTable.setCellSelectionEnabled(true);
        JButton button00 = new JButton("select 0,0");
        button00.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent event){
         System.out.println("selection of cell (0,0)");
         //--- what code is required to select the cell(0,0)?
        JButton button11 = new JButton("select 1,1");
        button11.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent event){
         System.out.println("selection of cell (1,1)");
         //--- what code is required to select the cell(1,1)?
        Box myBox = new Box(BoxLayout.Y_AXIS);
        myBox.add(new JScrollPane(myTable));
        myBox.add(button00);
        myBox.add(button11);
        getContentPane().add(myBox, BorderLayout.CENTER);
      private static final int WIDTH=200;
      private static final int HEIGHT=200;
    }Thanks a lot for your help.
    Denis

    Use the addColumnSelectionInterval(int index1, int index2)method ~ http://java.sun.com/j2se/1.4/docs/api/javax/swing/JTable.html#addColumnSelectionInterval(int,%20int)
    and the addRowSelectionInterval(int index1, int index2) method ~ http://java.sun.com/j2se/1.4/docs/api/javax/swing/JTable.html#addRowSelectionInterval(int,%20int)
    Hope that helped.
    afotoglidis

  • How to delete the saved score in a game downloaded from app store for my macbook and restart the game from the beginning ? please help

    HOW to delete the saved score in a game downloaded from the app store to restart the game from the begining with fresh scores.
    i am unable to do so. please help

    In system preferences, create a new account again, using the short name of the "deleted" account. You may be prompted to re-use the old home folder. Log out and log in to test it worked. Then log in as your new admin, and do the delete process again. Don't choose to securely delete this time - just a regular delete.
    When you have time to spare, go to Disk Utility, and use the Erase tab to securely erase free space on the drive. This will accomplish the same thing that your originally tried to do. Use the fastest method - anything more secure is a waste of time. You may need to run it overnight - it can take several hours.
    Matt

  • How to give t-code for Query in SQVI

    Hi
    how to assign t-code for the query written in SQVI
    Regards
    Smitha

    Hi Smitha
    1>go to SQVI t code and  enter your query name and press enter
    2>In the menu path select Quick view--> additional functions-->Generate Program
    3>After Generating the program In the menu path select Quick view--> additional functions-->Display report Name
    4>Now in se38 enter the report name in Program field and execute
    5>You will get the Initial Selection screen of the report . Go to Menu of System -->Status
    6> Note down the Program name and Screen number
    7>Go to SE93 and Create a Z tcode for the query, Enter the description  and importantly you have to select the 2nd Option radio Button Program and Selection Screen (Report Transaction) and Press enter
    8>In the next screen enter the Report name In Program field and enter the screen number
    9>In the classification Section select Professional user  Transaction
    10>In GUI support section select all the options  i.e SAPGUI for HTML,Java,Windows
    and save
    the system will ask for Package select your package if not there then select local object
    now execute the Z tcode your report will run sucessfully
    Regards
    Vijay hebbal

  • How to delete/remove specific, unwanted autofill entries

    I mistyped an entry (e.g., my name) in a specific field on a form I use often. Now, each time I begin to type my name in this field, it offers the previously mistyped entry as an option.
    Question: How do I delete the unwanted mistyped entry as an option?
    For example, in Firefox this is possible by highlighting the typo and then selecting Shift-Command-Delete. The mistyped entry is forgotten.

    HI,
    From the Safari Menu Bar click Safari/Preferences and select the Autofill tab.
    Click the Edit button next to Other forms, select the the data you want to remove and click Done.
    Relaunch Safari.
    Carolyn

  • How to delete my old cell number on iphone

    How do I delete my old number to stop getting imessages from old number.  Someone else has my old number and Im getting his messages:/ I tried to go to account settings on itunes but it doesnt show my old number. My devices show the cell number but no option to delete it. Thank you in advance:)

    Which model phone do you have?    Because 7.1 doesn't work on a 3G, nor does iMessage.

  • How to delete Product Specific Transportation Lanes?

    I'm trying to delete a product specific transportation lane (like you would do in /SAPAPO/SCC_TL1)
    but can't find an appropriate BAPI to help me do this.  I see BAPI_TRLSRVAPS_DELMULTI but that seems to delete the entire Transportation Lane instead of a specific product's lane.
    I've tried using BDC with /SAPAPO/SCC_TL1 but don't think it'll work since it's an ALV and I'll be running in background.
    Anyone encountered this before?
    thanks!
    Paul

    Hi
    Do following steps:
    Go to SE38
    FUNCTION_LOADER_INLAY  execute (F8)
    Step 1
    u2022     Go to the Design  tab page. IN the Name of Put Function Module field, we enter the function module name BAPI_PIRSRVAPS_SAVEMULTI.
    u2022     Press Enter and the Available Parameters table on the left side of the screen is filled automatically.
    u2022     Select the lines Logical System, Commit_Conrol, Planning Version, Requirements and Return.
    u2022     Choose Column Right to transfer the parameters to the  Selected Parameters  table on the right side of the screen.
    u2022     Choose Format Worksheet.
    u2022     Confirm the dialog box that informs you about manual formatting the cells. The system directly opens the Data tab page.
    u2022     Now select the entire worksheet, right-click in the selected area and choose Format Cells.
    u2022     In the  Number tab page we select the category Text and choose  OK.
    Step 2
    In the first available empty line the make the following entries (for every cell you can find additional information about data you have to enter by selecting Input Help):
    u2022     Logical System: APO Logical sys name
    u2022     Commit_Control: E
    u2022     Planning version: 000 (whether data is being transferred to the active planning version or to a simulation version)
    u2022     Product:
    u2022     Location:
    u2022     Location Type:
    u2022     Atpcat: FA
    u2022     Date from: e.g. 01.05.2006 (Valid from)
    u2022     Date to: e.g. 01.21.2006 (Valid to)
    u2022     Quantity: 419
    u2022     UOM: KG (unit of measure)
    u2022     UOM_ISO: KG
    We choose Save.
    Confirm the information prompt.
    (It is very important that we select row with data we need to load)
    Then We now choose button u201CSAP SYSTEMu201D
    After sometime you see the message u201CData Transfer ended successfully appearsu201D
    Now go to Product view  /n/SAPAPO/RRP3 and check Fcst loaded.
    Cheers!
    SCMBEE

  • How to delete a specific file type from a folder

    Hi,
    I have folders with lots of zip or rar files, once I decompress those I want to delete the compressed files specifically. Is there any way I could manage that through Automator?
    Thanks in advance.

    Thanks Niel for the script, unfortunately I am too ignorant about running these on my own, I did save it in my user script library, but I would need instructions to run it. I would be really grateful.
    I did try making up my own workflow using the given actions in Automator, the first action was to 'find specific files in finder' ending with .zip and .rar and then choosing another action which 'moves selected files to trash'. Unfortunately it ended up running only if I specify the path to the specific .zip file, which defeats the purpose. Any suggestions on the proposed workflow? Thanks in advance.

  • How to delete formula from cells and keep the values in Excel VBA

    Hi,
    In my Excel I have 15 columns. In column F which has a formula (INDEX MATCH), it has contains "RECEIVED" and "INTRANSIT". I need to filter the column F for all "RECEIVED" and then remove the formula from cells and
    retain or keep the values that are already in the cells. something tricky and i'm not sure on how to work on this in Excel VBA.
    Below is my initla VBA code:
    I already have the codes on how to filter. kindly please help me on how to do this. thank you in advance.
    Sub test_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Dim rng As Range
    Dim lrow As Long
    Set wb = ThisWorkbook
    Set ws = wb.Sheets("Intransit_")
    Application.ScreenUpdating = False
    ws.AutoFilterMode = False
    With ws
    lrow = .Range("F" & Rows.Count).End(xlUp).Row
    Set rng = .Range("A1:R" & lrow)
    Debug.Print rng.Address
    rng.AutoFilter Field:=6, Criteria1:="RECEIVED"
    End With
    Application.creenUpdting = True
    End Sub

    Solved.
    Sub test_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Dim rng As Range
    Dim lrow As Long
    Dim rRec As Range
    Dim btField As Byte
    Set wb = ThisWorkbook
    Set ws = wb.Sheets("Intransit_")
    btField = 6
    Application.ScreenUpdating = False
    ws.AutoFilterMode = False
    With ws
    lrow = .Range("F" & Rows.Count).End(xlUp).Row
    Set rng = .Range("A1:R" & lrow)
    With rng
    .AutoFilter Field:=btField, Criteria1:="RECEIVED"
    On Error Resume Next
    Set rRec = .SpecialCells(xlCellTypeVisible)
    On Error GoTo 0
    End With
    .AutoFilterMode = False
    If Not rRec Is Nothing Then
    With rRec
    .Columns(btField).Value = .Columns(6).Value
    End With
    End If
    End With
    Application.ScreenUpdating = True
    End Sub

  • How to delete a specific request from ODS

    Hi all,
    We have an ODS which we're loading invoices from legacy system. In legacy system, there are two tables for invoices. First one is daily records which is archived on last day of each month. As you guess, second table is  for archive records. We need all of the records from  both tables. Because of performance issue , we don't want to load both tables everyday . So we created two transformation. Since there is no delta option, we need to delete the first table request from data targets before extraction. And delete the request from the second table only last day of month. We're created process chain. But there is no option for deleting only the request from a specific data source or transformation. Are there any solution for this?
    thanks,
    Yigit

    Hi,
    Thanks for your code. But is there any function module to delete most recent request from the ODS.
    I had 2 requirements...One in need to delete from ODS & Other one from Cube.
    FM - 'RSSM_DELETE_REQUEST' will be used to delete from Cube only.
    Can please you send FM & ABAP Code to delete request from ODS.
    Thanks in advance.
    Yigit
    Message was edited by:
            Yigit

Maybe you are looking for

  • When you run windows 7 using bootcamp, are you able to run Command Prompt as you would on a regular pc?

    Because I want to be able to do things like Visual Basic and run programs,codes,etc. I just don't want to get a PC. I'm studying Computer Science and I know most of the things I will be dealing with will mainly be with Windows OS is why I'm asking. T

  • CN 752: Requirement quantity & & smaller than quantity withdrawn & &

    Dear Gurus, I have found a strange behavior in SAP PM order processing. Even after withdrawing the spare parts, system is allowing to change the required quantity. If someone is increasing the quantity thats fine. But if someone is decreasing the qua

  • Adobe Acrobat 11 pro includes form central?

    Hi, I am buying adobe acrobat 11pro, and I think it includes form central templates, if I wanna create conditional based form which I think PDF doesnt support, and I dont want to embed the form into website, so what are my options. 1. I want to creat

  • Photoshop Elem 5.0 EULA agreement declined or invalid

    I have had this software for a few years - apparently it is VERY VERY OLD, according to the technical department at Adobe.  But it was working fine and I like it.  I don't want to be forced to upgrade. It now starts up with an license agreement - acc

  • IPhoto email template missing,

    I am using iphoto '11 and email photo from within. The "classic" and "Journal" template are missing. They used to exist but are blank now. When trying to use them anyway to send photo the photo are attached but not showned in the mesage body. I tried