<?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 alv-oops in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850012#M925560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai friends .....&lt;/P&gt;&lt;P&gt;  iam new to  alv with opps concepts ..&lt;/P&gt;&lt;P&gt;  where can i declare selection screen and how can we retrive the data and print the data  on screen.&lt;/P&gt;&lt;P&gt;  inclass its not allowing selection screen. .&lt;/P&gt;&lt;P&gt; can u  give me detailed view. on alv with container and selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tanx in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2008 03:55:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-23T03:55:48Z</dc:date>
    <item>
      <title>alv-oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850012#M925560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai friends .....&lt;/P&gt;&lt;P&gt;  iam new to  alv with opps concepts ..&lt;/P&gt;&lt;P&gt;  where can i declare selection screen and how can we retrive the data and print the data  on screen.&lt;/P&gt;&lt;P&gt;  inclass its not allowing selection screen. .&lt;/P&gt;&lt;P&gt; can u  give me detailed view. on alv with container and selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tanx in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 03:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850012#M925560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T03:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: alv-oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850013#M925561</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;ABAP Example Program ALV Grid Control &lt;/P&gt;&lt;P&gt;You need to create a screen 100 for calling it, and in the Element list of the sceen supply OK_CODE of type OK &amp;amp; in the layout, place a Custom - control with name DILEEP_TEST1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then activate modules STATUS_0100 and USER_COMMAND_0100 in the flow logic . &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST_DIL4 .&lt;/P&gt;&lt;P&gt;TABLES ZMSTKSUM.&lt;/P&gt;&lt;P&gt;DATA : OK_CODE LIKE SY-UCOMM,&lt;/P&gt;&lt;P&gt;       TAB_DISPLAY TYPE TABLE OF ZMSTKSUM,&lt;/P&gt;&lt;P&gt;       C_CONTAINER TYPE SCRFNAME VALUE 'DILEEP_TEST1',&lt;/P&gt;&lt;P&gt;       ALV_GRID TYPE REF TO CL_GUI_ALV_GRID,&lt;/P&gt;&lt;P&gt;       C_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : S_WERKS FOR ZMSTKSUM-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM ZMSTKSUM INTO TABLE TAB_DISPLAY WHERE WERKS IN S_WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE STATUS_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'MAIN'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SET TITLEBAR 'xxx'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF C_CUSTOM_CONTAINER IS INITIAL.&lt;/P&gt;&lt;P&gt;CREATE OBJECT C_CUSTOM_CONTAINER EXPORTING CONTAINER_NAME = C_CONTAINER&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;    CREATE OBJECT ALV_GRID EXPORTING I_PARENT = C_CUSTOM_CONTAINER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD ALV_GRID-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_BUFFER_ACTIVE               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_BYPASSING_BUFFER            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        I_STRUCTURE_NAME              = 'ZMSTKSUM'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IS_VARIANT                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_SAVE                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_DEFAULT                     = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IS_LAYOUT                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IS_PRINT                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_SPECIAL_GROUPS             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_TOOLBAR_EXCLUDING          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        IT_OUTTAB                     = TAB_DISPLAY&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_FIELDCATALOG               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_SORT                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_FILTER                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   INVALID_PARAMETER_COMBINATION = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PROGRAM_ERROR                 = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   others                        = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;  CASE OK_CODE.&lt;/P&gt;&lt;P&gt;    WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 05:01:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850013#M925561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T05:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: alv-oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850014#M925562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create selection screen and also display data retrieved in alv grid using oops methodology.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a report program.&lt;/P&gt;&lt;P&gt;2. Write code for selection screen.&lt;/P&gt;&lt;P&gt;3. Define classes for alv grid.&lt;/P&gt;&lt;P&gt;4. Use statement CALL SCREEN &amp;lt;screen no&amp;gt;.&lt;/P&gt;&lt;P&gt;5. In the screen create a custom control.&lt;/P&gt;&lt;P&gt;6. In the PBO retrieve data and populate the alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the demo program bcalvc_grid_screen0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sourabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 05:19:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850014#M925562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T05:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: alv-oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850015#M925563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this program...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: qmel,qmih,iflot,z94392_notif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gc_custom_control_name TYPE scrfname VALUE 'CUST_C' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gr_ccontainer TYPE REF TO cl_gui_custom_container .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gt_fieldcat TYPE lvc_t_fcat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gs_layout TYPE lvc_s_layo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: e_row_id  TYPE lvc_s_row,&lt;/P&gt;&lt;P&gt;                     e_column_id TYPE lvc_s_col,&lt;/P&gt;&lt;P&gt;                     es_row_no TYPE lvc_s_roid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab1 OCCURS 0,&lt;/P&gt;&lt;P&gt;      qmnum LIKE qmel-qmnum,&lt;/P&gt;&lt;P&gt;      qmtxt LIKE qmel-qmtxt,&lt;/P&gt;&lt;P&gt;      indtx LIKE qmel-indtx,&lt;/P&gt;&lt;P&gt;      qmdat LIKE qmel-qmdat,&lt;/P&gt;&lt;P&gt;      ltrmn LIKE qmel-ltrmn,&lt;/P&gt;&lt;P&gt;      priok LIKE qmel-priok,&lt;/P&gt;&lt;P&gt;      aufnr LIKE qmel-aufnr,&lt;/P&gt;&lt;P&gt;      bezdt LIKE qmel-bezdt,&lt;/P&gt;&lt;P&gt;      qmnam LIKE qmel-qmnam,&lt;/P&gt;&lt;P&gt;      qmart LIKE qmel-qmart,&lt;/P&gt;&lt;P&gt;      END OF itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab2 OCCURS 0,&lt;/P&gt;&lt;P&gt;      qmnum LIKE qmih-qmnum,&lt;/P&gt;&lt;P&gt;      btpln LIKE qmih-btpln,&lt;/P&gt;&lt;P&gt;      ingrp LIKE qmih-ingrp,&lt;/P&gt;&lt;P&gt;      END OF itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab3 TYPE TABLE OF z94392_notif WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS notification DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    CLASS-METHODS : handle_double_click&lt;/P&gt;&lt;P&gt;                    FOR EVENT double_click OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;                         IMPORTING e_row  e_column.&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "NOTIFICATION DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS notification IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD handle_double_click.&lt;/P&gt;&lt;P&gt;    PERFORM handle_double_click USING e_row e_column es_row_no.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "handle_double_click&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "NOTIFICATION IMPLEMENTATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : notnum FOR qmel-qmnum OBLIGATORY,&lt;/P&gt;&lt;P&gt;                 notype FOR qmel-qmart,&lt;/P&gt;&lt;P&gt;                 floc FOR qmih-btpln,&lt;/P&gt;&lt;P&gt;                 name FOR qmel-qmnam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT qmnum qmtxt indtx qmdat ltrmn priok aufnr bezdt qmnam qmart INTO&lt;/P&gt;&lt;P&gt;TABLE itab1 FROM qmel WHERE qmnum IN notnum&lt;/P&gt;&lt;P&gt; AND qmart IN notype AND qmnam IN name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT qmnum btpln ingrp INTO TABLE itab2 FROM qmih FOR ALL ENTRIES IN&lt;/P&gt;&lt;P&gt; itab1 WHERE qmnum = itab1-qmnum AND btpln IN floc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      itab3-qmnum = itab1-qmnum.&lt;/P&gt;&lt;P&gt;      itab3-qmtxt = itab1-qmtxt.&lt;/P&gt;&lt;P&gt;      itab3-indtx = itab1-indtx.&lt;/P&gt;&lt;P&gt;      itab3-qmdat = itab1-qmdat.&lt;/P&gt;&lt;P&gt;      itab3-ltrmn = itab1-ltrmn.&lt;/P&gt;&lt;P&gt;      itab3-priok = itab1-priok.&lt;/P&gt;&lt;P&gt;      itab3-aufnr = itab1-aufnr.&lt;/P&gt;&lt;P&gt;      itab3-bezdt = itab1-bezdt.&lt;/P&gt;&lt;P&gt;      itab3-qmnam = itab1-qmnam.&lt;/P&gt;&lt;P&gt;      itab3-qmart = itab1-qmart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ TABLE itab2 WITH KEY qmnum = itab1-qmnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      itab3-btpln = itab2-btpln.&lt;/P&gt;&lt;P&gt;      itab3-ingrp = itab2-ingrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF itab3 IS INITIAL.&lt;/P&gt;&lt;P&gt;    MESSAGE 'ENTER A VALID ENTRY' TYPE 'I'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;    CALL SCREEN '100'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS '100'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SET TITLEBAR 'xxx'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF gr_alvgrid IS INITIAL .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CREATE OBJECT gr_ccontainer&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PARENT                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        container_name              = gc_custom_control_name&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   STYLE                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   LIFETIME                    = lifetime_default&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   REPID                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DYNNR                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_AUTODEF_PROGID_DYNNR     =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        cntl_error                  = 1&lt;/P&gt;&lt;P&gt;        cntl_system_error           = 2&lt;/P&gt;&lt;P&gt;        create_error                = 3&lt;/P&gt;&lt;P&gt;        lifetime_error              = 4&lt;/P&gt;&lt;P&gt;        lifetime_dynpro_dynpro_link = 5&lt;/P&gt;&lt;P&gt;        OTHERS                      = 6&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CREATE OBJECT gr_alvgrid&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_SHELLSTYLE      = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_LIFETIME        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        i_parent          = gr_ccontainer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_APPL_EVENTS     = space&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_PARENTDBG       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_APPLOGPARENT    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_GRAPHICSPARENT  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_NAME            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error_cntl_create = 1&lt;/P&gt;&lt;P&gt;        error_cntl_init   = 2&lt;/P&gt;&lt;P&gt;        error_cntl_link   = 3&lt;/P&gt;&lt;P&gt;        error_dp_create   = 4&lt;/P&gt;&lt;P&gt;        OTHERS            = 5&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD gr_alvgrid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_BUFFER_ACTIVE               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_BYPASSING_BUFFER            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_CONSISTENCY_CHECK           =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         i_structure_name              = 'Z94392_NOTIF'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IS_VARIANT                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_SAVE                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_DEFAULT                     = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IS_LAYOUT                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IS_PRINT                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_SPECIAL_GROUPS             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_TOOLBAR_EXCLUDING          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_HYPERLINK                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_ALV_GRAPHICS               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_EXCEPT_QINFO               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        it_outtab                     = itab3[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_FIELDCATALOG               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_SORT                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_FILTER                     =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;        too_many_lines                = 3&lt;/P&gt;&lt;P&gt;        OTHERS                        = 4&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SET HANDLER notification=&amp;gt;handle_double_click FOR gr_alvgrid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  handle_double_click&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_E_ROW  text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_E_COLUMN  text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_ES_ROW_NO  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM handle_double_click  USING     e_row TYPE lvc_s_row&lt;/P&gt;&lt;P&gt;                                  e_column TYPE lvc_s_col&lt;/P&gt;&lt;P&gt;                                  es_row_no TYPE lvc_s_roid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: t_output TYPE  z94392_notif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE itab3 INTO t_output INDEX e_row-index .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0 AND e_column-fieldname EQ 'QMNUM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL TRANSACTION 'Z94406_SAPSCR' AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;If helpful then reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Syed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 07:32:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850015#M925563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T07:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: alv-oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850016#M925564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;container class link screen name with Oo ALV grid..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with help of u can use event like double click passing row and collumn and move to next screen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2008 09:37:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850016#M925564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-26T09:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: alv-oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850017#M925565</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;&lt;/P&gt;&lt;P&gt;u201CThe ALV Grid control is a flexible tool for displaying lists. The tool provides common list operations as generic functions and can be enhanced by self-defined options.u201D&lt;/P&gt;&lt;P&gt;The ALV Grid control is used to build non-hierarchical, interactive, and modern-design lists. As a control, it is a component that is installed on the local PC.&lt;/P&gt;&lt;P&gt;The ALV Grid control provides typical list functions as sorting, filtering, summing, etc.,while also gives the opportunity to develop user functions where needed. It presents numerous interfaces like Excel Inplace and Crystal Reports.&lt;/P&gt;&lt;P&gt;The wrapper class implemented to encapsulate ALV Grid functionality is u201CCL_GUI_ALV_GRIDu201D. There is another way to display lists with ALV utilizing u201CREUSE_ALV...u201D functions. However, that way is not comprised in this tutorial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While preparing a list to be displayed via an ALV grid control, we have some basic components to prepare. These are;&lt;/P&gt;&lt;P&gt;i. List data: Obviously, this is the data in an internal table to be listed. Standard ALV functions except sorting makes just read access to the list data. However, sorting changes state of the internal table. The internal table holding list data may be of any flat type. Deep types are only allowed when set for some functionalities of ALV Grid.&lt;/P&gt;&lt;P&gt;ii. Field Catalog: We use another internal table to define specifications on how the fields of our list will be displayed. This internal table is called the&lt;/P&gt;&lt;P&gt;u201Cfield catalogu201D. The field catalog must comprise some technical and additional information about display options for each column to be displayed. There are three procedures to generate the field catalog as u201CAutomatic generationu201D, u201CSemi-automatic generationu201D, and u201CManualgenerationu201D. The internal table for the field catalog must be referenced to the dictionary type u201CLVC_T_FCATu201D.&lt;/P&gt;&lt;P&gt;iii. Layout Structure: We fill a structure to specify general layout options for the grid. With this structure we can set general display options, grid customizing, totals options, color adjustments etc... The layout structure must be of type u201CLVC_S_LAYOu201D.&lt;/P&gt;&lt;P&gt;iv. Event Handler: We should define and implement an event handler class if we want to handle events triggered by the ALV Grid instance. After creating ALV Grid instance, we must register an instance of this event handler class to handle ALV Grid events.&lt;/P&gt;&lt;P&gt;v. Additional Data: To trigger some additional features of ALV Grid we can have some additional data to pass as parameters. For example, initial sorting criteria, buttons to be deactivated, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, we can figure out a primitive scheme to prepare our ALV Grid. As a control object, ALV Grid instance requires a container to be linked to the screen. Generally, an instance of the class u201Ccl_gui_custom_containeru201D is used for this purpose. Instances of some other container classes such as u201Ccl_gui_docking_containeru201D, u201Ccl_gui_dialogbox_containeru201D may also be used. In our example we take a custom container. To create a custom container instance, we need a custom control area on the screen.&lt;/P&gt;&lt;P&gt;Step 1􀃆 Add a custom control on the screen which will be related to the custom container. Letu2019s give it the name u2018CC_ALVu2019.&lt;/P&gt;&lt;P&gt;Step 2 􀃆 Declare global variables to be used for ALV Grid.&lt;/P&gt;&lt;P&gt;Code Part 1 u2013 Global data definitions for ALV&lt;/P&gt;&lt;P&gt;*-- Global data definitions for ALV&lt;/P&gt;&lt;P&gt;*--- ALV Grid instance reference&lt;/P&gt;&lt;P&gt;DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid .&lt;/P&gt;&lt;P&gt;*--- Name of the custom control added on the screen&lt;/P&gt;&lt;P&gt;DATA gc_custom_control_name TYPE scrfname VALUE u2018CC_ALVu2019 .&lt;/P&gt;&lt;P&gt;*--- Custom container instance reference&lt;/P&gt;&lt;P&gt;DATA gr_ccontainer TYPE REF TO cl_gui_custom_container .&lt;/P&gt;&lt;P&gt;*--- Field catalog table&lt;/P&gt;&lt;P&gt;DATA gt_fieldcat TYPE lvc_t_fcat .&lt;/P&gt;&lt;P&gt;*--- Layout structure&lt;/P&gt;&lt;P&gt;DATA gs_layout TYPE lvc_s_layo .&lt;/P&gt;&lt;P&gt;Step 3 􀃆 Declare your internal table which is supposed to hold the list data. Letu2019s name it u201Cgt_listu201D. Here is an example declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Internal table holding list data&lt;/P&gt;&lt;P&gt;DATA BEGIN OF gt_list OCCURS 0 .&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SFLIGHT .&lt;/P&gt;&lt;P&gt;*--In further sections, some additional fields will added here&lt;/P&gt;&lt;P&gt;*--for some functionality&lt;/P&gt;&lt;P&gt;DATA END OF gt_list .&lt;/P&gt;&lt;P&gt;Code Part 2 u2013 Declaration of the internal table that will hold the list data&lt;/P&gt;&lt;P&gt;Step 4 􀃆 Somewhere in your program before calling list display, fill your list data as you want. Here, it is not our concern what the data are. We assume the internal table is filled reasonably. We will use the data of table SFLIGHT as our list data.&lt;/P&gt;&lt;P&gt;Step 5 􀃆 Call the screen which comprises the ALV Grid control. At PBO of this screen we will deal with creating the ALV Grid instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--PBO&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT .&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;MODULE display_alv .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Part 3 u2013 PBO of the flow logic for the screen containing ALV Grid control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;MODULE display_alv OUTPUT .&lt;/P&gt;&lt;P&gt;PERFORM display_alv .&lt;/P&gt;&lt;P&gt;ENDMODULE .&lt;/P&gt;&lt;P&gt;Step 6 􀃆 Now, it is high time we wrote something to play. So, this piece will be the one we will deal mainly. What we do is, checking whether an instance of the container (or ALV Grid) exists. If it exists, refreshing it, and if not, creating and setting ALV for the first display.&lt;/P&gt;&lt;P&gt;FORM display_alv .&lt;/P&gt;&lt;P&gt;IF gr_alvgrid IS INITIAL .&lt;/P&gt;&lt;P&gt;*----Creating custom container instance&lt;/P&gt;&lt;P&gt;CREATE OBJECT gr_ccontainer&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;container_name = gc_custom_control_name&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;cntl_error = 1&lt;/P&gt;&lt;P&gt;cntl_system_error = 2&lt;/P&gt;&lt;P&gt;create_error = 3&lt;/P&gt;&lt;P&gt;lifetime_error = 4&lt;/P&gt;&lt;P&gt;lifetime_dynpro_dynpro_link = 5&lt;/P&gt;&lt;P&gt;others = 6 .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*--Exception handling&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----Creating ALV Grid instance&lt;/P&gt;&lt;P&gt;CREATE OBJECT gr_alvgrid&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_parent = gr_ccontainer&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error_cntl_create = 1&lt;/P&gt;&lt;P&gt;error_cntl_init = 2&lt;/P&gt;&lt;P&gt;error_cntl_link = 3&lt;/P&gt;&lt;P&gt;error_dp_create = 4&lt;/P&gt;&lt;P&gt;others = 5 .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*--Exception handling&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*----Preparing field catalog.&lt;/P&gt;&lt;P&gt;PERFORM prepare_field_catalog CHANGING gt_fieldcat .&lt;/P&gt;&lt;P&gt;*----Preparing layout structure&lt;/P&gt;&lt;P&gt;PERFORM prepare_layout CHANGING gs_layout .&lt;/P&gt;&lt;P&gt;*----Here will be additional preparations&lt;/P&gt;&lt;P&gt;*--e.g. initial sorting criteria, initial filtering criteria, excluding&lt;/P&gt;&lt;P&gt;*--functions&lt;/P&gt;&lt;P&gt;CALL METHOD gr_alvgrid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_BUFFER_ACTIVE =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_CONSISTENCY_CHECK =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_STRUCTURE_NAME =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IS_VARIANT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_SAVE =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_DEFAULT = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;is_layout = gs_layout&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IS_PRINT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_SPECIAL_GROUPS =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_TOOLBAR_EXCLUDING =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_HYPERLINK =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;it_outtab = gt_list[]&lt;/P&gt;&lt;P&gt;it_fieldcatalog = gt_fieldcat&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_SORT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IT_FILTER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;too_many_lines = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4 .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*--Exception handling&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ELSE .&lt;/P&gt;&lt;P&gt;CALL METHOD gr_alvgrid-&amp;gt;refresh_table_display&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IS_STABLE =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_SOFT_REFRESH =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;finished = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2 .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*--Exception handling&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF .&lt;/P&gt;&lt;P&gt;ENDFORM .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From ABAP objects, we are familiar with u201CCREATE OBJECTu201D statement which instantiate classes. In this snippet of code, we used two instance methods of u201Ccl_gui_alv_gridu201D. First is u201Cset_table_for_first_displayu201D whose name implies for what it is used. After creating the ALV Grid instance we call this method to make our list displayed. We pass list data table, field catalog table, layout structure and additional information. Here are parameter definitions taken from SAP Library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read it , it will give you a good idea about alv oops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Syed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2008 12:25:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850017#M925565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-26T12:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: alv-oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850018#M925566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Dec 2010 10:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops/m-p/3850018#M925566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-24T10:15:22Z</dc:date>
    </item>
  </channel>
</rss>

