<?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: Help required in object oriented alv in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976435#M949755</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;Write a validation in screen's PAI..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manish Hadiyel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2008 11:57:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-18T11:57:24Z</dc:date>
    <item>
      <title>Help required in object oriented alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976434#M949754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a checkbox in a object oriented alv and when the box is checked need to carry out some validation what event to use in this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 11:50:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976434#M949754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T11:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in object oriented alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976435#M949755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;Write a validation in screen's PAI..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manish Hadiyel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 11:57:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976435#M949755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T11:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in object oriented alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976436#M949756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to following links,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5295595"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5295595"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=13042072&amp;amp;messageID=5089171" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=13042072&amp;amp;messageID=5089171&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward pts if usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;dhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 11:58:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976436#M949756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T11:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in object oriented alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976437#M949757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gurpreet &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use The Method :   &lt;/P&gt;&lt;P&gt;call method gr_alvgrid-&amp;gt;check_changed_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this metho transfers all data of alv on the screen to the related internal table.&lt;/P&gt;&lt;P&gt;Than the value of checkbox field will be 'X' on internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if u use the line selection of alv,&lt;/P&gt;&lt;P&gt;you must use the method : gr_alvgrid-&amp;gt;get_Selected_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 12:03:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976437#M949757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T12:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in object oriented alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976438#M949758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The validation can be done in any of the events below as per the requirement:&lt;/P&gt;&lt;P&gt;1. double_click&lt;/P&gt;&lt;P&gt;2. user_command&lt;/P&gt;&lt;P&gt;3. Hotspot_click&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For getting the rows selected using the checkbox, you have to use the method CHECK_CHANGED_DATA in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the below link for all events and methods of grid class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_47x200/helpdata/en/0a/b55321d30911d2b467006094192fe3/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 12:07:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976438#M949758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T12:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in object oriented alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976439#M949759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurpreet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below sample code.....jus copy paste and execute...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here delayed callback event is used.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on the row u need to check...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*---------------------------------------------------------------------*
*       CLASS event_responder DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_event_responder DEFINITION.

  PUBLIC SECTION.
    METHODS click_a FOR EVENT delayed_callback             OF cl_gui_alv_grid.

ENDCLASS.                    "event_responder DEFINITION

TYPES BEGIN OF ty_disp.
TYPES chkbox  TYPE checkbox.
INCLUDE       TYPE qals.
TYPES END   OF ty_disp.

DATA : container TYPE REF TO cl_gui_docking_container,
       alv_grid  TYPE REF TO cl_gui_alv_grid,
       handler   TYPE REF TO lcl_event_responder,
       lt_disp   TYPE TABLE OF ty_disp    WITH HEADER LINE,
       ls_disp   TYPE ty_disp ,
       lt_fldcat TYPE TABLE OF lvc_s_fcat WITH HEADER LINE,
       lt_event  TYPE cntl_simple_events  WITH HEADER LINE,
       lt_cells  TYPE lvc_t_ceno          WITH HEADER LINE.

PARAMETER p.  " dummy

AT SELECTION-SCREEN OUTPUT.

  IF container IS NOT BOUND.

    CREATE OBJECT container EXPORTING side        = cl_gui_docking_container=&amp;gt;dock_at_bottom
                                      extension   = '99999'.

    CREATE OBJECT alv_grid  EXPORTING i_parent    = container.

    PERFORM field_catalog.

    SELECT * FROM qals INTO CORRESPONDING FIELDS OF TABLE lt_disp UP TO 30 ROWS.

    alv_grid-&amp;gt;set_table_for_first_display( CHANGING it_outtab       = lt_disp[]
                                                    it_fieldcatalog = lt_fldcat[] ).

    alv_grid-&amp;gt;register_delayed_event( i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_delayed_move_curr_cell ).

    CREATE OBJECT handler.

    SET HANDLER handler-&amp;gt;click_a FOR alv_grid.

  ENDIF.

*&amp;amp;--------------------------------------------------------------------*
*&amp;amp;      Form  field_catalog
*&amp;amp;--------------------------------------------------------------------*
FORM field_catalog.

  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name = 'QALS'
    CHANGING
      ct_fieldcat      = lt_fldcat[].

  lt_fldcat-fieldname = 'CHKBOX'.
  lt_fldcat-checkbox  = 'X'.
  lt_fldcat-reptext   = 'Validated'.

  INSERT lt_fldcat INDEX 1.

ENDFORM.                    "field_catalog

*---------------------------------------------------------------------*
*       CLASS event_responder IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_event_responder IMPLEMENTATION.

  METHOD click_a.

    FREE lt_cells.

    alv_grid-&amp;gt;get_selected_cells_id( IMPORTING et_cells = lt_cells[] ).

    READ TABLE lt_cells INTO lt_cells INDEX 1.

    LOOP AT lt_disp INTO ls_disp.

      CHECK sy-tabix       EQ lt_cells-row_id.
      CHECK ls_disp-chkbox NE 'X'.

      ls_disp-chkbox = 'X'.

      MODIFY lt_disp FROM ls_disp TRANSPORTING chkbox.

      MESSAGE ' Use this event to validate ' TYPE 'I'.

      alv_grid-&amp;gt;refresh_table_display( ).

    ENDLOOP.

  ENDMETHOD.                    "click

ENDCLASS.                    "event_responder IMPLEMENTATION&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Jose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 15:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-in-object-oriented-alv/m-p/3976439#M949759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T15:11:35Z</dc:date>
    </item>
  </channel>
</rss>

