<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to update changed data in alv grid. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922969#M59336</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andreas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the example programmme is not having complete information about updating of the database table from editable alv grid using oo model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Apr 2005 15:30:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-04-14T15:30:38Z</dc:date>
    <item>
      <title>how to update changed data in alv grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922967#M59334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a editable alv report how to update the changed data on the grid to database table when i click save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody tell me how to do this if possible with example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2005 14:35:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922967#M59334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-14T14:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to update changed data in alv grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922968#M59335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look in SE38 for BCALV_EDIT*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.: BCALV_EDIT_04  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2005 15:11:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922968#M59335</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-04-14T15:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to update changed data in alv grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922969#M59336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andreas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the example programmme is not having complete information about updating of the database table from editable alv grid using oo model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2005 15:30:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922969#M59336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-14T15:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to update changed data in alv grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922970#M59337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using a field-symbol to load the data to the grid?  If you are, the changes you make in the grid will also be changed in the field-symbol.  You might need to use one of the refresh methods or use check_changed_data to refresh the data into the field-symbol.  I used a field-symbol, and then used check_changed_data before trying to save the data.  When I did this, the field symbol always had the changed data in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2005 16:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922970#M59337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-14T16:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to update changed data in alv grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922971#M59338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi brain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have not tried field-symbol to load data can you explain me more in detail if possible with example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have created a user_command on the alv toolbar menu as a SAVE BUTTON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i click this button there are some condtions which should check after a change in data on grid if they are satisfied then there must be msg showing do you want to  update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried this way but how to update the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD handle_user_command.&lt;/P&gt;&lt;P&gt;    CASE e_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      WHEN 'SAVE'.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;      if ( )&lt;/P&gt;&lt;P&gt;        else&lt;/P&gt;&lt;P&gt;      msg 'Do you want to update'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have any example for this programme.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2005 16:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922971#M59338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-14T16:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to update changed data in alv grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922972#M59339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry didn't read the question properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2005 17:01:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922972#M59339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-14T17:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to update changed data in alv grid.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922973#M59340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code below isn't a working program, but has most of what you should need.  Field-symbol &amp;lt;dyn_table&amp;gt; will always have what is in the grid.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS: &amp;lt;dyn_table&amp;gt; TYPE STANDARD TABLE,
               &amp;lt;dyn_wa&amp;gt;.

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=&amp;gt;create_dynamic_table
             EXPORTING
                it_fieldcatalog = pt_fieldcat
             IMPORTING
                ep_table = new_table.

* assign ref variable  to a field symbol
ASSIGN new_table-&amp;gt;* TO &amp;lt;dyn_table&amp;gt;.

* Create dynamic work area and assign to FS
CREATE DATA new_line LIKE LINE OF &amp;lt;dyn_table&amp;gt;.
ASSIGN new_line-&amp;gt;* TO &amp;lt;dyn_wa&amp;gt;.

* data_itab is filled with data that you want in grid
LOOP AT data_itab INTO data_wa.
  CLEAR &amp;lt;dyn_wa&amp;gt;.
  ASSIGN COMPONENT 'MATERIAL' OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs&amp;gt;.
  &amp;lt;fs&amp;gt; = data_wa-material.
  ASSIGN COMPONENT 'QUANTITY' OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs&amp;gt;.
  &amp;lt;fs&amp;gt; = data_wa-quantity.
  APPEND &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_table&amp;gt;.
ENDLOOP.

CALL METHOD g_grid-&amp;gt;set_table_for_first_display
    EXPORTING
      i_structure_name              = '&amp;lt;DYN_TABLE&amp;gt;'
      is_variant                    = gs_variant
      i_save                        = 'A'
      i_default                     = 'X'
      is_layout                     = gs_layout
      it_toolbar_excluding          = gt_exclude
    CHANGING
      it_outtab                     = &amp;lt;dyn_table&amp;gt;
      it_fieldcatalog               = pt_fieldcat[]
      it_sort                       = gt_sort[].

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2005 17:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-update-changed-data-in-alv-grid/m-p/922973#M59340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-14T17:16:53Z</dc:date>
    </item>
  </channel>
</rss>

