ABAP webdynpro :Creating column in alv report

I have generated a dynamic alv report when ever unwanted columns appear i deleted column using IF_SALV_WD_COLUMN_SETTINGS~DELETE_COLUMN.
some times I want to create columns in alv .
how to do that ?code sample will be much usefull.

Hi,
the same interface you used to delete has the create_column method.
IF_SALV_WD_COLUMN_SETTINGS~CREATE_COLUMN( id = 'id of the column' ).
" create the cell_editor.
data:
lr_text type ref to cl_salv_wd_uie_text_view.
create object lr_text.
lr_text->set_text_fieldname( ls_fields-fieldname ).
lr_column->set_cell_editor( lr_text ).

Similar Messages

  • How to display subtotals in separate column in alv report?

    hi,
    I am displayed the subtotals  for QUantity field BDMNG in Reuse_alv_grid_display  in the same column.
    but I want to display subtotal in separate column.
    How to display subtotals in separate column in alv report?
    thanks&regards.
    samba.k

    Hi
    As far as i know you can't do this,the option you have is to create one more column (subtotal) and populate it by manual calculation at every subtotal (not alv subtotal but yours) .
    Best Regards
    Yossi

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi,
    I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDIT_02
    BCALV_TEST_GRID_EDIT_04_FORMS
    BCALV_TEST_GRID_EDITABLE
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_EDIT_05
    BCALV_EDIT_06
    BCALV_EDIT_07
    BCALV_EDIT_08
    BCALV_FULLSCREEN_GRID_EDIT
    But all these are using OO Concepts.
    Please help.
    Regards,
    Smruthi

    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
    fieldcatalog-edit             = 'X'
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_pf_status_set = 'STATUS'
                i_callback_top_of_page   = 'TOP-OF-PAGE'
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
      LOOP AT it_ekko INTO wa_ekko.
        ld_color = ld_color + 1.
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM top-of-page                                              *
    FORM top-of-page.
      WRITE:/ 'This is First Line of the Page'.
    ENDFORM.
          FORM status                                                   *
    FORM status USING rt_extab TYPE slis_t_extab.  .
      SET PF-STATUS 'ALV'.
    ENDFORM.
          FORM USER_COMMAND                                          *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.            
      DATA ref1 TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref1.
      CALL METHOD ref1->check_changed_data.
      CASE rf_ucomm.
    when 'SAVE'.
    get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
    endcase.
    endform.
    ENDFORM.
    here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
    create a custom PF status and create push buttons and assign your ok codes in your PF status.
    if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
    Hope this will help you.
    Regards,
    phani.

  • How to create an interactive alv report in which some parameters

    hi all,
    i want to create an interactive alv report in which some parameters in selection screen
    & when fill those & press f8 then an alv list display will show & when user double click on
    any row then those contents get shown in header details of module pool program  which call by
      tcode mentioned in same alv .And same an interactive alv report used for change & display.
    please help me give me some code same as  required above.
    ketan
    abap consultant.
    Edited by: ketan pande on Feb 14, 2009 6:09 AM

    Hi Ketan,
    Please find Sample Code.
    TYPE-POOLS:slis.
    DATA:
      w_carrid TYPE scarr-carrid,
      it_fieldcat TYPE slis_t_fieldcat_alv,
      fs_fieldcat LIKE LINE OF it_fieldcat,
      it_eventcat TYPE slis_t_event,
      fs_eventcat LIKE LINE OF it_fieldcat.
    DATA:
      t_spfli LIKE STANDARD TABLE OF spfli,
      fs_spfli LIKE LINE OF t_spfli,
      t_sflight LIKE STANDARD TABLE OF sflight,
      fs_sflight LIKE LINE OF t_sflight.
    SELECT-OPTIONS:
      s_carrid FOR w_carrid.
    START-OF-SELECTION.
      SELECT * FROM spfli INTO TABLE t_spfli WHERE carrid IN s_carrid.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = sy-repid
          i_callback_user_command = 'PICK'
          i_structure_name        = 'SPFLI'
        TABLES
          t_outtab                = t_spfli
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *&      Form  PICK
    FORM pick USING command LIKE sy-ucomm
                    selfield TYPE slis_selfield.
      READ TABLE t_spfli INTO fs_spfli INDEX selfield-tabindex.
      CASE command.
        WHEN '&IC1'.
          SELECT * FROM sflight
          INTO TABLE t_sflight
         WHERE carrid = fs_spfli-carrid
           and connid = fs_spfli-connid.
          CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
             i_program_name               = sy-repid
           I_INTERNAL_TABNAME           =
             i_structure_name             = 'SFLIGHT'
           I_CLIENT_NEVER_DISPLAY       = 'X'
           I_INCLNAME                   =
           I_BYPASSING_BUFFER           =
           I_BUFFER_ACTIVE              =
            CHANGING
              ct_fieldcat                  = it_fieldcat
           EXCEPTIONS
             inconsistent_interface       = 1
             program_error                = 2
             OTHERS                       = 3
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
           I_INTERFACE_CHECK              = ' '
           I_BYPASSING_BUFFER             =
           I_BUFFER_ACTIVE                = ' '
             i_callback_program             = sy-repid
           I_CALLBACK_PF_STATUS_SET       = ' '
           I_CALLBACK_USER_COMMAND        = ' '
           I_STRUCTURE_NAME               =
           IS_LAYOUT                      =
             it_fieldcat                    = it_fieldcat
           IT_EXCLUDING                   =
           IT_SPECIAL_GROUPS              =
           IT_SORT                        =
           IT_FILTER                      =
           IS_SEL_HIDE                    =
           I_DEFAULT                      = 'X'
           I_SAVE                         = ' '
           IS_VARIANT                     =
            it_events                      = it_eventcat
           IT_EVENT_EXIT                  =
           IS_PRINT                       =
           IS_REPREP_ID                   =
           I_SCREEN_START_COLUMN          = 0
           I_SCREEN_START_LINE            = 0
           I_SCREEN_END_COLUMN            = 0
           I_SCREEN_END_LINE              = 0
           IR_SALV_LIST_ADAPTER           =
           IT_EXCEPT_QINFO                =
           I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
         IMPORTING
           E_EXIT_CAUSED_BY_CALLER        =
           ES_EXIT_CAUSED_BY_USER         =
            TABLES
              t_outtab                       = t_sflight
          EXCEPTIONS
            program_error                  = 1
            OTHERS                         = 2
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "pick
    Hope this will Be Helpful
    Thanks
    Kalyan

  • To increase dynamically columns in ALV report

    hi everyone,
    Could any one give me a sample code ,to increase columns in ALV report output dynamically as record increase, i need to increase columns so that i can keep all the years data of a particular project in one row

    Please refer to the code piece
    *& Report  ZTEST_DYNAMIC_ALV
    REPORT  ztest_dynamic_alv.
    DATA: gt_fcat TYPE lvc_t_fcat,
          gw_grid TYPE REF TO cl_gui_alv_grid.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
    PARAMETERS: p_number TYPE i.
    SELECTION-SCREEN : END OF BLOCK b1.
    ** Start of Selection
    START-OF-SELECTION.
    *1) Create Base Catalog
      PERFORM sub_create_base_catalog.
    *2) Add additional fields
      PERFORM sub_fill_addtional.
    *3) Display output data.
      PERFORM sub_display_output.
    *&      Form  SUB_CREATE_BASE_CATALOG
    *       Create Base catalog for display
    FORM sub_create_base_catalog .
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'ZSTRCT'
        CHANGING
          ct_fieldcat            = gt_fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    ENDFORM.                    " SUB_CREATE_BASE_CATALOG
    *&      Form  SUB_FILL_ADDTIONAL
    *       text
    FORM sub_fill_addtional .
      DATA: lw_fcat  TYPE lvc_s_fcat,
            lw_from  TYPE i,
            lw_data  TYPE REF TO data,
            lw_fname TYPE stfna,
            lw_index(2) TYPE n.
      FIELD-SYMBOLS: <l_output> TYPE table.
      DESCRIBE TABLE gt_fcat LINES lw_from.
      DO p_number TIMES.
        lw_from = lw_from + 1.
        lw_index = sy-index.
        CONCATENATE 'DYNA' lw_index INTO lw_fname SEPARATED BY '-'.
        lw_fcat-col_pos = lw_from.
        lw_fcat-fieldname = lw_fname.
        lw_fcat-tabname = '1'.
       lw_fcat-scrtext_l = lw_fcat-scrtext_m = lw_fcat-scrtext_s = lw_fname.
        APPEND lw_fcat TO gt_fcat.
        CLEAR lw_fcat.
      ENDDO.
    ** Convert gt_fcat to internal table.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = gt_fcat
        IMPORTING
          ep_table                  = lw_data
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc = 0.
    ** Create the internal table form field catalog.
        ASSIGN lw_data->* TO <l_output>.
    ** display the ALV data.
        CREATE OBJECT gw_grid
          EXPORTING
            i_parent          = cl_gui_container=>screen0
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5.
        IF sy-subrc = 0.
          CALL METHOD gw_grid->set_table_for_first_display
            CHANGING
              it_outtab                     = <l_output>
              it_fieldcatalog               = gt_fcat
            EXCEPTIONS
              invalid_parameter_combination = 1
              program_error                 = 2
              too_many_lines                = 3
              OTHERS                        = 4.
          IF sy-subrc = 0.
            MESSAGE s000(zrak) WITH p_number 'DISPLAYED DYNAMICALLY'.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " SUB_FILL_ADDTIONAL
    *&      Form  SUB_DISPLAY_OUTPUT
    *       text
    FORM sub_display_output .
      CALL SCREEN '9001'.
    ENDFORM.                    " SUB_DISPLAY_OUTPUT
    *&      Module  STATUS_9001  OUTPUT
    *       text
    MODULE status_9001 OUTPUT.
      SET PF-STATUS ' '.
      SET TITLEBAR 'MAIN00'.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
    *       text
    MODULE user_command_9001 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR
             'CANC' OR
             '%EX'.
          SET SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT

  • How to Change the position of Column in ALV report

    Hi Follks,
        Is is possible to change the position of column in ALV report?.If yes then how?
        Basically my requirement is, that user want afacility where , he should be able to change the position
        of column aftre he runs the report.
        Eg: After running the report , user felt that column 5 should be at position 2 , in that case he should   
               be able to drag column 5 at position 2 and vice versa.
        Please help me, how to solve this issue.
        Note : I am using NW 7.0 SP 9
        Regards
        PG
    Edited by: PG on Apr 13, 2009 11:10 AM

    HI PG,
    do below whie filling the filed catlog
    wa_fieldcat-fieldname        = 'Field1".
    wa_fieldcat-COL_POS = '1',
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname         = 'Field2".
    wa_fieldcat-COL_POS = '2',
    wa_fieldcat-fieldname         = 'Field3".
    wa_fieldcat-COL_POS = '3',
    Thanks!

  • Add New Column in ALV Report of Standard SAP ME28.

    Hi anybody,
    I want add new column in alv report of standard SAP Program ME28 Screen.
    Add Last PO Price column inside ALV Report ME28 Screen.
    Can u please anybody tell me how to add new column in ME28 Screen.
    Thanks
    S.Muthu.

    Try to find any BADI for the same
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    OR
    Also one more option is to copy ME28 and, make modifications to the copied program.

  • Editing rows and columns in alv reports in webdynpro abap

    how edit row and columns in webdynpro abap ?
    can i add colors to salv repotrs for below and above range of values  how ?
    if possible send source code for it.............

    hi
    check out this link for editing the columns of ALV
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b
    check out for this thread as well for coloring ALV
    Coloring of selected table cells: Ideas wanted
    regards,
    amit

  • Summing up a Column in ALV report

    Hi All,
    I have developed an ALV Report which will display Invoices and other details.
    Now i need to display the sum of NETWR column, if user wish to select that column and click the "SUM" icon.
    As of now, if i select the NETWR column and click 'SUM" column, i am getting Runtime error.
    How to resolve this issue?
    Regards
    Pavan

    Hi Pavan,
    ALV GRID CONTROL:
    This task is performed by the SAP Control Framework.
    The R/3 System allows you to create custom controls using ABAP Objects. The application server is the Automation Client, which drives the custom controls (automation server) at the front end.
    If custom controls are to be included on the frontend, then the SAPGUI acts as a container for them.
    Custom controls can be ActiveX Controls or JavaBeans.
    The system has to use a Remote Function Call (RFC) to transfer methods for creating and using a control to the front end.
    ABAP objects are used to implement the controls in programs.
    An SAP Container can contain other controls (for example, SAP ALV Grid Control, Tree Control, SAP Picture Control, SAP Splitter Control, and so on). It administers these controls logically in one collection and provides a physical area for the display.
    Every control exists in a container. Since containers are themselves controls, they can be nested within one another. The container becomes the parent of its control. SAP containers are divided into five groups:
    SAP custom container: Displays within an area defined in Screen Painter on screens or sub screens.
    Class: CL_GUI_CUSTOM_CONTAINER
    SAP dialog box container: Displays in a modeless dialog box or as a full screen. Class:
    CL_GUI_DIALOGBOX_CONTAINER
    SAP docking container: Displays as docked, resizable sub-window with the option of displaying it as a modeless dialog box. Class: CL_GUI_DOCKING_CONTAINER
    SAP splitter container: Displays and groups several controls in one area - that is, splits the area into cells Class: CL_GUI_SPLITTER_CONTAINER
    SAP easy splitter container: Displays controls in two cells, which the user can resize using a split bar. Class: CL_GUI_EASY_SPLITTER_CONTAINER.
    In the control, you can adjust the column width by dragging, or use the 'Optimum width' function to adjust the column width to the data currently displayed. You can also change the column sequence by selecting a column and dragging it to a new position.
    Standard functions are available in the control toolbar. The details display displays the fields in the line on which the cursor is positioned in a modal dialog box.
    The sort function in the ALV Control is available for as many columns as required. You can set complex sort criteria and sort columns in either ascending or descending order.
    You can use the 'Search' function to search for a string (generic search without *) within a selected area by line or column.
    You can use the 'Sum' function to create totals for one or more numeric columns. You can then use the "Subtotals" function to set up control level lists: You can use the 'Subtotal' function to structure control level lists: select the columns (non-numeric columns only) that you want to use and the corresponding control level totals are displayed.
    For 'Print' and 'Download' the whole list is always processed, not just the sections displayed on the screen.
    You can define display variants to meet your own specific requirements. For information on saving variants, see 'Advanced Techniques'.
    The ALV grid control is a generic tool for displaying lists in screens. The control offers standard functions such as sorting by any column, adding numeric columns, and fixed lead columns .
    Data collection is performed in the program (with SELECT statements, for example) or by using a logical database. The data records are saved in an internal table and passed on to the ALV control along with a field description.
    The field description contains information about the characteristics of each column, such as the column header and output length. This information can defined either globally in the Dictionary (structure in the Dictionary) or in the field catalog in the program itself. You can also merge both techniques.
    The ALV link is a standard function of Query and QuickViewer. If multiline queries or Quick View lists have been defined, they will automatically be compressed to a single line and output in the ALV control as a long, single line list.
    Use Screen Painter to create a sub screen container for the ALV grid control. The control requires an area where it can be displayed in the screen. You have to create a container control that determines this area.
    Use the corresponding icon in the Screen Painter layout to create the container control. The size of area "MY_CONTROL_AREA" determines the subsequent size of the ALV control.
    The valid GUI status must be set at the PBO event in the flow logic of the ALV subscreen container.
    The OK_CODE processing for the cancel functions must be programmed at the PAI event.
    The reference variables for the custom container and the ALV grid control must be declared.
    To create reference variables, use ABAP statement TYPE REF TO .
    The global classes you need to do this are called cl_gui_custom_container (for the custom container control) and cl_gui_alv_grid (for the ALV grid control).
    The global classes are defined in the Class Builder. You can use the Class Builder to display information for the methods, their parameters, exceptions, and so on.
    Use ABAP statement CREATE OBJECT to create the objects for the container and the ALV control. Objects Are instances of a class.
    When an object is created (CREATE), method CONSTRUCTOR of the corresponding class is executed. The parameters of method CONSTRUCTOR determine which parameters have to be supplied with data when the object is created. In the above example, object alv_grid is given the name of the container control (g_custom_container) in exporting parameter i_parent, which links the two controls. For information on which parameters method CONSTRUCTOR possesses and which of these parameters are required, see the Class Builder.
    Objects should only be created once during the program. To ensure that this is the case, enclose the CREATE OBJECT statement(s) in an IF IS INITIAL. ... ENDIF clause. The objects must be generated before the control is displayed for the first time - that is, during the PBO event of the ALV subscreen container.
    To display the requested dataset in the ALV control, the data must be passed on to the control as an internal table, and a field description must exist indicating the order in which the columns will be output.
    In the simplest case, the field description can use a structure from the Dictionary. The Dictionary also determines the technical field attributes like type and length, as well as the semantic attributes like short and long texts. The ALV control uses this information to determine the column widths and headers. The column sequence is determined by the field sequence in the structure.
    If no suitable structure is active in the Dictionary, or you want to output internal program fields in the control, then you will have to define information like the output length and column header in the field catalog.
    In a typical program run, the dataset is read first (SELECT ....), the internal table is filled with the data to display (... INTO TABLE ...), and ABAP statement CALL SCREEN is then used to call the ALV sub screen container.
    The data transfer to the ALV control takes place during the call of method
    set_table_for_first_display from class cl_gui_alv_grid. The method call must be programmed at the PBO event of the ALV subscreen container.
    The name of the Dictionary structure that supplies the field description is specified in exporting parameter i_structure_name. The name of the internal table that contains the data records to display is specified in changing parameter it_outtab.
    The field description for the ALV control can be ta ken from an active Dictionary structure (fully automatic), by passing a field catalog (manual), or through a mixture of the two options (merge).
    The field catalog is in internal table with type lvc_t_fcat. This type is defined globally in the Dictionary.
    Each line in the field catalog table corresponds to a column in the ALV control.
    The field characteristics (= column characteristics) are defined in the field catalog. The field catalog is in internal table with type lvc_t_fcat. Each line that is explicitly described in the ALV control corresponds to a column in the field catalog table.
    The link to the data records to output that are saved in internal table is established through field name . This name must be specified in column "fieldname" in the field catalog.
    This field can be classified through a Dictionary reference (ref_table and ref_field) or by specifying an ABAP data type (inttype).
    Column headers and field names in the detail view of an ALV control line can be determined in the field catalog in coltext and seltext, respectively.
    The position of a field during output can be determined with col_pos in the field catalog.
    If you want to hide a column, fill field no_out with an "X" in the field catalog. Hidden fields can be displayed again in a user display variant.
    Icons can be displayed in the ALV control. If you want a column to be interpreted as an icon, then the icon name must be known to the program (include .) and icon = "X" must be specified for this column in the field catalog.
    The above example shows a semi-automatic field description: Part of the field description comes from the Dictionary structure (sflight), while another part is explicitly defined in the field catalog (gt_fieldcat).
    The field catalog (internal table) is filled in the program and is passed on together with the name of the Dictionary structure during the method call. The information is merged accordingly in method set_table_for_first_display.
    For a user to save display variants, parameters is_variant and i_save must be passed on during method call set_table_for_first_screen. To assign display variants uniquely to a program, at least the program name must be supplied in the transferred structure (gs_variant).
    Program names can be up to 30 characters long.
    If you only pass on the current parameters for is_variant, then existing variants can be loaded, but no new ones can be saved. If you use parameter i_save, you must pass on a variant structure with is_variant.
    I_SAVE = SPACE No variants can be saved.
    I_SAVE = 'U' The user can only save user-specific variants.
    I_SAVE = 'X' The user can only save general (shared) variants.
    I_SAVE = 'A' The user can save both user-specific and general (shared) variants.
    You can use parameter is_layout of method set_table_for_first_display, for example, to define the header in the ALV control and the detail display.
    To do this, define a query area in the program in accordance with Dictionary structure lvc_s_layo, and pass on the text to display in field -grid_title or -detailtitl.
    If you want to create print lists with zebra stripes, set field -zebra to "X". You can display a print preview for print lists by requesting standard function "Print".
    All parameters of method SET_TABLE_FOR_FIRST_DISPLAY from global class
    CL_GUI_ALV_GRID are defined in the Class Builder.
    Events are defined in global class cl_gui_alv_grid; you can use these events to implement user interaction within the program. To respond to a double -click on a table line, you must respond to event DOUBLE_CLICK.
    You receive control in the program, allowing you to implement interactive reporting - such as a full screen details list. The events for cl_gui_alv_grid are located in the Class Builder.
    To define an implement a local class in the program, you use a handler method. In this handler method, you program the functionality to trigger by a double -click in the output table.
    To activate a handler method at runtime, a class or an object from that class registers itself with an event using command SET HANDLER. The names of the IMPORTING parameters in the handler method correspond to the names of the EXPORTING parameters of the related event.
    In the above example, the local class is LCL_ILS and the handler method is ON_DBLCLICK. An object - ALV_DBLCLICK - is created and registers itself for event DOUBLE_CLICK.
    You can query parameter e_row-index to determine which output line was requested by the double -click. This parameter corresponds to the line number of the output table (internal table with the data records to output). If you need information for the selected line, you have to read it with READ TABLE itab INDEX e_row-index.
    This subsequent read in the output table generally corresponds to the HIDE area in conventional reporting. You first have to make sure that the user has double -clicked a line in the output table (similar to the valid line selection with the HIDE technique).
    A field group can contain global data objects, but not data objects that have been defined locally in a subroutine or function module.
    You can use INSERT to specify both fields and field symbols. This makes it possible to dynamically insert a data object referred to by a field symbol into a field group at runtime. Any field symbols that have not been assigned are ignored, which means no new field is inserted into the field group.
    The EXTRACT statement writes all the fields of a field group as one record to a sequential dataset (transport takes place with similarly named fields). If a HEADER field group is defined, then its fields are placed ahead of each record as sort keys. You can then sort the dataset with SORT and process it with LOOP ...ENDLOOP. In this case, no further EXTRACT is possible.
    The INSERT statement is not a declarative statement: This means field groups can also be expanded in the program flow section.
    As soon as the first dataset of a field group has been extracted with EXTRACT, that field group can no longer be expanded with INSERT. In particular, the HEADER field group cannot be expanded after the first EXTRACT (regardless of the field group).
    When the GET events are processed, the logical database automatically writes hexadecimal zeros in all the fields of a node when it returns to an upper-level node in the hierarchy. Since the HEADER normally contains sort fields for all field groups, these hexadecimal zeros in the HEADER serve as a type of hierarchy key: The more zeros there are, the further up in the control level hierarchy you go.
    &#61550;&#61472;The SORT statement sorts the extract dataset in accordance with the defined field sequence in field group HEADER. The addition BY ... sets a new sort key.
    Each must be either a field of field group HEADER or a field group that consists only of fields of the field group HEADER. You can use the additions ASCENDING and DESCENDING to determine whether the fields are sorted in ascending (default) or descending order.
    Fields containing X'00' in the logical databases are always displayed before all other values during a SORT.
    Processing of an extract dataset always takes places within a LOOP. The contents of the extract dataset field are placed in program fields with the same names.
    The group change always involves the fields of the HEADER. Single record processing for extract datasets is performed using language element AT ( = field group).
    CNT() is not a statement, but instead a field that is automatically create d and filled when is a non-numeric field from field group HEADER and is part of the sort key. At the end of the group, CNT() contains the number of different values that the field recorded in this group level.
    SUM() is not a statement, but instead a field that is automatically created and filled when is a numeric field of an extract dataset. At the end of the group, SUM() contains the control total of field .
    *** and CNT are only available at the end of the group level or at AT LAST.
    Single record processing for extract datasets AT WITH is only performed when field group is immediately followed by field group in the temporary dataset.
    Loops over an extract dataset cannot be nested. However, several contiguous loops are permitted.
    The sequence of the control level changes within the LOOP must correspond to the sort sequence.
    Totals can only be calculated within control footer processing.
    Extracts allow only appends (EXTRACT), sorting (SORT) and sequential processing (LOOP).
    Once a SORT or LOOP has occurred, the intermediate dataset is frozen and cannot be expanded with EXTRACT. Operations that insert into or delete from EXTRACT datasets are not supported.
    Extracts allow for several record types (FIELD-GROUPS) with fields that can be set dynamically (INSERT is not a declarative statement!). Internal tables have a single, statically-defined line type.
    Internal tables use the sequence of table fields according to the declaration for the hierarchy of the control leve l. The control level structure for internal tables is therefore static, and is independent of which criteria were used to sort the internal table.
    Extracts do not depend on the field sequence for control level processing: a re-sort or a completely different control level process can take place. The control level structure for extract datasets is therefore dynamic. It corresponds exactly to the sort key of the extract dataset. The sort key is the sequence of fields from the field group HEADER, and is used to sort the extract dataset.
    Extracts rely on the compiler to determine which combinations of group levels and a cumulating field the control level totals desire. The desired control level totals are determined by the processing of LOOP ... ENDLOOP blocks. Internal tables build the control level total with the SUM statement.
    This procedure leads to high resource depletion for totaling control levels in internal tables.
    Regards,
    Chandru

  • How to develop variable column in alv report

    Hi all,
    I want to develop a alv report where the column will be variable and created in runtime as per data.Is it possible in SAP ALV grid display?If possible tell me how I develop such type of report.
    For example
    MATERIAL                BATCH                   QTY
    M1                              B1                         Q1
    M1                              B2                         Q2
    M1                              B3                         Q3
    M2                              B4                         Q1
    This is normal display. I want the following
    MATERIAL                 BATCH1               BATCH2             BATCH3        BATCH4
    M1                             Q1                        Q2                      Q3                  --                     
    M2                             ---                         --                        --                   Q4
    Please advise and provide your valuable suggestion.
    Thanks & Regards
             Nirmal

    Hi Frn
       The Below code will Create the dyanmic internal table ....what you need to do is only pass this internal table and field catalog to Function module "Reuse_alv_display" .
    REPORT  zhrrt_retention.
    TYPE-POOLS : abap.
    TABLES: pa0001 , pa0003 .
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,<dyn_wa>,<dyn_field>.
    DATA: dy_table TYPE REF TO data,
          dy_line TYPE REF TO data .
    DATA : xfc TYPE lvc_s_fcat,
           ifc TYPE lvc_t_fcat.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s11 .
    SELECT-OPTIONS:s_pernr FOR pa0003-pernr .
    SELECT-OPTIONS:s_orgeh FOR pa0001-orgeh .
    SELECT-OPTIONS:s_date  FOR sy-datum .
    SELECTION-SCREEN END OF BLOCK b1.
    DATA: BEGIN OF it_itab OCCURS 0 ,
           depid LIKE pa0001-orgeh ,
           pernr LIKE pa0003-pernr,
           subty LIKE pa9260-subty,
           date  LIKE sy-datum,
          END OF it_itab .
    DATA: BEGIN OF it_date OCCURS 0,
          date TYPE sy-datum ,
          len TYPE i,
          ty TYPE c,
          END OF it_date .
    SELECT a~orgeh
           b~pernr
           b~subty
           b~begda
    FROM pa0001 AS a INNER JOIN pa9260 AS b
    ON apernr = bpernr
    INTO TABLE it_itab
    WHERE a~orgeh IN s_orgeh AND
          a~pernr IN s_pernr AND
          b~begda IN s_date.
    WHILE s_date-low <= s_date-high.
      it_date-date = s_date-low .
      it_date-len = 8 .
      it_date-ty = 'c'.
      APPEND  it_date.
      s_date-low = s_date-low + 1.
    ENDWHILE.
    PERFORM get_structure.
    PERFORM create_dynamic_itab.
    PERFORM proc_data .
    FORM get_structure.
      DATA : idetails TYPE abap_compdescr_tab,
              xdetails TYPE abap_compdescr.
      xfc-fieldname = 'pernr' .  "  XDETAILS-NAME .
      xfc-datatype = 'c'.    "XDETAILS-TYPE_KIND.
      xfc-inttype = 'c'.    "XDETAILS-TYPE_KIND.
      xfc-intlen =  8 .     "XDETAILS-LENGTH.
      APPEND xfc TO ifc.
      xfc-fieldname = 'empname' .  "  XDETAILS-NAME .
      xfc-datatype = 'c'.    "XDETAILS-TYPE_KIND.
      xfc-inttype = 'c'.    "XDETAILS-TYPE_KIND.
      xfc-intlen =  30 .     "XDETAILS-LENGTH.
      APPEND xfc TO ifc.
      LOOP AT it_date .
        CLEAR xfc.
        xfc-fieldname = it_date-date .  "  XDETAILS-NAME .
        xfc-datatype = it_date-ty.    "XDETAILS-TYPE_KIND.
        xfc-inttype = it_date-ty.    "XDETAILS-TYPE_KIND.
        xfc-intlen =  it_date-len .     "XDETAILS-LENGTH.
        APPEND xfc TO ifc.
      ENDLOOP.
    ENDFORM.                    "get_structure
    FORM create_dynamic_itab.
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ifc
        IMPORTING
          ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    ENDFORM.                    "create_dynamic_itab
    FORM proc_data .
      DATA: l_tabix TYPE sy-tabix .
      SORT it_itab BY depid .
      LOOP AT it_itab .
        READ TABLE it_date WITH KEY date =  it_itab-date .
        l_tabix = sy-tabix.
        IF sy-subrc = 0 .
          ASSIGN COMPONENT l_tabix OF STRUCTURE dy_table TO <dyn_field>.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " PROC_DATA
    Thanks and regards
    Priyank

  • To make different colours for the columns of ALV report in Grid display.

    Hai Friends,
                       I have created an ALV report in grid display method by using the call function reuse_alv_grid_display.
    I have obtained the report.In that report i want to change the colour of each column.Plz provide the answer with a sample program.
                    Thank u.

    hi i had a program  for the rows with diff colors....do the same thing for the columns..
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) type c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    data: ld_color(1) type c.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    *Populate field with color attributes
    loop at it_ekko into wa_ekko.
      ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
      if ld_color = 8.
        ld_color = 1.
      endif.
      concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
      modify it_ekko from wa_ekko.
    endloop.
    endform.                    " DATA_RETRIEVAL
    regards,
    venkat

  • Average of the column in ALV report

    Hi,
      I am working on an ALV report and for one of the column, i am calculating the average with fieldcatalog property do_sum = 'C'.
    I am sorting the output table for 2 fields and whenever I am expanding/compressing the sorted fields the average of the column is changing. Please let me know how do I get this average calculated constant. It should not change when the user collapses/expands on the sorted field.
    Regards
    Rashmi

    The same question has been asked in this thread:
    Compute average of a report column
    I have offered a solution but as I've said it's not great but it may meet your needs.
    Or another forum user may review and be able to suggest a better solution.
    Does the average need to be part of the report?
    Could you calculate it and display it within a page item below the report instead?

  • Extra columns in ALV report

    Hi there,
    I added a column to an existing alv report which uses method 'set_table_for_first_display' to display the output.
    The method is called via:
    grid1              TYPE REF TO cl_gui_alv_grid,
        CALL METHOD grid1->set_table_for_first_display
              EXPORTING
                        i_structure_name     = 'MAT_DATA'
                        is_layout            = lt_layout
                        is_variant           = lt_variant
                        i_default            = lt_default
                        i_save               = 'A'
                        it_toolbar_excluding = lt_exclude[]
               CHANGING it_outtab            = mat_data[]
                        it_fieldcatalog      = w_fieldcat[]
             EXCEPTIONS
                        program_error        = 1.
    The extra columns are in the field catalog and mat_data.
    The lt_variant-report field has the report name in it.
    When I run the report the new column does NOT appear.
    I cleared out the lt_variant-report value and now the new column DOES appear.
    Any idea why this is happening?
    Is there some way I can leave the report name in there and see the new columns?
    Thanks.

    thanks.
    no_out is initial.
    But, in this case, I am not passing any variant.
    It works if I don't pass the report name in the
    is_variant-report
    field.The columns will not display if I pass the report name.

  • Display two heading in single column using ALV report

    Hi Experts,
    I got a requirement for displaying 2 rows heading in a single column report. Is it possible that I can perform this task using ALV. How to get this 2 rows in ALV.
    This is a criteria that need to be output in ALV REPORT.
    MATERIAL CODE--MATERIAL NUMBERSTORAGE LOC----SLOC1     SLOC2
    --DATE--DATE1      DATE2
    123445--TEST MATERIAL22--
    3
    As mentioned above storage loc and date will be changing with respect to data dynamically and under this double heading qty will be displayed.
    Just want to know how to get double heading. It is clear that how to display dynamically but unaware of double heading using fieldcatalog.
    Regards,
    Yahya

    Hi Yahya,
    Please pass row position in fieldcatalogue for the respective columns.
    E.g  MOVE '2' to w_fieldcat-row_pos.  " This will display the field in 2nd row.
    Thanks,
    Rupali

  • How to create Status in ALV reports?

    Hi experts,
                     I need to create a status in a alv report. but i am not getting how to create it. i have declared a variable type slis_formname. and appended the events with it. now how to create the status in form.answers will be rewarded.
    Thanks in advance,
    Ramana

    Hello Venkat,
    Copy the standard pf status of the ALV in SE41 and do the following.
      DATA: IT_EVENTS TYPE SLIS_T_EVENT,
            WA_EVENTS LIKE LINE OF IT_EVENTS.
      REFRESH: IT_EVENTS.
      CLEAR: WA_EVENTS,IT_EVENTS.
      WA_EVENTS-NAME = 'PF_STATUS_SET'.
      WA_EVENTS-FORM = 'STATUS'.
      APPEND WA_EVENTS TO IT_EVENTS .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM      = IT_VARIANT-REPORT
                I_CALLBACK_TOP_OF_PAGE  = 'TOP_OF_PAGE'
                I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
                IT_FIELDCAT             = IT_FIELDCAT
                I_SAVE                  = 'A'
                IS_VARIANT              = IT_VARIANT
                IT_SORT                 = IT_SORT
                IT_EVENTS               = IT_EVENTS
           TABLES
                T_OUTTAB                = G_T_OUTTAB
           EXCEPTIONS
                PROGRAM_ERROR           = 1
                OTHERS                  = 2.
          FORM status                                                   *
    FORM STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD' EXCLUDING RT_EXTAB.
    ENDFORM.
    If useful reward.
    Vasanth

Maybe you are looking for

  • Still in a quandary about hardware specs. What do you think?

    I need to build a new system as editing machine for CS4. Everything is more or less clear as to what I need, there are only two issues remaining: 1. How much RAM to install, and 2. Disk setup. As always there is the balance between performance and co

  • UIScrollBar Not showing up

    I hope someone can help me with this, I am using external XML in 3 dynamic text boxes all 3 have a UIScrollBar attached, when I play the movie In the IDE the scrollbars all show up as they should but if I put the swf file in a HTML page the Arrow Up,

  • Iplanet Proxy Plug-in issue

    We use sunone web server(6.1 sp7) to communicate weblogic cluster app servers In the web server error logs we continue to see following error messages all the time even though there is no issues in accessing application and everthing else working fin

  • Printing Report via page fragment instead of .jspx

    Hi, I am using Jasper reports for printing the report for each selected patient in a table in my software, When I call the printing method from a .jspx button it works, but when i do the same work in a page fragment than my report did not run. Anyone

  • Budget / Planning Process

    Hi, My company would like to use the budget process in SAP to keep track of actual vs budget / Panning. Can some one provide me the full configuration setup for the budget / planning process ? Like creating budget version or plan version, entering of