<?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: ALV Grid handle_data_changed error? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865399#M1322305</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: obj_handler TYPE REF TO lcl_event_handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_event_handler IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD handle_data_changed.&lt;/P&gt;&lt;P&gt;    DATA: ls_good TYPE lvc_s_modi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT er_data_changed-&amp;gt;mt_good_cells INTO ls_good.&lt;/P&gt;&lt;P&gt;      CASE ls_good-fieldname.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Order Quantity&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WHEN 'GSMNG'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Order Start&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WHEN 'PSTTR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Order Finish&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WHEN 'PEDTR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;All other fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WHEN OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDCASE.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the method to display the data in ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL METHOD obj_alv_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        is_layout                     = wa_layo&lt;/P&gt;&lt;P&gt;        i_structure_name              = 'ty_plan'&lt;/P&gt;&lt;P&gt;        is_variant                    = gs_variant&lt;/P&gt;&lt;P&gt;        i_save                        = gv_save_variant&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        it_outtab                     = pt_plan&lt;/P&gt;&lt;P&gt;        it_fieldcatalog               = pt_fieldcat&lt;/P&gt;&lt;P&gt;        it_sort                       = lt_sort&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        invalid_parameter_combination = 1&lt;/P&gt;&lt;P&gt;        program_error                 = 2&lt;/P&gt;&lt;P&gt;        OTHERS                        = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD obj_alv_grid-&amp;gt;set_ready_for_input&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_ready_for_input = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD obj_alv_grid-&amp;gt;register_edit_event&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_enter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD obj_alv_grid-&amp;gt;register_edit_event&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT obj_handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET HANDLER obj_handler-&amp;gt;handle_data_changed FOR obj_alv_grid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2009 13:17:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-23T13:17:14Z</dc:date>
    <item>
      <title>ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865395#M1322301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I've been working on an implementation of an ALV grid in which the user has the ability to edit certain fields. I want to capture those changed values in my program. I've implemented a lcl_event_handler class and I've defined a method within the class to process the data_changed event. I've also defined and instantiated a handle to the class. I've also registered the mc_evt_enter event with the ALV grid. When I run the grid and change a value the data_changed event fires as you would expect. The trouble is an error message is returned which says "Field ty_pan-gsmng is not defined in the ABAP dictionary". I pass a reference to a custom type I defined within the program to the ALV grid...you guessed the name...ty_plan. One of the editable fields within the custome type is gsmng. I'm curious...do I have to pass a reference to a table or type defined within the ABAP dictionary or can I get this code to work with my custom type?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance...Mat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 12:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865395#M1322301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T12:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865396#M1322302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;If your are talking about the reference field and reference table in the fieldcatlog; then it has to be a specific field and table or structure within the data dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 12:42:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865396#M1322302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T12:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865397#M1322303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the assitance Ankur. I call method set_table_for_first_display and pass i_structure_name with a reference to the custom type ty_plan defined within my program. Seems odd that the type has to be defined within the ABAP dictionary. What if I just want to use a type I define within the program...there is no way to handle that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 12:49:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865397#M1322303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T12:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865398#M1322304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Can you show your handler method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 13:04:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865398#M1322304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T13:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865399#M1322305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: obj_handler TYPE REF TO lcl_event_handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_event_handler IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD handle_data_changed.&lt;/P&gt;&lt;P&gt;    DATA: ls_good TYPE lvc_s_modi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT er_data_changed-&amp;gt;mt_good_cells INTO ls_good.&lt;/P&gt;&lt;P&gt;      CASE ls_good-fieldname.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Order Quantity&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WHEN 'GSMNG'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Order Start&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WHEN 'PSTTR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Order Finish&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WHEN 'PEDTR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;All other fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WHEN OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDCASE.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the method to display the data in ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL METHOD obj_alv_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        is_layout                     = wa_layo&lt;/P&gt;&lt;P&gt;        i_structure_name              = 'ty_plan'&lt;/P&gt;&lt;P&gt;        is_variant                    = gs_variant&lt;/P&gt;&lt;P&gt;        i_save                        = gv_save_variant&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        it_outtab                     = pt_plan&lt;/P&gt;&lt;P&gt;        it_fieldcatalog               = pt_fieldcat&lt;/P&gt;&lt;P&gt;        it_sort                       = lt_sort&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        invalid_parameter_combination = 1&lt;/P&gt;&lt;P&gt;        program_error                 = 2&lt;/P&gt;&lt;P&gt;        OTHERS                        = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD obj_alv_grid-&amp;gt;set_ready_for_input&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_ready_for_input = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD obj_alv_grid-&amp;gt;register_edit_event&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_enter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD obj_alv_grid-&amp;gt;register_edit_event&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT obj_handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET HANDLER obj_handler-&amp;gt;handle_data_changed FOR obj_alv_grid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 13:17:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865399#M1322305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T13:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865400#M1322306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just try passing the structure name in capital  'TY_PLAN'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 13:44:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865400#M1322306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T13:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865401#M1322307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to create the field catalog this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  call function 'LVC_FIELDCATALOG_MERGE'
    exporting
      i_structure_name       = 'TY_PLAN'
      i_client_never_display = 'X'
    changing
      ct_fieldcat            = i_fieldcat[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD obj_alv_grid-&amp;gt;set_table_for_first_display
EXPORTING
is_layout = wa_layo
is_variant = gs_variant
i_save = gv_save_variant
CHANGING
it_outtab = pt_plan
it_fieldcatalog = pt_fieldcat
it_sort = lt_sort
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 13:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865401#M1322307</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-07-23T13:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865402#M1322308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ankur,&lt;/P&gt;&lt;P&gt;As per your recommendation I capitalized the reference to the type...this did not help. I had to define the type in the ABAP dictionary. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jul 2009 10:03:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865402#M1322308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-25T10:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid handle_data_changed error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865403#M1322309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm late on this post, but I think I could have a clue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, if you don't want to have to declare your structure in the DDIC, you have to be sure in your field catalog that the field REF_TABLE is empty. Otherwise, a check is made against the DDIC, and this message appear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Had the same issue, and I solved it this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 18:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-handle-data-changed-error/m-p/5865403#M1322309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-01T18:04:20Z</dc:date>
    </item>
  </channel>
</rss>

