Save data from a bounded matrix

Hi!
I have a matrix bounded to a UDO table. This matrix is filtered by a Condition object. Which is the best way to update records to the database?
Best regards,
Jose

I had these problems too but didn't find another way yet.
Maybe any user with more experience can answer here.
The way i did it was this:
I queried the information from the UDO with a RecordSet object. Then I went throug it, line by line, and filled the UDSs that were bound to the colums of my matrix and added the line to the matrix. In one hidden column I wrote the uniq key to be able to update this line in the UDO after it had been changed.
I think that this is not the best solution but it worked for me, very slow, but it worked.

Similar Messages

  • Save Data From Grid to Database

    Hello All,
    I want to create a form to save data from a grid to the database just like the SAP Forecast Form .
    My requirements are as follows :-
    I have created a Table  in which there are three fields ItemCode,Date,Qty
    But while entering user will first select the Date ranges (from - To) and based on that date range
    no. of columns will be created as it will be dynamic and then user will enter the corresponding quantity for that item and date
    just like the Sales Forecast (SAP) Form .
    Form will be like :-
    From Date - 10/10/11  ToDate - 13/10/11
    Row Levels Fields :-
    ItemCode    10/10/11  11/10/11  12/10/11  13/10/11
    A0001           100           150          200            300
    While updating system will put the  data in database table as :-
    ItemCode        Date             Quantity
    A0001            10/10/11          100
    A0001             11/10/11          150
    A0001             12/10/11          200
    A0001              13/10/11          300
    This is what i want to do .
    Please suggest how to proceed with this using a Matrix or a grid.
    Thanks & Regards,
    Amit
    Edited by: AmitSharma_061985 on Oct 19, 2011 7:08 AM

    Hi, 
       If you are doing it with oops concept then here are the steps for that.
    1) Declare DATA : er_data_changed TYPE REF TO cl_alv_changed_data_protocol,
           data_changed TYPE REF TO cl_alv_changed_data_protocol.
    --For getting the row no of of the row which is edited by user
    DATA : ls_mod_cell TYPE table of lvc_s_modi with header line,
    lv_value TYPE lvc_value .
    in your program
    2) Define a class
    CLASS notification DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS : handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
    ENDCLASS.                    "NOTIFICATION DEFINITION
    3) For that class write the implementation
    CLASS notification IMPLEMENTATION.
      METHOD handle_data_changed.
        PERFORM handle_data_changed USING er_data_changed.
      ENDMETHOD.                    "handle_data_changed
    ENDCLASS.                    "NOTIFICATION IMPLEMENTATION
    4) In the  PERFORM handle_data_changed  you code like this
    FORM handle_data_changed  USING er_data_changed type ref TO
    cl_alv_changed_data_protocol.
    SORT er_data_changed->mt_mod_cells BY row_id .
    LOOP AT er_data_changed->mt_mod_cells
    INTO ls_mod_cell .
    append ls_mod_cell.
    ENDLOOP.
    *LS_MOD_CELL will have all the rows which were edited
    and all the updated data corresponding to those rows*
    You can now use the the data which is in LS_MOD_CELL
    to update into your DB Table.
    LOOP at ls_mod_cell.
      READ TABLE itab3 INTO t_output INDEX ls_mod_cell-row_id.
    ENDLOOP.
    ENDFORM.                    " handle_data_changed
    Regards,
    Syed

  • How to save data from form into database

    i nid to save data from form into the new table, @abc.
    got any idea ?
    smtg like oObj = BaseAddOn.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes) this but it is a new object or user data source.
    Thanks

    hi
    i have created UDO i have also done registration  i want to bind item master completely to matrix and then in one column i will set check box to check unchecked and then i want to save it to database
    i have one user defined form and 4 matrix and 4 child tables
    for each matrix i have given 1 form and i have to transfer the data from temp form to main form matrix having large data in matrix on temp form to main form matrix
    to load data on matrix i have used for loop that i want to avoid so how i can bind large data to matrix without for loop
    regards
    amey

  • Copying save data from a PS3 to another PS3?

    Hi, Is there a way to copy/transfer a save data from one PS3 to another, without using PS+ cloud save?
    Please reply ASAP.

    I am using version 8.2, and it doesn´t allow me to sabe in 7.1
    So, I send you the screen shot of blocks diagram.
    Thank you in advance.
    Attachments:
    screenshot.PNG ‏36 KB

  • How save data from the one row of db to the one cell of excel sheet

    hi
    how to save data from one row of db to the one cell of excel sheet and so on..............

    hi,
    see this link
    http://poi.apache.org/hssf/quick-guide.html
    Regards,
    Ram

  • Save data from matrix in folder, on 2nd pane level

    Hi all, having some trouble saving data from a matrix located on the second pane level of a folder. There are 2 matrix in the folder, located on panel 1 and 2 respectively. Data from the matrix on level 1 saves to the database, but the data from pane 2 does not. Both folders and matrix are databound to a dbdatasource.
    Any ideas?
    Ta guys,
    Tjaard.

    Hi there Sebastien, thanx for the interest. Yeah i'm using a user defined tables connected to a user defined object. The matrixes are bound to the user defined tables via a dbdatasource. Each matrix is bound to a seperate child ("Lines") table which, in turn, is connected to a single parent ("Header") Table. This header table is the one connected to a UDO.
    The data from matrix A (the one that works) are saved to the database via the datasource, and flushtodatasource methods.

  • How to Save data from HR_INDVAL BADI

    hI
    I M USING THE ABOVE BADI FOR CALCULATION OF BONOUS FOR INFOTYPE 15  .... IT IS CALCULATING VERY WEL BUT DATA IS NOT GETTING SAVE IN PA0015 .
    KINDLY HELP ME
    REGARDS
    AMMAD

    hi
    i have created UDO i have also done registration  i want to bind item master completely to matrix and then in one column i will set check box to check unchecked and then i want to save it to database
    i have one user defined form and 4 matrix and 4 child tables
    for each matrix i have given 1 form and i have to transfer the data from temp form to main form matrix having large data in matrix on temp form to main form matrix
    to load data on matrix i have used for loop that i want to avoid so how i can bind large data to matrix without for loop
    regards
    amey

  • How to Save Data from DataGrid to Excel Sheet?

    Hi All,
    I am trying to use Adobe Flex 3.0 for making web pages.
    I want to save the data from DataGrid and Advanced DataGrid of Adobe Flex 3.0 to Excel Sheet file. I am trying Flex Help, but didn't find answer for it.
    In the application there is a button for 'save' by pressing which the 'Save As' window should appear.
    And giving the path to the '.xls' file, the data from DataGrid should be saved on that location in .xls format.
    This is my requirement.
    If anybody knows how to do this please help.
    Thank You,
    Sharad

    Hi
    Using document.applet.saveAsCSVFile(); code you can not get data in proper format.
    For  one of my application i have stored the data from Grid to excel.
    But i am not sure about Adobe Flex 3.0, my code will work or not.
    Also you need to make the "Initialize and Script Activex Control Not marked as Safe" as enabled in your IE.
    You can share ur email. So that i can send the code. Here I am not able to paste the code.
    Thanks

  • Save data from a presentation to the BPMObject without moving.

    Hi there!
    This is the actual problem.
    I have an interactive activity calling a presentation with the data from a BPMObject called Person.
    The fields are editable and the user can change them.
    What I want it's a button to save those changed fields into the original BPMObject without having to close the window.
    In the case that this were impossible and a submit were necessary I don't want to move the instance from the actual state so the user could open it again and modify all fields that he wants.
    Is this possible? Is there any way around?
    Thanks!

    You can do tis with the predefined variable action, with action.REPEAT the result is what usually is achieved with a Save button in a form that I think is what you are looking for. Also with action.REPEAT you do not pass to the next activity and the data is saved.
    Hope it helps
    Edited by: ruben.vidaurre on 08-abr-2009 5:08
    Edited by: ruben.vidaurre on 08-abr-2009 5:11

  • How to save data from a waveform chart to a file?

    Hi! I have a question:how to save a real time data from a waveform chart? attachement is a example,how can i do to save the data from 0 second to 25 seconds to a file ?thanks!
    Attachments:
    example.vi ‏23 KB

    You can use a property node to get the chart history as a array. Then you can write that data to the file. The data in the array in you example can also be writen to a file. If you only wnat a portion of the data to be saved, use the Array Subset function to get the part you want.
    Lynn

  • How to save data from a server log to the java dictionary table?

    Hi,
    I need a java dictionary and a program which will read data from the log file and save records into tables.
    Can somebody help how to achieve this? Please help!
    Thanks & regards
    Amita

    Hi folks, Give some inputs here....
    Thanks & regards
    Amita

  • Save Data from other system

    Hi,
    We  have one dot net system and one java system doing our core business.
    I want to save data(which is updated daily) from these systems and save into SAP. Not flat files. I want live data sync.
    How is this possible.
    Thanks,
    Swetha

    Hi Swethan,
    I don't understand your question. If you want real-time integration then you would more than likely be using webservice communication between these systems.
    Do you have something specific that you want to understand?
    Regards, Trevor

  • Accessing  linkbutton cell data from a system matrix

    I am using the UI SDK with SBO to develop an add-in. I am trying to access data from the matrix on the Sales Order form and I am stuck where the cell type is a link button.
    I have figured out how to do it for an Edit cell and a Combobox cell using the UI SDK, but in the case of a link button, the only property available for that item type is the LinkedObject property which is a BoLinkedObject enumeration.
    How whould I get the "Item No." value for example as entered in the form's matrix by the user?

    hi,
    A linked button works the same as an edit text. Just cast the specific object of the cell in an edit text object
    In C# code this gives the following
    string val = ((SAPbouiCOM.EditText)mtrx.Columns.Item(colID).Cells.Item(row).Specific).Value;
    Yannick

  • How to save data from JTable multiple rows and columns

    Hi Y_Not thanks for your help before...
    But what should I do if I want to get/save many data from many column and rows??

    i don't quite understand your (repeated) question. what is the problem with "multiple rows and columns". Y_NOT and i have shown you ways to access them.
    all you need are 2 loops: one around your number of rows and one around the number of columns or vice versa depending in which order you want to save things:
    for (int col = 0; col < data.size(); col++) {
        for (int row = 0 ; row < data[col].size(); row++) {
            // save your data
            saveData(data[col].getElementAt(row));
            // or use yourtable.getValueAt(row, col);
    }this is not a problem of Swing/Java but of simple algorithm...
    thomas

  • Error in fetching  data from DB to Matrix

    hi everyone...i want to fetch data from Db and sisplay it on matrix..i tried  this way..but i'm not getting data..it is saying that invalid row index..what should i give at row value...
    Try
                oitem = oForm.Items.Item("8")  ''''8 is uid of matrix
                oMatrix = oitem.Specific
                oColumns = oMatrix.Columns
                rset = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                query = "select * from  [@VIDS_MGT]" '
                rset.DoQuery(query)
                oMatrix.FlushToDataSource()
            Catch ex As Exception
            End Try
            Dim i As Integer = 1
            While Not rset.EoF
                Try
                    oMatrix.AddRow()
                    oMatrix.Columns.Item("V_0").Cells.Item(i).Specific.value = rset.Fields.Item("Code").Value
                    i = i + 1
                  rset.MoveNext()
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.ToString)
                End Try
            End While
            oMatrix.LoadFromDataSource()

    Hello,Shehnaaz
    While binding data to matrix u have to use datasources
    Steps
    1.Create one datasourece
    Declare
    assign ur matrix table like this
    oDB_Row = oForm.DataSources.DBDataSources.Item("@VEDA_TC_DLN")
    2. Give here loop
    rs.MoveFirst()
            For I = 1 To rs.RecordCount
                oMatrix.AddRow()
                oDBs_Head.SetValue("LineID", oDBs_Head.Offset, oMatrix.VisualRowCount)
                oDBs_Head.SetValue("U_BobNo", oDBs_Head.Offset, rs.Fields.Item("U_BobNo").Value)
                oDBs_Head.SetValue("U_CovSze", oDBs_Head.Offset, rs.Fields.Item("U_CovSze").Value)
                oDBs_Head.SetValue("U_BrWid", oDBs_Head.Offset, rs.Fields.Item("U_BrWid").Value)
                oDBs_Head.SetValue("U_BrThi", oDBs_Head.Offset, rs.Fields.Item("U_BrThi").Value)
                oDBs_Head.SetValue("U_Flex", oDBs_Head.Offset, rs.Fields.Item("U_Flex").Value)
                oDBs_Head.SetValue("U_Adh", oDBs_Head.Offset, rs.Fields.Item("U_Adh").Value)
                oDBs_Head.SetValue("U_Elog", oDBs_Head.Offset, rs.Fields.Item("U_Elog").Value)
                oDBs_Head.SetValue("U_UTS", oDBs_Head.Offset, rs.Fields.Item("U_UTS").Value)
                oDBs_Head.SetValue("U_Hard", oDBs_Head.Offset, rs.Fields.Item("U_Hard").Value)
                oDBs_Head.SetValue("U_BDVRt", oDBs_Head.Offset, rs.Fields.Item("U_BDVRt").Value)
                oDBs_Head.SetValue("U_BDVEt", oDBs_Head.Offset, rs.Fields.Item("U_BDVEt").Value)
                oDBs_Head.SetValue("U_Scrap", oDBs_Head.Offset, rs.Fields.Item("U_Scrap").Value)
                oDBs_Head.SetValue("U_Aprvd", oDBs_Head.Offset, rs.Fields.Item("U_Aprvd").Value)
                oDBs_Head.SetValue("U_BsLineId", oDBs_Head.Offset, InsBaseRow)
                oDBs_Head.SetValue("U_BsDoc", oDBs_Head.Offset, InsBaseDoc)
                oMatrix.SetLineData(oMatrix.VisualRowCount)
                rs.MoveNext()
            Next
    3.Try to under stand setline data is very important if did nt mension set line data means that will not display any data
    Hope this will help u
    By
    Firos

Maybe you are looking for