<?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 Report Using Classes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830851#M43577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my ALV Report using OOPS(class).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to display anything. The grid is not getting displayed. i am attaching the code here. Can anyone tell me whats wrong in the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of typ_mara,&lt;/P&gt;&lt;P&gt;        matnr type matnr,&lt;/P&gt;&lt;P&gt;        prdha type prodh_d,&lt;/P&gt;&lt;P&gt;       end of typ_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_fieldcat type LVC_T_FCAT,&lt;/P&gt;&lt;P&gt;      is_fieldcat type LVC_S_FCAT,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      it_mara type standard table of typ_mara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      i_grid_title type lvc_title value 'Test Report'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: o_container type ref to cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;      o_grid type ref to cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if o_container is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CREATE OBJECT o_container&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       container_name              = 'MYTEST'&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;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT o_grid&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = o_container&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select matnr prdha from mara into corresponding fields of&lt;/P&gt;&lt;P&gt;              table it_mara.&lt;/P&gt;&lt;P&gt;  perform build_field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;set_frontend_fieldcatalog&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      it_fieldcatalog = it_fieldcat    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;set_gridtitle&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_gridtitle = i_grid_title      .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab                     = it_mara[]&lt;/P&gt;&lt;P&gt;      IT_FIELDCATALOG               = it_fieldcat[]&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;      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 'ZZ' TYPE 'I' NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;              WITH SY-SUBRC.&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;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  build_field_catalog&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; Build Field Catalogue table for alv grid display&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;form build_field_catalog .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   is_fieldcat-col_pos = 1.&lt;/P&gt;&lt;P&gt;   is_fieldcat-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;   is_fieldcat-lzero = 'X'.&lt;/P&gt;&lt;P&gt;   is_fieldcat-SELTEXT = 'Material Number'.&lt;/P&gt;&lt;P&gt;  append is_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   is_fieldcat-col_pos = 2.&lt;/P&gt;&lt;P&gt;   is_fieldcat-fieldname = 'PRHDA'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  is_fieldcat-lzero = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   is_fieldcat-SELTEXT = 'Product Hierarchy'.&lt;/P&gt;&lt;P&gt;  append is_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " build_field_catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 May 2004 07:16:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-05-05T07:16:26Z</dc:date>
    <item>
      <title>ALV Report Using Classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830851#M43577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my ALV Report using OOPS(class).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to display anything. The grid is not getting displayed. i am attaching the code here. Can anyone tell me whats wrong in the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of typ_mara,&lt;/P&gt;&lt;P&gt;        matnr type matnr,&lt;/P&gt;&lt;P&gt;        prdha type prodh_d,&lt;/P&gt;&lt;P&gt;       end of typ_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_fieldcat type LVC_T_FCAT,&lt;/P&gt;&lt;P&gt;      is_fieldcat type LVC_S_FCAT,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      it_mara type standard table of typ_mara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      i_grid_title type lvc_title value 'Test Report'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: o_container type ref to cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;      o_grid type ref to cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if o_container is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CREATE OBJECT o_container&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       container_name              = 'MYTEST'&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;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT o_grid&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = o_container&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select matnr prdha from mara into corresponding fields of&lt;/P&gt;&lt;P&gt;              table it_mara.&lt;/P&gt;&lt;P&gt;  perform build_field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;set_frontend_fieldcatalog&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      it_fieldcatalog = it_fieldcat    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;set_gridtitle&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_gridtitle = i_grid_title      .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab                     = it_mara[]&lt;/P&gt;&lt;P&gt;      IT_FIELDCATALOG               = it_fieldcat[]&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;      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 'ZZ' TYPE 'I' NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;              WITH SY-SUBRC.&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;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  build_field_catalog&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; Build Field Catalogue table for alv grid display&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;form build_field_catalog .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   is_fieldcat-col_pos = 1.&lt;/P&gt;&lt;P&gt;   is_fieldcat-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;   is_fieldcat-lzero = 'X'.&lt;/P&gt;&lt;P&gt;   is_fieldcat-SELTEXT = 'Material Number'.&lt;/P&gt;&lt;P&gt;  append is_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   is_fieldcat-col_pos = 2.&lt;/P&gt;&lt;P&gt;   is_fieldcat-fieldname = 'PRHDA'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  is_fieldcat-lzero = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   is_fieldcat-SELTEXT = 'Product Hierarchy'.&lt;/P&gt;&lt;P&gt;  append is_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " build_field_catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2004 07:16:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830851#M43577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-05-05T07:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Report Using Classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830852#M43578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balaji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The method needs also informations concerning how to be displayed.&lt;/P&gt;&lt;P&gt;It will be store in type: lvc_s_layo.&lt;/P&gt;&lt;P&gt;I allways use a DDIC-Structure, so all the HeaderLines will be shown in the standard way.&lt;/P&gt;&lt;P&gt;Therefore usually I use the FM: 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt; to create the Fieldcat.&lt;/P&gt;&lt;P&gt;But anyway; it works also with internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;DATA:  gf_layout       TYPE lvc_s_layo.&lt;/P&gt;&lt;P&gt;*:--- GRID EIGENSCHAFTEN ÜBER FELDLEISTE&lt;/P&gt;&lt;P&gt;      gf_layout-grid_title =&lt;/P&gt;&lt;P&gt;                  'Kontrolle inaktiver Bestände nach Wert'(t00).&lt;/P&gt;&lt;P&gt;      gf_layout-zebra      = 'X'.&lt;/P&gt;&lt;P&gt;      gf_layout-edit       = 'X'.       " Nicht eingabebereit&lt;/P&gt;&lt;P&gt;      gf_layout-edit_mode  = 'X'.       " Editmode&lt;/P&gt;&lt;P&gt;      gf_layout-sel_mode   = 'A'.&lt;/P&gt;&lt;P&gt;      gf_layout-no_keyfix  = ' '.       " Keyspalten nicht fixieren&lt;/P&gt;&lt;P&gt;      gf_layout-cwidth_opt = ' '.       " optimale Breite&lt;/P&gt;&lt;P&gt;      gf_layout-totals_bef = ' '.       " Summenanzeige&lt;/P&gt;&lt;P&gt;      gf_layout-no_rowmark = ' '.       " Keine Zeilenmarkierung&lt;/P&gt;&lt;P&gt;      gf_layout-no_toolbar = ' '.       " keine Toolbar&lt;/P&gt;&lt;P&gt;      gf_layout-info_fname = c_fldfarb. " FARBE = Zeilenfärbung&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    gf_layout-NUMC_TOTAL = 'X'.       " Summen zulassen bei Numc&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      gf_layout-detailtitl = 'Detailanzeige'(t05).&lt;/P&gt;&lt;P&gt;      gf_layout-detailinit = 'X'.&lt;/P&gt;&lt;P&gt;      gf_layout-ctab_fname = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call the method in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         CALL METHOD hnd_grid_01-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;              EXPORTING i_structure_name     = c_struc " Name of the DDIC-Structure if used&lt;/P&gt;&lt;P&gt;                        i_save               =  'A'&lt;/P&gt;&lt;P&gt;                        i_default            =  'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        is_layout            = gf_layout&lt;/P&gt;&lt;P&gt;                        it_toolbar_excluding = gt_xclude " to delete Buttons in the Toolbar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              CHANGING  it_outtab            = gt_output[]&lt;/P&gt;&lt;P&gt;                        it_fieldcatalog      = gt_fldcat[].&lt;/P&gt;&lt;P&gt;*:--- Only if you add extra Buttons etc..&lt;/P&gt;&lt;P&gt;         SET HANDLER lcl_event_receiver=&amp;gt;hnd_user_command&lt;/P&gt;&lt;P&gt;                     lcl_event_receiver=&amp;gt;hnd_toolbar FOR ALL INSTANCES.&lt;/P&gt;&lt;P&gt;*:---    TOOLBAR&lt;/P&gt;&lt;P&gt;         CALL METHOD hnd_grid_01-&amp;gt;set_toolbar_interactive.&lt;/P&gt;&lt;P&gt;*:---    Table-control Markierungen setzen&lt;/P&gt;&lt;P&gt;         CALL METHOD hnd_grid_01-&amp;gt;set_ready_for_input&lt;/P&gt;&lt;P&gt;               EXPORTING&lt;/P&gt;&lt;P&gt;                        i_ready_for_input = 0. " means no edit 1 means edit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*:--- Control anzeigen&lt;/P&gt;&lt;P&gt;      CALL METHOD cl_gui_control=&amp;gt;set_focus&lt;/P&gt;&lt;P&gt;           EXPORTING control = hnd_grid_01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*:--- An example for excluding Buttons:&lt;/P&gt;&lt;P&gt;Data: gs_func        TYPE ui_func.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      gs_func = cl_gui_alv_grid=&amp;gt;mc_fc_loc_append_row.&lt;/P&gt;&lt;P&gt;      APPEND gs_func TO gt_xclude.&lt;/P&gt;&lt;P&gt;      gs_func = cl_gui_alv_grid=&amp;gt;mc_fc_loc_copy.&lt;/P&gt;&lt;P&gt;      APPEND gs_func TO gt_xclude.&lt;/P&gt;&lt;P&gt;      gs_func = cl_gui_alv_grid=&amp;gt;mc_fc_loc_copy_row.&lt;/P&gt;&lt;P&gt;      APPEND gs_func TO gt_xclude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i could help you&lt;/P&gt;&lt;P&gt;BR Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2004 08:36:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830852#M43578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-05-05T08:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Report Using Classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830853#M43579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A question:&lt;/P&gt;&lt;P&gt;Did You add a coding similar to this to define the class?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*:---  OOP-Definitionen&lt;/P&gt;&lt;P&gt;DATA:  cnt_name_01     TYPE scrfname           VALUE 'CNTRL_KOBE',&lt;/P&gt;&lt;P&gt;       hnd_grid_01     TYPE REF TO cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;       hnd_cont_01     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;      CLASS lcl_event_receiver DEFINITION DEFERRED.&lt;/P&gt;&lt;P&gt;****************************************************************&lt;/P&gt;&lt;P&gt;*:--- LOCAL CLASSES: Definition&lt;/P&gt;&lt;P&gt;****************************************************************&lt;/P&gt;&lt;P&gt;*:--- Definition der Grid-Klasse&lt;/P&gt;&lt;P&gt;      CLASS lcl_event_receiver DEFINITION.&lt;/P&gt;&lt;P&gt;            PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;*:---       Methoden&lt;/P&gt;&lt;P&gt;            CLASS-METHODS:&lt;/P&gt;&lt;P&gt;*:---           Toolbar (Standard buttons)&lt;/P&gt;&lt;P&gt;                hnd_toolbar&lt;/P&gt;&lt;P&gt;                    FOR EVENT toolbar OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;                        IMPORTING e_object e_interactive,&lt;/P&gt;&lt;P&gt;*:---           Rückgabecodes (Funktion)&lt;/P&gt;&lt;P&gt;                hnd_user_command&lt;/P&gt;&lt;P&gt;                    FOR EVENT user_command OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;                        IMPORTING e_ucomm.&lt;/P&gt;&lt;P&gt;*:---       Private Vereinbarungen&lt;/P&gt;&lt;P&gt;            PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;      ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*:---       Toolbar&lt;/P&gt;&lt;P&gt;            METHOD hnd_toolbar.&lt;/P&gt;&lt;P&gt;                LOOP AT gt_toolbar INTO gf_toolbar.&lt;/P&gt;&lt;P&gt;                     APPEND gf_toolbar TO e_object-&amp;gt;mt_toolbar.&lt;/P&gt;&lt;P&gt;                ENDLOOP.&lt;/P&gt;&lt;P&gt;            ENDMETHOD.&lt;/P&gt;&lt;P&gt;*:---       User Command only if You have defined some&lt;/P&gt;&lt;P&gt;*********************************************&lt;/P&gt;&lt;P&gt;            METHOD hnd_user_command.&lt;/P&gt;&lt;P&gt;                   CLEAR: gt_selline.&lt;/P&gt;&lt;P&gt;                   CLEAR: gt_seltab.&lt;/P&gt;&lt;P&gt;*:---              Selectierte Zeilen werden über Index zurückgeliefert&lt;/P&gt;&lt;P&gt;                   CALL METHOD    hnd_grid_01-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;                        IMPORTING et_index_rows = gt_selline.&lt;/P&gt;&lt;P&gt;                   CALL METHOD    cl_gui_cfw=&amp;gt;flush.&lt;/P&gt;&lt;P&gt;                   IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;*:---                 add your handling, for example&lt;/P&gt;&lt;P&gt;                      CALL FUNCTION 'POPUP_TO_INFORM'&lt;/P&gt;&lt;P&gt;                           EXPORTING&lt;/P&gt;&lt;P&gt;                            titel = gs_repid&lt;/P&gt;&lt;P&gt;                            txt2  = sy-subrc&lt;/P&gt;&lt;P&gt;                            txt1  = 'Error in Flush'(500).&lt;/P&gt;&lt;P&gt;                   ENDIF.&lt;/P&gt;&lt;P&gt;*:---              Hier die ButtonMenüs prozessieren&lt;/P&gt;&lt;P&gt;                   CASE e_ucomm.&lt;/P&gt;&lt;P&gt;                        WHEN 'DO IT'&lt;/P&gt;&lt;P&gt;                             PERFORM doit.&lt;/P&gt;&lt;P&gt;                   ENDCASE.&lt;/P&gt;&lt;P&gt;                   CALL METHOD hnd_grid_01-&amp;gt;refresh_table_display.&lt;/P&gt;&lt;P&gt;            ENDMETHOD.                           "hnd_user_command&lt;/P&gt;&lt;P&gt;      ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2004 08:51:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830853#M43579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-05-05T08:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Report Using Classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830854#M43580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai balaji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write select statement and call screen statement after declarations and check it out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Feb 2014 09:47:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830854#M43580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-22T09:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Report Using Classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830855#M43581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to explain steps the create basic ALV without fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Steps to create basic ALV:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Declare internal table and work area from any structure or table.&lt;/P&gt;&lt;P&gt;2. fetch all the data from the database table into internal table using select query.&lt;/P&gt;&lt;P&gt;3. using CALL SCREEN n statement to create the screen,inside the screen use custom container&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; screen element,give some name for that like ÇUST.&lt;/P&gt;&lt;P&gt;4. In the program write&amp;nbsp; DATA : OBJ TYPE REF TO CL_GUI_CIUSTOM_CONTAINER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA : OBJ1 TYPE REF TO CL_GUI_ALV_GRID.&lt;/P&gt;&lt;P&gt;(CL_GUI_CUSTOM_CONTAINER is a class,just a container for ALV grid)&lt;/P&gt;&lt;P&gt;5. Now u need to create object for CL_GUI_CIUSTOM_CONTAINER&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CREATE OBJECT o_container&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; container_name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'ÇUST'.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;6.&amp;nbsp; &lt;SPAN style="background-color: transparent; color: #575757; font-size: 10pt;"&gt;Now u need to create object for CL_GUI_ALV_GRID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CREATE OBJECT o_grid&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_parent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = OBJ.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;7.&amp;nbsp;&amp;nbsp; After create the object call method SET_TABLE_FOR_FIRST_DISPLAY From the class&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CL_GUI_ALV_GIRD.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;CALL METHOD o_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STRUCTURE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'VBAK'&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHANGING&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; it_outtab&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = IT_ITAB.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;This is basic in ALV,from this u can build to any level.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;Hope u got my explanation.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;Regards&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;RV Karthikeyan.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #f8f8f8; color: #333333;"&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Feb 2014 15:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-using-classes/m-p/830855#M43581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-23T15:55:01Z</dc:date>
    </item>
  </channel>
</rss>

