Set_table_for_first_display not displaying alv grid

HI my call to method set_table_for_first_display is not displying the grid ...this is my code...any idea what can be wrong ?
CALL METHOD cc_alvgrid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
is_layout = ws_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
CHANGING
  it_outtab = it_final_list[]
  it_fieldcatalog = int_fieldcat[]
  IT_SORT =
  IT_FILTER =
EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4 .
IF sy-subrc <> 0.
*--Exception handling
ELSE .
  CALL METHOD cc_alvgrid->refresh_table_display
  EXPORTING
  IS_STABLE =
  I_SOFT_REFRESH =
  EXCEPTIONS
  finished = 1
  OTHERS = 2 .
  IF sy-subrc <> 0.
--Exception handling
  ENDIF.
ENDIF .

======================================================================
*C  O  N  S  T  A  N  T  S
======================================================================
CONSTANTS:
   c_lpa(3)        TYPE         c       VALUE       'LPA'   ,
   c_einkbeleg(9)  TYPE         c       VALUE       'EINKBELEG'.
CONSTANTS:
   C_X(1)     TYPE C VALUE  'X'   ,
   C_9(1)     TYPE C VALUE  '9'   ,
   C_2(1)     TYPE C VALUE  '2'   ,
   C_3(1)     TYPE C VALUE  '3'   ,
   C_7(1)     TYPE C VALUE  '7'   ,
   C_4(1)     TYPE C VALUE  '4'   ,
   C_6(1)     TYPE C VALUE  '6'   ,
   C_10(2)    TYPE C VALUE  '10'  ,
   C_19(2)    TYPE C VALUE  '19'  ,
   C_35(2)    TYPE C VALUE  '35'  ,
   C_LIFNR(5) TYPE C VALUE  'LIFNR',
   C_NAME1(6) TYPE C VALUE 'NAME1',
   C_TABNAME(7)   TYPE C VALUE 'TABNAME',
   C_FNAME(5)     TYPE C VALUE 'FNAME',
   C_OBJECTID(8)  TYPE C VALUE 'OBJECTID',
   C_ITEM(4)      TYPE C VALUE 'ITEM',
   C_SLINE(5)   TYPE C VALUE 'SLINE',
   C_VALUE_NEW(9) TYPE C VALUE 'VALUE_NEW',
   C_VALUE_OLD(9) TYPE C VALUE 'VALUE_OLD',
   C_UDATE(5)     TYPE C VALUE 'UDATE',
   C_UTIME(5)     TYPE C VALUE 'UTIME' ,
   C_USERNAME(8)  TYPE C VALUE 'USERNAME',
   C_CDPOS(5)     TYPE C VALUE 'CDPOS',
   C_CDHDR(5)     TYPE C VALUE 'CDHDR',
   C_LFA1(4)      TYPE C VALUE 'LFA1',
   C_EKKO(4)      TYPE C VALUE 'EKKO',
   c_it_final_list(13) TYPE C VALUE 'IT_FINAL_LIST'.
======================================================================
*->  Final      Output    List
======================================================================
BEGIN           OF         tp_final,
      lifnr    TYPE    ekko-lifnr,
      name1    TYPE    lfa1-name1,
      tabname  TYPE    cdpos-tabname,
      FNAME    TYPE    CDPOS-FNAME,
      OBJECTID TYPE    CDPOS-OBJECTID,
      ITEM     TYPE    CDPOS-TABKEY,
      SLINE    TYPE    CDPOS-TABKEY,
      VALUE_OLD TYPE   CDPOS-VALUE_OLD,
      VALUE_NEW TYPE   CDPOS-VALUE_NEW,
      UDATE     TYPE   CDHDR-UDATE,
      UTIME     TYPE   CDHDR-UTIME,
      USERNAME  TYPE   CDHDR-USERNAME,
END             OF         tp_final.
======================================================================
*A  L  V   G  R  I  D
======================================================================
*--- ALV Grid instance reference
DATA cc_alvgrid TYPE REF TO cl_gui_alv_grid .
*--- Name of the custom control added on the screen
DATA ws_custom_control_name TYPE scrfname VALUE 'CC_ALV' .
*--- Custom container instance reference
DATA cc_ccontainer TYPE REF TO cl_gui_custom_container .
*--- Field catalog table
DATA int_fieldcat TYPE  lvc_t_fcat.
*--- Layout structure
DATA: ws_layout TYPE lvc_s_layo ,
     it_sort  type LVC_T_SORT.
