How to save only changed data of ALV in a local table ?

Hi everyone,
I created and alv with cl_gui_alv_grid, and I made it editable
Now I need that when I click on a button only the changed data to be saved on a local (internal) table
Is there a way I can do that ?
I tried with methods like check_changed_data() but they don't return a table like that
Regards,
Dren Selimi

ok than
class lcl_event_receiver definition.
     methods:
* Handle Data Changed
     handle_data_changed
     for event data_changed of cl_gui_alv_grid
     importing er_data_changed,
endclass.                    "lcl_event DEFINITION
class lcl_event_receiver implementation.
     method handle_data_changed.
          data: ls_good type lvc_s_modi.
          loop at er_data_changed->mt_good_cells into ls_good.
               read table gt_table into gs_table index ls_good-index. "is your changed row in ALV
                ls_good-fieldname "is your changed field
               if ls_good-fieldname eq 'MATNR'.
                    gs_table-matnr " is your changed field old value.
               endif. "i couldn't find a dynamic solution for old value
               "if you do not have so many columns in alv you can use this solution
                ls_good-value "is your changed field new value
               append these values to your changed field table.
               modify gt_table from gs_table index ls_good-index.           
          endloop.
          call method g_alvgrid->refresh_table_display.
     endmethod.
endclass.

Similar Messages

  • How to save history change data on table

    Hi all
    I'm using Oracle Database 11g
    Data of tables often is changed. I want to save history person changed it.
    Anybody help me!
    Thankyou
    Thiensu2810

    Hi
    you can use
    flashback data archieve
    CREATE FLASHBACK ARCHIVE DEFAULT test_archive1
    TABLESPACE example
    QUOTA 1 M
    RETENTION 1 DAY;
    CREATE FLASHBACK ARCHIVE test_archive2
    TABLESPACE example
    QUOTA 1 M
    RETENTION 1 DAY;
    The next statement alters the default flashback data archive to extend the retention period to 1 month:
    ALTER FLASHBACK ARCHIVE test_archive1
    MODIFY RETENTION 1 MONTH;
    The next statement specifies tracking for the oe.customers table. The flashback data archive is not specified, so data will be archived in the default flashback data archive, test_archive1:
    ALTER TABLE oe.customers
    FLASHBACK ARCHIVE;
    The next statement specifies tracking for the oe.orders table. In this case, data will be archived in the specified flashback data archive, test_archive2:
    ALTER TABLE oe.orders
    FLASHBACK ARCHIVE test_archive2;
    The next statement drops test_archive2 flashback data archive:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5009.htm#SQLRF20008
    hope this helps
    Zekeriya

  • How to update changed data in alv grid.

    hi experts,
    i have a editable alv report how to update the changed data on the grid to database table when i click save.
    can anybody tell me how to do this if possible with example.
    thanks in advance.
    regards,
    venu

    The code below isn't a working program, but has most of what you should need.  Field-symbol <dyn_table> will always have what is in the grid.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>.
    DATA: pt_fieldcat TYPE lvc_t_fcat,
          ls_fcat TYPE lvc_s_fcat,
          new_table TYPE REF TO data,
          new_line TYPE REF TO data.
    CREATE OBJECT g_custom_container
          EXPORTING container_name = g_container.
    CREATE OBJECT g_grid EXPORTING i_parent = g_custom_container.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'MATERIAL'.
    ls_fcat-datatype  = 'CHAR'.
    ls_fcat-intlen    = 18.
    ls_fcat-outputlen = 18.
    ls_fcat-coltext   = 'Material'.
    ls_fcat-edit      = 1.
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'QUANTITY'.
    ls_fcat-datatype  = 'INT4'.
    ls_fcat-intlen    = 6.
    ls_fcat-outputlen = 6.
    ls_fcat-coltext   = 'Qty'.
    ls_fcat-edit      = 1.
    APPEND ls_fcat TO pt_fieldcat.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
                 EXPORTING
                    it_fieldcatalog = pt_fieldcat
                 IMPORTING
                    ep_table = new_table.
    * assign ref variable  to a field symbol
    ASSIGN new_table->* TO <dyn_table>.
    * Create dynamic work area and assign to FS
    CREATE DATA new_line LIKE LINE OF <dyn_table>.
    ASSIGN new_line->* TO <dyn_wa>.
    * data_itab is filled with data that you want in grid
    LOOP AT data_itab INTO data_wa.
      CLEAR <dyn_wa>.
      ASSIGN COMPONENT 'MATERIAL' OF STRUCTURE <dyn_wa> TO <fs>.
      <fs> = data_wa-material.
      ASSIGN COMPONENT 'QUANTITY' OF STRUCTURE <dyn_wa> TO <fs>.
      <fs> = data_wa-quantity.
      APPEND <dyn_wa> TO <dyn_table>.
    ENDLOOP.
    CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          i_structure_name              = '<DYN_TABLE>'
          is_variant                    = gs_variant
          i_save                        = 'A'
          i_default                     = 'X'
          is_layout                     = gs_layout
          it_toolbar_excluding          = gt_exclude
        CHANGING
          it_outtab                     = <dyn_table>
          it_fieldcatalog               = pt_fieldcat[]
          it_sort                       = gt_sort[].

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

  • I want to use Get Panel Image in Labview 5.0.1 and need details on how to save the BMP data generated

    I am trying to generate an application that saves a copy of its front panel on completion. This is easy to do using an invoke node with Print VI to HTML but this does not work in an .exe format. I have seen elsewhere that you have to use the Get Panel Image method, but no details are supplied in LV 5.0.1 documentation of how to use the "image" data (1-D Unsigned Byte array) that is generated. I want to save this in a format that can then be read as a bitmap in any standard graphics package. Any assistance?

    Hi,
    If you'd upgrade to LV5.1 or 6 you could use the 'standard' vi's for this.
    You need a VI called "Write BMP File.vi". It's not shipped with LV5.0.1.
    This vi only uses 3 subVI's, so perhaps someone at NI can convert it and
    send it to you (sorry, I won't, it's copywrited).
    If you cannot get this VI anywhere, you'll need to figure out the BMP file
    format yourself. It's not too complicated, but still could take some days.
    Perhaps someone figured it out before LV5.1 was released.
    Regards,
    Wiebe.
    "RDK" wrote in message
    news:[email protected]..
    > I want to use Get Panel Image in Labview 5.0.1 and need details on how
    > to save the BMP data generated
    >
    > I am trying to generate an application that saves a copy
    of its front
    > panel on completion. This is easy to do using an invoke node with
    > Print VI to HTML but this does not work in an .exe format. I have seen
    > elsewhere that you have to use the Get Panel Image method, but no
    > details are supplied in LV 5.0.1 documentation of how to use the
    > "image" data (1-D Unsigned Byte array) that is generated. I want to
    > save this in a format that can then be read as a bitmap in any
    > standard graphics package. Any assistance?

  • Displaying metadata, how to display ONLY the Date

    I would like to display the Date below each image in Aperture 3. When I select "Date" in the Browser & Viewer Metadata window, the result is a very long string with the Date, the Time and the Time Zone. meaning that most of the time I see nothing because the string is much too long to be displayed...
    How to display ONLY the Date ?
    Thank you.
    Olivier

    om28 wrote:
    I will do that but still... if the Date could be ONLY the Date "without time and time zone", I would be able to display more information.. and it will look nicer.
    I said at the top of my first response above: +Afaik, there is no way within Aperture to change the date format of the date metadata overlay.+
    Send Aperture feedback to Apple via "Aperture→Provide Aperture Feedback"
    In the past I used Expression Media and the config for displaying such info was better.
    Aperture has a strange interface for it (and for other parameters), it does not behave at all like an Apple software (for the GUI), probably an external development team... but I agree it is more complex than iPhoto.
    Aperture is 10x more complex than iPhoto.
    If you want to see a rigid, boxed, "engineer"-style image database interface, take a look at Lightroom 3. It's a great program -- but it's a very different concept of information presentation and interaction.
    Thanks again.

  • How to save the form data into adobe db?

    Hi All,
    How to save the form data into adobe db?
    I have designed one xdp file.
    Through processFormSubmission(), I got the submitted form data as Document obj.
    Then I have called the workflow kickoff program.
    code:
    InvocationRequest request = myFactory.createInvocationRequest ("myprocessname", //Specify the long-lived process name
    "invoke", //Specify the operation name
    params, //Specify input values (HashMap obj)
    false); //Create an asynchronous request
    It successfulyy started the workflow, but the submitted form data is not saved anywhere.
    And also, How get the form data from tables?
    Please provide the solution for the above.
    Thanks in advance.
    Regards,
    Saravanan G

    You need to create a process variable of type IN if you want to be able to pass data to your process. Then the params parameter (HashMap) contains a list of all the IN variables with their content that you want to pass to your process. They key is the name of the variable and the value the content. That way you should get it in your process.
    Now LiveCycle will create a column in the database for every process variable, so the content will be saved in the database just by creating that process variable.
    Jasmin

  • How to display the change data    in configruation profile for material

    dear export :
      i want to know  when  the  dependencies of material is deleted  and is added in confirgruation profile for material ,but i donnt know how to disaply the change data .
    please help me .
    best regards.

    Hi
    I don't know if the material document is managed by change document, after posting it any data can be changed in material document.
    Max

  • How to save the changes of trackpad in gest account ?

    how to save the changes of trackpad in gest account because every time that i change them and restart it, it lose the changes ...

    Hey cccosmas,
    Thanks for the question. The following article provides an answer to your question:
    OS X Mountain Lion: Set up guest users
    http://support.apple.com/kb/PH11321
    When guests log in, they don’t need a password. While logged in, they can’t change user settings or computer settings.
    Important: Files created by a guest user are deleted when the user logs out. A temporary home folder is created for the guest user’s files, but this folder and its contents are deleted when the user logs out.
    If you require these settings to be modified and retained in a secondary account, it may be best to setup a new user account:
    OS X Mountain Lion: Create a new user account
    http://support.apple.com/kb/PH11468
    Thanks,
    Matt M.

  • How to export only the data displayed in table of a jsp page to Excel

    Hi All,
    I want to export only the data that is displayed in the table of a jsp page to excel. But with my current code everything is getting exported to excel.
    <input type="checkbox" name="download" onclick = "form.submit()"/> Export to Excel
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-disposition", "inline; filename=fileName.xls");
    the table is displayed in the jsp using the following code:
    <table cellspacing="2" cellpadding="3" border="1"
    width="100%"> <tr> <%for (int i = 2; i <= cols; i++) {%>
    <td>
    <%
    out.println( rsmd.getColumnName(i) + " ");
    } %>
    <% while (rsettaba.next ())
    out.println("<tr>");
    for (int j= 2; j <= cols ; j++) {
    //out.println("<td>"+rsetallcl.getString(j)+"</td>");
    String varnl = rsettaba.getString(j);
    if ( varnl == null )
    out.println("<td> Empty </td>");
    else
    out.println("<td>"+rsettaba.getString(j)+"</td>");
    out.println("</tr>");
    %>
    </td>
    </tr>
    </table>
    please can anyone help how to just extract only the data in the table of a jsp page to excel.
    Edited by: Ramky48 on Dec 9, 2009 9:51 PM

    Ramky48,
    Why did you open a new thread when you had gotten quite a few responses and suggestions on the [url http://forums.oracle.com/forums/thread.jspa?threadID=998411]thread where you asked the same question - seems the best thing to do would be to continue on the same thread?
    However, your question has nothing to do with JDeveloper/ADF. If you'd like to do it the ADF way, it's trivially easy - you can use the [url http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e12419/tagdoc/af_exportCollectionActionListener.html]af:exportCollectionActionListener component, which does what you are asking for. If you want to use a straight JSP way, there were several good suggestions in the other thread you opened, or Googling "jsp export to excel" will get you about 4.6 million hits; the first 10 or so look pretty promising.
    John

  • How to populate field catalogue fields in ALV using  dynamic internal table

    Hi All,
    Please let me know how to populate field catalogue fields in ALV using  dynamic internal table.
    I have created <dyn_table> using code below.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
                     EXPORTING
                       it_fieldcatalog = g_t_ifc
                        it_fieldcatalog = g_t_fieldcat
                     IMPORTING
                        ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    Now this  <dyn_table>  has fields like idoc no.,creation date ,
    segment field 1, segment field 2 etc..Now idoc no.,creation date  are static fields from table EDIDC. And segment field 1, segment field 2 etc are dynamic fields from table EDSAPPL.
    In my  ALV report I am getting the final layout properly but I am unable to move values to corresponding fields in the final layout shown.Please let me know how to populate these fields from different tables.
    I tried this way but its not working.
    SORT g_t_edid4 BY docnum.
      LOOP AT g_t_edidc INTO g_r_edidc.
        READ TABLE g_t_edid4 into g_r_edid4
                         WITH KEY docnum = g_r_edidc-docnum
                                        BINARY SEARCH.
        IF sy-subrc = 0.
          <dyn_wa> =  g_r_edid4-sdata.
         MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
       CLEAR g_r_edid4.
        ENDIF.
    MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
    APPEND <dyn_wa> TO <dyn_table>.

    You have to assign each field to field symbol and then assign the value to that field symbol and asssign that field symbol to workarea field symbol.
    LOOP AT g_t_edidc INTO g_r_edidc.
    READ TABLE g_t_edid4 into g_r_edid4
    WITH KEY docnum = g_r_edidc-docnum
    BINARY SEARCH.
    IF sy-subrc = 0.
    ASSIGN COMPONENT 'SDATA' OF STRUCTURE <DYN_WA> TO <DYN_FLD>.
    <DYN_FLD> = g_r_edid4-sdata.
    " <dyn_wa> = g_r_edid4-sdata.
    " Assign each fields like this.
    " MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
    CLEAR g_r_edid4.
    ENDIF.
    " MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
    APPEND <dyn_wa> TO <dyn_table>.
    Regards,
    Naimesh Patel

  • How can i export the data to excel which has 2 tables with same number of columns & column names?

    Hi everyone, again landed up with a problem.
    After trying a lot to do it myself, finally decided to post here..
    I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
    It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
    Because both the tables have same number of columns & column names.
    Below are 2 tables with column names:
    Table-1 (MONTHLY_PART_1)
    Table-2 (MONTHLY_PART_2)
    SL_NO
    SL_NO
    COMP
    COMP
    DUE_DATE
    DUE_DATE
    U-1
    U-1
    U-2
    U-2
    U-4
    U-4
    U-20
    U-20
    U-25
    U-25
    Since both the tables have same column names, I'm getting the following error :
    Error 402 at line 103, column 4
      alias required in SELECT list of cursor to avoid duplicate column names.
    So How can i export the data to excel which has 2 tables with same number of columns & column names?
    Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
    Help me with this please.
    Thank You.

    You'll have to *alias* your columns, not prefix it with the table names:
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
      for rData in cData loop
    ERROR at line 18:
    ORA-06550: line 18, column 3:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
    ORA-06550: line 18, column 3:
    PL/SQL: Statement ignored
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
    PL/SQL procedure successfully completed.
    cheers

  • How can i stop transfer data to Trfc queue from a table datasource.help!!!

    how can i stop transfer data to Trfc queue from a table datasource.
    I create a incorrect view datasource in R3 with wrong join condition,it contain so large data,i want to stop it collect data to sm58.otherwise the system will be ...
    i can't find helpful infrmation in sm50 .
    in sm37 has a canceled job
       Job                              Ln Job CreatedB Status          Start date Start time Duration(sec.) Delay (sec.)
       BIREQU_4EFQCFFUQL5ZOAWYOK2L0YCMF    ALEREMOTE    Canceled        2009-07-10 16:38:59         101,869            0
    plesse help me 。

    Hi,
    You paste the job name in source system in
    Tcode :Sm37
    Job name as :BIREQU_4EFQCFFUQL5ZOAWYOK2L0YCMF
    User:*
    Go to job details and get the PID no ,on which application number it is runnug
    GO to sm51 ,here you will find the application servers,Select the appriate app server go to that PID.
    On left top most you will find option as cancel with out core ..
    OR
    Ask basics team do the same.
    Regards,
    Suman
    Edited by: suman on Jul 13, 2009 12:56 PM

  • How to get changed data in ALV in Web Dynpro for ABAP

    METHOD on_data_check .
    DATA:
        node_spfli                          TYPE REF TO if_wd_context_node,
        node_sflight                        TYPE REF TO if_wd_context_node,
        itab_sflight2                        TYPE if_display_view=>elements_sflight.
      node_spfli = wd_context->get_child_node( name = if_display_view=>wdctx_spfli ).
      node_sflight = node_spfli->get_child_node( name = if_display_view=>wdctx_sflight ).
      CALL METHOD node_sflight->get_static_attributes_table
        IMPORTING
          table = itab_sflight2.
    this code is ..get all data(changed and not changed)
    but i want get changed data only, not all data.
    how to get changed data?
    Edited by: Ki-Joon Seo on Dec 27, 2007 6:04 AM

    Hi,
    To get only the changed data in the ALV grid of a WD, you need to capture the "ON_DATA_CHECK" of the ALV grid.
    To this please do the following in the ALV initialization of the ALV table settings :
        lr_table_settings->set_data_check(
                IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CELL_EVENT ).
    You may also do this:
        lr_table_settings->set_data_check(            IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CHECK_EVENT)
    The above two ways would depend on when do you need to check for the changed data. If you want to check the data as soon as it is entered, then use the first method. Else, use the second method.
    You need to register an EVENT HANDLER for this event.(You may do this in your VIEW or Component Controller).
    In this Event handler, you would find an importing parameter R_PARAM which is a ref type of      IF_SALV_WD_TABLE_DATA_CHECK.
    The attribute T_MODIFIED_CELLS of this interface IF_SALV_WD_TABLE_DATA_CHECK will contain the modified cells of the ALV with the old & new values.

  • How to get the changed data of an order?

    Hi,
    I'm trying to use BADI ORDER_SAVE to check if the user has changed the status and based on some conditions, I want to avoid saving the order. My problem is that with function moule CRM_READ_ORDER I can only read the "old" (current) information from database, but not the changes in the screen that the user is going to save ...
    How can I get this data?

    Hi,
    You can get the current document data with FM:CRM_ORDER_READ on BAdI:ORDER_SAVE. This FM reads not only DB data but also current data.
    FM:CRM_ORDER_READ reads the document data as follow order.
    1.Buffer data
    2.DB dta
    You can see it on LCRM_ORDERADM_H_DBF03(form orderadm_h_read_with_guid) called by CRM_ORDER_READ.
    If you try to create the order and see the data via CRM_ORDER_READ before saving the order, you can see the data,aren't you? It's the evidence CRM_ORDER_READ reads new buffer data not only DB data.
    Regards,
    Masayuki

Maybe you are looking for

  • My distributed form has stopped working after Acrobat did an update the form no longer appears in my tracker.

    I had a form that auto collected data through Adobe but it has stopped working after my Acrobat X Pro did an update. The form no longer appears in the tracker. How can this be fixed? I am using Windows 7. It would appear that since Adobe are going to

  • Help with HP desk jet F4435 on MacBookPro

    I tried installing my HP desk jet F4435 with the disc that came with the printer. I received a "successful" message. It wouldn't print. Then I uninstalled the printer and tried just plugging in the USB to connect it. Tried printing and receieved yet

  • Networking and DNS issues

    I am trying to get my domain set up and I am running on two routers. The first router is set up on a 10.0.0.1 network, and my network is on a 192.168.1.1 network. I am able to get out to my ISP via port forwarding, but I am not able to set up a DNS.

  • Unknown Error Connection (8xE8000003) For Ipod Touch

    Hello, recenty I have not been able to connect my ipod to itunes. It won't even reconize it in MYCOMPUTER. It comes up with an unknow error thing. Please help tell me what to do step by step without having to loose any data for sure. Please help me,

  • Album name

    I chose the wrong album name from a choice of 3 provided by iTunes and now I can't change how my CD automatically imports the tunes to the corrcet album name