form CREATE_ALV_OBJECT .
IF cc_alvgrid IS INITIAL .
   ----Creating custom container instance
        CREATE OBJECT cc_ccontainer
        EXPORTING
        container_name = ws_custom_control_name
        EXCEPTIONS
        cntl_error = 1
        cntl_system_error = 2
        create_error = 3
        lifetime_error = 4
        lifetime_dynpro_dynpro_link = 5
        others = 6 .
    IF sy-subrc <> 0.
   --Exception handling
    ENDIF.
   ----Creating ALV Grid instance
    CREATE OBJECT cc_alvgrid
    EXPORTING
          i_parent = cc_ccontainer
          EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init = 2
          error_cntl_link = 3
          error_dp_create = 4
          others = 5 .
          IF sy-subrc <> 0.
         --Exception handling
          Endif.
Endif.
endform.                    "
form BUILD_FIELDCATALOG .
  PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_LIFNR TEXT-007 C_X C_10  .
  PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_NAME1 TEXT-008 ' ' C_35  .
  PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_TABNAME TEXT-009 ' ' C_10  .
PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_FNAME TEXT-010 ' ' C_10  .
PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_OBJECTID TEXT-011 ' ' C_10 .
PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_ITEM TEXT-012 ' ' C_10  .
  PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_SLINE TEXT-013 ' ' C_10  .
PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_VALUE_OLD TEXT-014 ' ' C_10.
PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_VALUE_NEW TEXT-015 ' ' C_10
PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_UDATE TEXT-016 ' ' C_10  .
PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_UTIME TEXT-017 ' ' C_10  .
PERFORM FILL_FIELDS_OF_FIELDCATALOG   USING
                         c_it_final_list C_USERNAME TEXT-018 ' ' C_10  .
endform.                    " BUILD_FIELDCATALOG
form FILL_FIELDS_OF_FIELDCATALOG  using    p_tab_name
                                           p_field_name
                                           p_header
                                           p_key
                                           p_len.
*--- Field catalog Structure
DATA ls_fieldcat TYPE LVC_S_FCAT.
W_POS = W_POS + 1.
ls_fieldcat-COL_POS = W_POS.
ls_fieldcat-KEY     = p_key.
ls_fieldcat-TABNAME = p_tab_name.
ls_fieldcat-FIELDNAME = p_field_name.
ls_fieldcat-SELTEXT   = p_header.
ls_fieldcat-COLTEXT   = p_header.
ls_fieldcat-OUTPUTLEN = p_len.
APPEND ls_fieldcat TO int_fieldcat.
form BUILD_LAYOUT .
  CLEAR ws_layout.
REFRESH I_SLIS_SORT.
*-Set ALV Layout For List
  wS_LAYOUT-ZEBRA                = C_X.
  wS_LAYOUT-GRID_TITLE           = 'Scheduling Agreement Changes'.
**Setting The Sort Criteria
LS_SLIS_SORT-FIELDNAME        = C_KUNR.
LS_SLIS_SORT-TABNAME          = C_I_OUTAB_HDR.
LS_SLIS_SORT-SPOS             = C_1.
LS_SLIS_SORT-UP               = C_X.
APPEND LS_SLIS_SORT TO I_SLIS_SORT.
LS_SLIS_SORT-FIELDNAME        = C_WERKS.
LS_SLIS_SORT-TABNAME          = C_I_OUTAB_HDR.
LS_SLIS_SORT-SPOS             = 2.
LS_SLIS_SORT-UP               = C_X.
APPEND LS_SLIS_SORT TO I_SLIS_SORT.
LS_SLIS_SORT-FIELDNAME        = C_VBELN.
LS_SLIS_SORT-TABNAME          = C_I_OUTAB_HDR.
LS_SLIS_SORT-SPOS             = 3.
LS_SLIS_SORT-SUBTOT           = C_X.
LS_SLIS_SORT-UP               = C_X.
APPEND LS_SLIS_SORT TO I_SLIS_SORT.
endform.                    " BUILD_LAYOUT
form BUILD_FINAL_TABLE .
loop at it_cdpos into ws_cdpos.
   move:
     ws_cdpos-tabname   to     ws_final_list-tabname,
     ws_cdpos-FNAME     to     ws_final_list-FNAME   ,
     ws_cdpos-OBJECTID  to     ws_final_list-OBJECTID     ,
     ws_cdpos-tabkey      to   ws_final_list-ITEM     ,
     ws_cdpos-tabkey     to    ws_final_list-SLINE     ,
     ws_cdpos-VALUE_OLD to     ws_final_list-VALUE_OLD  .
     Read table it_ekko into ws_ekko with key ebeln = ws_cdpos-OBJECTID.
     If sy-subrc = 0.
        ws_final_list-LIFNr  = ws_ekko-lifnr.
        Read table it_lfa1 into ws_lfa1 with key lifnr = ws_ekko-lifnr.
         If sy-subrc = 0.
            ws_final_list-name1  = ws_lfa1-name1.
         endif.
     Endif.
     Read table it_cdhdr into ws_cdhdr with key
                                       OBJECTCLAS = ws_cdpos-OBJECTCLAS
                                       OBJECTID   = ws_cdpos-OBJECTID
                                       CHANGENR   = ws_cdpos-CHANGENR.
     If sy-subrc = 0.
         ws_final_list-UDATE    = ws_cdhdr-UDATE.
         ws_final_list-UTIME    = ws_cdhdr-UTIME.
         ws_final_list-USERNAME = ws_cdhdr-USERNAME.
     endif.
    Append   ws_final_list to   it_final_list.
    clear :  ws_final_list , ws_ekko , ws_lfa1 , ws_cdhdr.
endloop.
endform.                    " BUILD_FINAL_TABLE
form DISPLAY_DATA .
CALL METHOD cc_alvgrid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
is_layout = ws_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
CHANGING
  it_outtab = it_final_list[]
  it_fieldcatalog = int_fieldcat
  IT_SORT =
  IT_FILTER =
EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4 .
IF sy-subrc <> 0.
*--Exception handling
ELSE .
  CALL METHOD cc_alvgrid->refresh_table_display
  EXPORTING
  IS_STABLE =
  I_SOFT_REFRESH =
  EXCEPTIONS
  finished = 1
  OTHERS = 2 .
  IF sy-subrc <> 0.
--Exception handling
  ENDIF.
ENDIF .
endform.                    " DIS

Similar Messages

  • Display ALV GRID Using Dynamic Internal Table

    Hi all,
    I try to display ALV Grid using Dynamic Internal Table, but when i activate my program, i get an error message "DYN_TABLE" is not type-compatible with formal parameter "IT_OUTTAB". ( DYN_TABLE is my Dynamic Itab).
    Anybody can help me how to passing Dynamic Itab into ALV Grid ?? Of ALV Grid only accept static Itab ??
    Thanks,

    Hi Vijay,
    It's doesn't work, and make new error "Formal parameter "IT_OUTTAB[]" does not exist. However, the parameter "IT_OUTTAB" has a similar name."
    Because the method is:
    CALL METHOD <ref. var. to CL_GUI_ALV_GRID>->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE = <any type (ANY)>
    I_STRUCTURE_NAME = <string of type DD02L-TABNAME>
    IS_VARIANT = <structure of type DISVARIANT>
    I_SAVE = <var. of type CHAR01>
    I_DEFAULT = <var. of type CHAR01>
    IS_LAYOUT = <structure of type LVC_S_LAYO>
    IS_PRINT = <structure of type LVC_S_PRNT>
    IT_SPECIAL_GROUPS = <internal table of type LVC_T_SGRP>
    IT_TOOLBAR_EXCLUDING = <internal table of type UI_FUNCTIONS>
    IT_HYPERLINK = <internal table of type LVC_T_HYPE>
    IT_ALV_GRAPHICS = <internal table of type DTC_T_TC>
    CHANGING
    IT_OUTTAB = <internal table>
    IT_FIELDCATALOG = <internal table of type LVC_T_FCAT>
    IT_SORT = <internal table of type LVC_T_SORT>
    IT_FILTER = <internal table of type LVC_T_FILT>
    Thanks,

  • Problem in displaying Alv grid output  using oops........

    hi,
    i have two problems in displaying ALV grid output Using Oops.
    1) How to modify the fieldcatalog after we getting a field catalog using general FM.
    2) initialy it is displaying 13 fields but there are 63 fields .
       eventhough we chage the layout to 63 fields it is displaying only 13 fields , these 13 fields may be different based on our selection but count  of displayed fileds are same . how can display 63 fields at a time .

    Hi,
    You can chnage using below code:
    loop at gt_fieldcat.
    if <gt_fieldcat-field_name> = 'FIELDNAME'.
    endif.
    modify gt_fieldcat.
    clear gt_fieldcat.
    endloop.
    Make sure that all the field should not have no_out = 'X' and tech = 'X'.
    Thanks,
    Sriram Ponna.

  • Hide some cells while displaying ALV GRID !

    Hi guyz!
        Back with lill query,
        While displaying ALV GRID using REUSE_ALV_GRID... FMs ,i need to hide
        some cells by default, when the lists is generated.But those cells should
        be  availble to be displayed by the user from ALV layout settings.
        Please advise
    Thanks
    jahan

    Hi, Check for fm documentation.
    Only relevant if layout parameter
    LAYOUT-GET_SELINFOS of IMPORTING structure IS_LAYOUT is set.
    Complex type for modifying information displayed on the selection dialog box:
    mode:              'R' = Only entries passed in internal table
                              IS_SEL_HIDE-T_ENTRIES are output on
                              the dialog box. Selection information
                              obtained by the list tool by reading the
                              selection screen again (only if the report
                              is called with selection screen) are
                              replaced by the entries passed.
                       'S' = The selection information obtained by the
                              list tool by reading the selection screen
                              of the calling report again, are modified
                              by the entries of table
                              IS_SEL_HIDE-T_ENTRIES.
    t_entries:         Table with selection information
    t_entries-mode:   'A' = Display selection information of the current
                             table row on the information dialog box.
                      'D' = Do not display selection information of the
                             the Select option or of parameter SELNAME
                             on the dialog box.
    t_entries-selname: (required only if t_entries-mode = 'D')
                       name of Select option or parameter
    The following table fields are only required if t_entries-mode = 'A'. They contain the selection information to be added.
    t_entries-field:  DDIC field name of the field for which selection
                       information is to be displayed
    t_entries-table:  DDIC table name of t_entries-field.
    t_entries-stext:  Field description on the information dialog box.
                      If t_entries-field and t_entries-table were
                      filled, this text is taken from the DDIC.
    t_entries-valuf:  Selection condition from-value (external format)
    t_entries-valut:  Selection condition to-value (external format)
    t_entries-sign0:  (I)nclusive (E)xclusive
    t_entries-optio:  All values of the option field of the Select
                      option are allowed.
    The remaining fields are used internally and are irrelevant to the caller.
    aRs

  • Reg. can we display alv grid using field groups (extracts)

    Hi,
    can we display alv grid using field groups (extracts). is this possible. i have to develop a blocked alv.
    tnks
    Yerukala Setty

    No, you will need the data in an internal table to use ALV.
    Cheers
    Allan

  • How to display ALV grid in a graphical display??

    Hello All,
    I want to display the ALV grid output in graphical format. I did not see any particular Function code or event in ALV for graphs. Hence I designed a PF status myself. But when I use the Function module "Graph_2D", it gives me an error.
    Can you guys suggest which is the best Function module to display the ALV output in graphical format?
    Regards,
    Abhishek
    P.S: Points will be awarded to the answers which will solve the issue

    This piece of code is giving graphical output , u can check it in ur machine.
    REPORT  ZSKC_GRAPH.
    data : begin of itab occurs 0,
            day type i,
            val type i,
           end   of itab.
    start-of-selection.
      do 5 times.
        clear itab.
        itab-day = sy-index.
        itab-val = sy-index + ( sy-index * sy-index ).
        append itab.
      enddo.
      CALL FUNCTION 'GRAPH_2D'
        TABLES
          DATA                     = itab
       EXCEPTIONS
         GUI_REFUSE_GRAPHIC       = 1
         OTHERS                   = 2
      IF SY-SUBRC <> 0.
    *    Give some message.
      ENDIF.
    You just pass ur internal table to this Function module - Do you need to display column captions etc ?? In that case you will have to use GRAPH_MATRIX_2D.

  • Generic function displaying alv grid for undefined structure

    Hi experts,
    I'm doing my first steps on abap development (Totally noob).
    I'm writing some little reports based on simple selections (1 or 2 tables).
    In every report, I've defined a structure (internal table) that i'm displaying with an ALV Grid.
    In every report, I need to create a catalog for my structure in order to make the alv grid working.
    What I would like to do is :
    Create a function that receives a undefined structure (for all my reports) as a parameter.
    This function sould create the catalog for the coresponding structure and call the alv grid function to display the data's contained in this structure.
    The goal is : In every report, I would like to use this function to show the selected data's without taking care of catalogs, alv grid, etc...
    Is it possible ?
    I really don't see how I can do that... Does anybody already tried something like that ?
    Thank you for your help
    Regards
    Quentin

    Hi,
    In this method Pass the structure name-
    CALL METHOD gh_grid->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME = "<- here pass the structure
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    IS_LAYOUT = "<-Layout variable if using layout
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    CHANGING
    it_outtab = gt_line[]
    it_fieldcatalog = gt_fieldcat
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4

  • Re-Displaying ALV Grid

    This is a follow-up to a question I posed earlier regarding my inability to get the ALV grid to display with a new table name.
    Can anyone tell me what I need to do to get it to re-display with the new table name?
    To use it, you enter a table name in the editor screen.  Screens 100 and 200 are just custom containers with no other attributes.
    Thanks (and points) for any help!
    PROGRAM zz_temp.
    TYPES: BEGIN OF type_text_lines,
      line(2048) TYPE c,
    END OF type_text_lines.
    DATA: g_editor             TYPE REF TO cl_gui_textedit,
          g_r_editor_container TYPE REF TO cl_gui_custom_container,
          g_r_alv_grid         TYPE REF TO cl_gui_alv_grid ,
          g_r_alv_container TYPE REF TO cl_gui_custom_container ,
          g_container          TYPE scrfname VALUE 'ALV_CUSTOM_CONTROL_0200' ,
          g_t_text_lines       TYPE TABLE OF type_text_lines,
          g_t_fcat             TYPE lvc_t_fcat,
          g_ok_code            TYPE sy-ucomm,
          g_save_ok            TYPE sy-ucomm,
          g_repid              TYPE sy-repid,
          l_tab(20)            TYPE c.
    FIELD-SYMBOLS <struc>  TYPE ANY.
    FIELD-SYMBOLS <tab>    TYPE table.
    DATA s_ref             TYPE REF TO data.
    DATA t_ref             TYPE REF TO data.
    START-OF-SELECTION.
      CALL SCREEN 100.
    FORM runsql.
      CONCATENATE LINES OF g_t_text_lines INTO l_tab.
      CREATE DATA s_ref      TYPE (l_tab).
      CREATE DATA t_ref      TYPE TABLE OF (l_tab).
      ASSIGN t_ref->*    TO <tab>.
      SELECT * FROM (l_tab) INTO TABLE <tab>.
      CALL SCREEN 200.
    ENDFORM."
    MODULE pbo OUTPUT.
      CASE sy-dynnr.
        WHEN '0100'.
          IF g_editor IS INITIAL.
            SET PF-STATUS 'MAIN100'.
            g_repid = sy-repid.
            CREATE OBJECT g_r_editor_container
            EXPORTING
              container_name = 'TEXTEDITOR1'
            EXCEPTIONS
              cntl_error = 1
              cntl_system_error = 2
              create_error = 3
              lifetime_error = 4
              lifetime_dynpro_dynpro_link = 5.
            CREATE OBJECT g_editor
            EXPORTING
              parent = g_r_editor_container
              wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
            EXCEPTIONS
              OTHERS = 1.
          ENDIF.
        WHEN '0200'.
          PERFORM create_alv_grid.
      ENDCASE.
    ENDMODULE."
    MODULE pai INPUT.
      g_save_ok = g_ok_code.
      CASE g_save_ok.
        WHEN 'BACK'.
        WHEN 'EXIT'.
        WHEN 'CANCEL'.
          PERFORM exit_program.
        WHEN 'RUNSQL'.
          CALL METHOD g_editor->get_text_as_r3table
            IMPORTING
              table  = g_t_text_lines
            EXCEPTIONS
              OTHERS = 1.
          PERFORM runsql.
      ENDCASE.
    ENDMODULE."
    FORM create_field_catalog.
      DATA: l_structure_name LIKE  dd02l-tabname.
      CLEAR g_t_fcat.
      l_structure_name = l_tab.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = l_structure_name
          i_bypassing_buffer     = 'X'
        CHANGING
          ct_fieldcat            = g_t_fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    ENDFORM."
    FORM create_alv_grid.
      DATA:        l_s_layout      TYPE lvc_s_layo.
      CLEAR: g_r_alv_container,
             g_r_alv_grid.
      PERFORM create_field_catalog.
      CREATE OBJECT g_r_alv_container
             EXPORTING container_name = g_container.
      CREATE OBJECT g_r_alv_grid
             EXPORTING i_parent = g_r_alv_container.
      CALL METHOD g_r_alv_grid->set_table_for_first_display
        EXPORTING
          is_layout          = l_s_layout
          i_bypassing_buffer = 'X'
        CHANGING
          it_outtab          = <tab>
          it_fieldcatalog    = g_t_fcat.
      CALL METHOD g_r_alv_grid->refresh_table_display.
    ENDFORM."
    FORM exit_program.
      CALL METHOD cl_gui_cfw=>flush
        EXCEPTIONS
          OTHERS = 1.
      LEAVE PROGRAM.
    ENDFORM."

    Hello Bjorn
    I would recommend a few changes:
    (1) Create the container and ALV grid instance for screen '200' only once (in a PBO module of screen '200' using a switch:
    CHECK ( g_r_alv_container IS INITIAL ).
    (2) Call method SET_TABLE_FOR_FIRST_DISPLAY in a PBO module of screen '200'. Perhaps add a "flush" to this PBO module, too.
    Regards
       Uwe

  • Calling smartform and displaying ALV grid in ABAP WEBDYNPRO

    Hi all,
    I am new to ABAP web dynpro.I ahve few custom reports which are simple ALV list reports which I now need to convert to ABAP web dynpro application .
    For one particular report,based on the selection screen input,I need to display the ALV list and when I select the records from the ALV list,I need to call a smartform on clik of a push button.
    My questions:
    1. Im using 'REUSE_ALV_GRID_DISPLAY' FM  to display the o/p in my report.Is there any similar FM in webdynpro ABAP which will display my list in ALV GRID in my web dynpro application??/
    2. How to call a smartfrm in ALV grid in web dynpro??
    Edited by: abap_1000 on Jan 9, 2011 6:09 PM

    Hi,
    You can search SDN, there are several posts available. Just to get some idea, you can check --
    [Beginneru00B4s questions on WDA ALV;
    [Reg ALV Display;
    For clicking event on ALV --
    [Reg Row Data fetching on click in ALV;
    For ALV display on WDA --
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true]
    Thanks.
    Kumar Saurav.

  • Can I filter by value which is not displayed in grid columns?

    In excel it is possible to filter by value of measure which is not displayed in the report.
    How can I possibly do this in Performance Point Grid? (in filter by value there I only see the measures in columns).
    Please advise
    Namnami

    I found it is possible to filter by value by changing the MDX in the query tab.
    (I filtered by certain existing value in design, then switched to Query and changed to the measure which is not displayed). I shows up correctly.
    The problem is, once I change the query, I get an error when tring to connect a filter on a grid column:
    "consumer parameter no-longer exists in the consumer webpart"
    The grid looks "frozen"- cannot drill up / down etc.
    How can I filter by value which is not displayed without loosing the ability to attach a filter to the grid?
    Namnami

  • Function module when used should not display ALV

    Hi ,
    All ABAP Gurus
    I want to use a function module WS_DELIVERY_MONITOR which should give the VBELN on the basis of CHARG in internal table so that on the basis of VBELN I can fulfil further requirement and display the final output in ALV.
    But this function module when executed display an ALV.
    My requirement is that it should retrieve all the VBELN on the basis of CHARG (which is in the internal table and is passed to the function module) in an internal table and do not display the ALV so that when all the VBELN come in internal table then I can perform further calculation.
    Please guide me in this matter.
    Thanks & Regards
    Bharti Jain

    Hi Bharti,
    Please try calling FM 'WS_LM_DATA_SELECTION' instead. This FM is callled inside main FM 'WS_DELIVERY_MONITOR' and is used to fetch data. You will only need to fill extra import parameter for using  this FM ( if_flag_inbound) and two changing tables  (lt_postab) and  ( lt_postab_kodat), which will have results. 'if_flag_inbound' field will be having value X for all inbound cases.
    I have used the same FM to get open deliveries:
    CALL FUNCTION 'WS_LM_DATA_SELECTION'
        EXPORTING
          if_proctype                 = c_proc_type_f
        TABLES
          it_matnr                    = i_deliv_matnr
          it_lgort                    = i_deliv_lgort
          it_lfart                    = i_deliv_type
          it_kostk                    = i_deliv_kostk
          it_wbstk                    = i_deliv_wbstk
          ct_postab                   = i_deliv_nos
        CT_POSTAB_KODAT             =
        EXCEPTIONS
          no_data_found               = 1
          wrong_proc_type             = 2
          OTHERS                      = 3 .
      IF sy-subrc = 0.
    **-Calculate open delivery quantity
        LOOP AT i_deliv_nos INTO wa_deliv_nos
                                 WHERE NOT posnr IS INITIAL.
          pc_open_deliv_qty = pc_open_deliv_qty + wa_deliv_nos-lfimg.
        ENDLOOP.
      ENDIF.
    <removed by moderator>
    Edited by: Thomas Zloch on Sep 7, 2010 9:06 AM - please do not ask for ...

  • Standard buttons not displaying ALV when added button by creating PF status

    Hi  All,
    I have added a button(using SE41) in application toolbar for ALV grid using Factory method.But the problem is I am unable to see the standard tool bar buttons(Layout,Download,Mail etc).
    Even I tried adding buttons(using standard FCODES) to the PFstatus.Now the buttons are visible but the functionality is not working for all buttons.Its working only for Graphic and Change layout buttons.
    Can any one suggest...??
    -Phaniram

    Disregard DKS's response...that's the older stuff and you're using NetWeaver ALV.
    In SALV you can cause those buttons to appear, but you may need to copy the SALV_STANDARD GUI from one of the SALV* named program using SE80...sounds like you have that part, but you may need to turn functions ON...
    Perhaps something like this would help:
    data:  gr_f_list  type ref to cl_salv_functions_list,
             gr_alv     type ref to cl_salv_table,
    SALV toolbar & GUI functions
      gr_f_list = gr_alv->get_functions( ).     "Get Toolbar functions
      gr_f_list->set_all( abap_true ).          "All On
      gr_f_list->set_view_lotus( abap_false ).  "Lotus 123 off
      gr_f_list->set_view_excel( abap_false ).  "Excel in Place Off
      gr_f_list->set_graphics( abap_false ).    "Graph tool off
    For undesired buttons, set each tool OFF after turning all ON.

  • Display alv grids in selection screen based on the user event

    Hi All,
    I am workign on displaying ALV in same selection screen.I am able to display the ALV in selection screen.
    But i have 2 buttons in my selection screen 'Create' and 'change'.
    When i click on create i need  with some type of data and when i click on 'change' my alv grid another type of data.Ex: if i click on crate mara data should be dispalyed when i click on change makt table data should be dispalyed and also i have user defined buttons are in my grids.
    So i have used 2 containers to dispaly to different data.I am able to display the perfectly but the problem is first time when i click on create the grid is displaying when i click on change button  the create alv grid is displaying down and change data is dispalying up.
    I need only one alv grid at a time.Can anybody please let me know how can i do this.
    Thanks,
    Taragini

    Hello,
    Also I would suggest if it is relevant data maintain in one interntal table and show/hide based on condition
    through fieldcatalog (NO_OUT) parameter.
    Thanks

  • Hiding few columns before displaying alv grid output

    Hi All,
    I struck up at hiding few columns before displaying alv output. I have used used FM: REUSE_ALV_GRID_DISPLAY. By using this i am displaying 29 fields to the output. But before displaying the output i want to hide few columns among them, and also those fields have to be avialable for further selection by the user by using layout.
    Kindly help me in this,
    Regards
    Srinivas K

    Hi,
    In field catalog set NO_OUT='X' for all the columns you want to hide. They will be available when changing layout for ALV, so you can show them at any time.
    Regards
    Marcin

  • 'Field Catalog not Found' - ALV Grid using CustomContainer+Fcat

    The Following piece of code throws 'Field Catalgo not found'
    Please give me necessary changes in the code.
    Thanks & Regards
    Harsha Ch.
    *& Report  ZCHK_ALV_CUSCONT1                                           *
    REPORT  zchk_alv_cuscont1                       .
    DATA itab LIKE STANDARD TABLE OF mara WITH HEADER LINE.
    SELECT matnr meins mbrsh  FROM mara INTO CORRESPONDING FIELDS OF TABLE itab UP TO 10 ROWS.
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
      DATA fcat1 TYPE lvc_t_fcat WITH HEADER LINE.
      DATA  fcat TYPE STANDARD TABLE OF  lvc_s_fcat.
      DATA: c1 TYPE REF TO cl_gui_custom_container.
      DATA: a1 TYPE REF TO cl_gui_alv_grid.
      CREATE OBJECT c1 EXPORTING container_name = 'CC_ALV'.
      CREATE OBJECT a1 EXPORTING i_parent = c1.
      PERFORM populate_fcat.
      PERFORM generate_grid.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Form  POPULATE_FCAT
          text
    -->  p1        text
    <--  p2        text
    FORM populate_fcat .
      fcat1-reptext = 'MATNR'.
      fcat1-fieldname = 'MATNR'.
      fcat1-col_pos = '1'.
      APPEND fcat1.
      CLEAR fcat1.
      fcat1-reptext = 'MEINS'.
      fcat1-fieldname = 'MEINS'.
      fcat1-col_pos = '2'.
      APPEND fcat1.
      CLEAR fcat1.
      fcat1-reptext = 'MBRSH'.
      fcat1-fieldname = 'MBRSH'.
      fcat1-col_pos = '3'.
      APPEND fcat1.
      CLEAR fcat1.
    ENDFORM.                    " POPULATE_FCAT
    *&      Form  GENERATE_GRID
          text
    -->  p1        text
    <--  p2        text
    FORM generate_grid .
    CALL METHOD a1->set_table_for_first_display
    EXPORTING
       I_BUFFER_ACTIVE               =
       I_BYPASSING_BUFFER            =
       I_CONSISTENCY_CHECK           =
         I_STRUCTURE_NAME              = 'MARA'
       IS_VARIANT                    =
       I_SAVE                        =
       I_DEFAULT                     = 'X'
       IS_LAYOUT                     =
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
      CHANGING
        it_outtab                     = itab[]
       IT_FIELDCATALOG               = fcat
       IT_SORT                       =
       IT_FILTER                     =
    EXCEPTIONS
       INVALID_PARAMETER_COMBINATION = 1
       PROGRAM_ERROR                 = 2
       TOO_MANY_LINES                = 3
       others                        = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " GENERATE_GRID

    Hi
    This works fine:
    *& Report ZCHK_ALV_CUSCONT1 *
    DATA ITAB LIKE STANDARD TABLE OF MARA WITH HEADER LINE.
    DATA FCAT1 TYPE LVC_T_FCAT WITH HEADER LINE.
    DATA FCAT TYPE STANDARD TABLE OF LVC_S_FCAT.
    DATA: C1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: A1 TYPE REF TO CL_GUI_ALV_GRID.
    START-OF-SELECTION.
      SELECT MATNR MEINS MBRSH FROM MARA INTO CORRESPONDING FIELDS OF TABLE
      ITAB UP TO 10 ROWS.
      CALL SCREEN 100.
    *& Module STATUS_0100 OUTPUT
    * TEXT
    MODULE STATUS_0100 OUTPUT.
    *  PERFORM POPULATE_FCAT.
      PERFORM GENERATE_GRID.
    ENDMODULE. " STATUS_0100 OUTPUT
    *       FORM POPULATE_FCAT                                            *
    FORM POPULATE_FCAT .
      FCAT1-REPTEXT = 'MATNR'.
      FCAT1-FIELDNAME = 'MATNR'.
      FCAT1-COL_POS = '1'.
      APPEND FCAT1.
      CLEAR FCAT1.
      FCAT1-REPTEXT = 'MEINS'.
      FCAT1-FIELDNAME = 'MEINS'.
      FCAT1-COL_POS = '2'.
      APPEND FCAT1.
      CLEAR FCAT1.
      FCAT1-REPTEXT = 'MBRSH'.
      FCAT1-FIELDNAME = 'MBRSH'.
      FCAT1-COL_POS = '3'.
      APPEND FCAT1.
      CLEAR FCAT1.
    ENDFORM. " POPULATE_FCAT
    *       FORM GENERATE_GRID                                            *
    FORM GENERATE_GRID .
      CHECK C1 IS INITIAL.
      CREATE OBJECT C1 EXPORTING CONTAINER_NAME = 'CC_ALV'.
      CREATE OBJECT A1 EXPORTING I_PARENT = C1.
      CALL METHOD A1->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_STRUCTURE_NAME = 'MARA'
        CHANGING
          IT_OUTTAB = ITAB[].
    ENDFORM. " GENERATE_GRID
    Max

Maybe you are looking for