ALV Display using Factory Settings

Hi,
I have been using this for quite sometime, CALL METHOD cl_salv_table=>factory to display the output in ALV.
Now, I have a requirement to display an internal table which has field 'message' which has a length of 480 characters. The output is trimmed up to 128 characters and the rest is not displayed.
Kindly suggest me if i have to change any settings to display the message as a whole without getting it trimmed.
Thank you.
Niranchan.

no comments

Similar Messages

  • End of page in ALV display using OOPS

    Hi all,
       How can i display end of page or footer in ALV display using OOPS concept.
    Thanks,
    vinit

    Hi ,
    Try using this code.
    First add a handler method in your handler class definition as:
    e.g. METHOD handle__end_of_page
    FOR EVENT print_end_of_page OF cl_gui_alv_grid .
    Then implement the method in the implementation part of your local class.
    e.g. METHOD handle_print_end_of_page .
    WRITE:/ 'Flights Made on ', sy-datum .
    ENDMETHOD .
    And register this method as the handler.
    SET HANDLER gr_event_handler->handle_print_end_of_page FOR gr_alvgrid .
    Hope this helps.
    Regards,
    Janaki.

  • Toolbar in alv display using oops alv

    i have written code for displaying toolbar in alv display using oops, but it is not displaying please find the below code and let me know reason.
    *& Report  ZTRANSFER_ORDER2                                            *
    REPORT  ZTRANSFER_ORDER2   .
    *& Report  ZTRANSFER_ORDER                                             *
       TABLES:sflight.
       TYPE-POOLS : icon.
      * G L O B A L   I N T E R N  A L   T A B L E S
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    types : begin of ty_mara,
            matnr type matnr,
            mtart type mtart,
            mbrsh type mbrsh,
            matkl type matkl,
            bismt type bismt,
            meins type meins,
            end of ty_mara.
      DATA: t_mara type STANDARD TABLE OF ty_mara.
      * G L O B A L   D A T A
       DATA: ok_code LIKE sy-ucomm,
             g_wa_mara type ty_mara.
        DATA : t_fcat type LVC_T_FCAT.
      DATA  : l_VAR TYPE disvariant.
      DATA :  gs_layout type lvc_s_layo.
      * Declare reference variables to the ALV grid and the container
    G L O B A L   D A T A
      DATA: ok_code LIKE sy-ucomm.
    Declare reference variables to the ALV grid and the container
       DATA:
         go_grid             TYPE REF TO cl_gui_alv_grid,
         go_custom_container TYPE REF TO cl_gui_custom_container.
      data :  it_toolbar  TYPE stb_button,
      event_receiver TYPE REF TO lcl_event_receiver.
      * S T A R T - O F - S E L E C T I O N.
       START-OF-SELECTION.
        CALL SCREEN 100   .
    *CLASS lcl_event_receiver DEFINITION.
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
        CLASS-METHODS:
    *handling toolbar for interactive
         handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive,
    *handling menu button
         handle_menu_button
            FOR EVENT menu_button OF cl_gui_alv_grid
                IMPORTING e_object e_ucomm,
    *On click of the menu button
        handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
                IMPORTING e_ucomm.
        PRIVATE SECTION.
        ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    handle toolbar
    CLEAR it_toolbar.
    MOVE 'DETAIL' TO it_toolbar-function.
        MOVE icon_detail TO it_toolbar-icon.
        MOVE 2 TO it_toolbar-butn_type.
        APPEND it_toolbar TO e_object->mt_toolbar.
        ENDMETHOD.                    "handle_toolbar
        METHOD handle_menu_button.
    handle own menubuttons
        IF e_ucomm = 'DETAIL'.
          CALL METHOD e_object->add_function
            EXPORTING
              fcode = 'DISPLAY'
              text  = 'DISPLAY'.
        ENDIF.
      ENDMETHOD.                    "handle_menu_button
      METHOD handle_user_command.
    *On click
        CASE e_ucomm.
          WHEN 'DISPLAY'.
            MESSAGE 'Menu Clicked' TYPE 'I'.
        ENDCASE.
      ENDMETHOD.                           "handle_user_command
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
      *&      Module  USER_COMMAND_0100  INPUT
      MODULE user_command_0100 INPUT.
        CASE ok_code.
          WHEN 'EXIT'.
            LEAVE TO SCREEN 0.
        ENDCASE.
      ENDMODULE.                 " USER_COMMAND_0100  INPUT
      *&      Module  STATUS_0100  OUTPUT
       MODULE status_0100 OUTPUT.
        sET PF-STATUS 'STATUS'.
    Create objects
         IF go_custom_container IS INITIAL.
           CREATE OBJECT go_custom_container
             EXPORTING container_name = 'ALV_CONTAINER'.
           CREATE OBJECT go_grid
             EXPORTING
               i_parent = go_custom_container.
           PERFORM load_data_into_grid.
         ENDIF.
       ENDMODULE.                 " STATUS_0100  OUTPUT
      *&      Form  load_data_into_grid
       FORM load_data_into_grid.
    Read data from table SFLIGHT
         SELECT matnr mtart mbrsh matkl bismt meins
           FROM mara
           INTO corresponding fields of TABLE t_mara.
       PERFORM fld_cate changing T_fcat.
        l_var-report = sy-repid.
      gs_layout-grid_title = 'Analysis Report'.
    gs_layout-NO_TOOLBAR = 'X'.
    gs_layout-BOX_FNAME = 'Selection'.
    Load data into the grid and display them
            caLL METHOD go_grid->set_table_for_first_display
            EXPORTING
            i_structure_name = 'S_MVKE'
              i_save          = 'A'
               is_variant       = l_var
                is_layout             = gs_layout
           CHANGING
             it_outtab        = t_mara[]
             it_fieldcatalog  = t_fcat.
      endform.
    *&      Module  pai  INPUT
          text
    MODULE pai INPUT.
    data: l_valid type c.
       clear ok_code.
       break-point.
       ok_code = sy-ucomm.
           CASE ok_code.
           WHEN 'EXIT'.
             LEAVE TO SCREEN 0.
           WHEN 'BACK'.
             call method go_grid->check_changed_data
                 importing
                    e_valid = l_valid.
            loop at t_mara into g_wa_mara.
            endloop.
         ENDCASE.
    ENDMODULE.                 " pai  INPUT
    *&      Form  fld_cate
          text
         <--P_T_FCAT  text
    FORM fld_cate  CHANGING P_T_FCAT  TYPE lvc_t_fcat.
    DATA : s_fcat type LVC_S_FCAT .
    REFRESH: t_fcat.
      CLEAR s_fcat.
    s_fcat-fieldname = 'BOX1'.
    s_fcat-coltext =   'Box1'.
    s_fcat-seltext =   'Box1'.
    s_fcat-CHECKBOX = 'X'.
    s_fcat-EDIT = 'X'.
    APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
      s_fcat-row_pos = 1.
      s_fcat-col_pos = 1.
      s_fcat-fieldname = 'MATNR'.
      s_fcat-ref_field = 'MATNR'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Material'.
      s_fcat-seltext =   'Material'.
    s_fcat-EDIT = 'X'.
      APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
       s_fcat-row_pos = 2.
      s_fcat-col_pos = 2.
      s_fcat-fieldname = 'MTART'.
      s_fcat-ref_field = 'MTART'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Material type'.
      s_fcat-seltext =   'Material type'.
      APPEND s_fcat TO P_T_FCAT.
    CLEAR s_fcat.
    s_fcat-fieldname = 'BOX2'.
    s_fcat-coltext =   'Box2'.
    s_fcat-seltext =   'Box2'.
    s_fcat-CHECKBOX = 'X'.
    s_fcat-EDIT = 'X'.
    APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
      s_fcat-row_pos = 3.
      s_fcat-col_pos = 3.
      s_fcat-fieldname = 'MBRSH'.
      s_fcat-ref_field = 'MBRSH'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Industry Sector'.
      s_fcat-seltext =   'Industry Sector'.
      APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
        s_fcat-row_pos = 4.
      s_fcat-col_pos = 4.
      s_fcat-fieldname = 'MATKL'.
      s_fcat-ref_field = 'MATKL'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Material Group'.
      s_fcat-seltext =   'Material Group'.
      APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
        s_fcat-row_pos = 5.
      s_fcat-col_pos = 5.
      s_fcat-fieldname = 'BISMT'.
      s_fcat-ref_field = 'BISMT'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Old material number'.
      s_fcat-seltext =   'Old material number'.
      APPEND s_fcat TO P_T_FCAT.
      CLEAR s_fcat.
        s_fcat-row_pos = 6.
      s_fcat-col_pos = 6.
      s_fcat-fieldname = 'MEINS'.
      s_fcat-ref_field = 'MEINS'.
      s_fcat-ref_table = 'T_MARA'.
      s_fcat-coltext =   'Base Unit of Measure'.
      s_fcat-seltext =   'Base Unit of Measure'.
      APPEND s_fcat TO P_T_FCAT.
    CLEAR s_fcat.
    s_fcat-fieldname = 'BOX3'.
    s_fcat-coltext =   'Box3'.
    s_fcat-seltext =   'Box3'.
    s_fcat-CHECKBOX = 'X'.
    s_fcat-EDIT = 'X'.
    APPEND s_fcat TO P_T_FCAT.
    ENDFORM.                    " fld_cate                     .

    MOVE 2 TO it_toolbar-butn_type.
    Try changing the 2 (menu) to 0 (button) and see if that helps
    also you need to set the event handler after you create your alv object
    set handler handle_toolbar for [whatever object is called].
    Edited by: Kev Mycock on Jul 24, 2008 7:59 AM

  • ALV display using dynamic field catalog and dynamic internal table

    hi ,
    please guide me for ALV display using dynamic field catalog and dynamic internal table.
    Thank you.

    Hi Rahul,
    maybe thread dynamic program for alv is helpful for you. More information about the [SAP List Viewer (ALV)|http://help.sap.com/saphelp_nw70/helpdata/EN/5e/88d440e14f8431e10000000a1550b0/frameset.htm]. Also have a look into the example programs SALV_DEMO_TABLE*.
    Regards Rudi

  • DIfference between Reusable FM for ALV display and ALV display using class

    Hi,
    Is there any difference between alv display using Resuable FM and ALV display using classes except the later one uses OO concept.??
    One mere thing i want to clarify is that is there any difference exist between REUSE_ALV_GRID_DISPLAY and REUSE_ALV_LIST_DISPLAY? If so, then let me know.
    It could be easier to understand me if yuo give scenario where these FM comes into picture
    Regards,
    Parag

    Hi,
    (1) REUSE_ALV_LIST_DISPLAY
    Display an ALV list as per parameters defined in the function call
    (2) REUSE_ALV_GRID_DISPLAY
    Display an ALV grid as per parameters defined in the function call
    (3) REUSE_ALV_COMMENTARY_WRITE
    List header information is output according to its type. The output information is put in an internal table. Output attributes are assigned to each line via the TYP field.This module outputs formatted simple header information at TOP-OF-PAGE.
    (4) REUSE_ALV_HIERSEQ_LIST_DISPLAY
    This module outputs two internal tables as a formated hierarchical-sequential list.
    (5) REUSE_ALV_VARIANT_F4
    Display variant selection dialog box.
    (6) REUSE_ALV_VARIANT_EXISTENCE
    Checks whether a display variant exists.
    Other Useful Link :
    Customize ALV grid layout at run time
    Download ALV grid Control Tutorial
    Understand ALV report ( Just Copy and paste )
    Dynamic selection on ALV at run time
    Dynamic selection on ALV at run time
    Regards
    Kiran

  • ALV GRID DISPLAY USING FACTORY METHODS

    Hi all
    I am using factory methods for my alv grid display.
    I have a list of functionalities, for which i am not able to find a correct method..
    1) Header of alv(with all the values of the selection-screen)
    2)How to give text to a subtotal(ed) column, i.e. if i subtotal a qty field against a sorted field, i want to display ==> Nett Wt. = 123.00 (for first header entry) and so on for each header entry.
    3)how to remove the zeroes from a quantity field?
    4) Displaying the cells as blanks where data is 0( for quantity fields if i have a cell with zero value, it should be blank.)
    5) double click on a cell to open a transaction with the cell's value.
    Any help on this would be appreciated.
    Points will be rewarded for sure...
    Thanks & Regards
    Ravish Garg

    Hello Ravish
    Regarding the display of zero values as empty cells have a look at my <i>modified </i>sample report <b>ZUS_SDN_CL_SALV_TABLE_INTERACT</b>.
    *& Report  ZUS_SDN_CL_SALV_TABLE_INTERACT
    REPORT  zus_sdn_cl_salv_table_interact.
    TYPE-POOLS: abap.
    DATA:
      gt_knb1        TYPE STANDARD TABLE OF knb1.
    DATA:
      go_table       TYPE REF TO cl_salv_table,
      go_events      TYPE REF TO cl_salv_events_table.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT
              if_salv_events_actions_table~double_click
              OF cl_salv_events_table
              IMPORTING
                row
                column.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          lo_table   TYPE REF TO cl_salv_table,
          lt_orders  TYPE STANDARD TABLE OF bapiorders,
          ls_knb1    TYPE knb1.
        READ TABLE gt_knb1 INTO ls_knb1 INDEX row.
        IF ( syst-subrc = 0 ).
          CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
            EXPORTING
              customer_number             = ls_knb1-kunnr
              sales_organization          = '1000'
    *         MATERIAL                    =
    *         DOCUMENT_DATE               =
    *         DOCUMENT_DATE_TO            =
    *         PURCHASE_ORDER              =
    *         TRANSACTION_GROUP           = 0
    *         PURCHASE_ORDER_NUMBER       =
    *       IMPORTING
    *         RETURN                      =
            TABLES
              sales_orders                = lt_orders.
    *     Create ALV grid instance
          TRY.
              CALL METHOD cl_salv_table=>factory
    *        EXPORTING
    *          LIST_DISPLAY   = IF_SALV_C_BOOL_SAP=>FALSE
    *          R_CONTAINER    =
    *          CONTAINER_NAME =
                IMPORTING
                  r_salv_table   = lo_table
                CHANGING
                  t_table        = lt_orders.
            CATCH cx_salv_msg .
          ENDTRY.
          lo_table->display( ).
    **      SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
    **      SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
    **      CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = '1000'.
    * Create ALV grid instance
      TRY.
          CALL METHOD cl_salv_table=>factory
    *    EXPORTING
    *      LIST_DISPLAY   = IF_SALV_C_BOOL_SAP=>FALSE
    *      R_CONTAINER    =
    *      CONTAINER_NAME =
            IMPORTING
              r_salv_table   = go_table
            CHANGING
              t_table        = gt_knb1.
        CATCH cx_salv_msg .
      ENDTRY.
    * Create event instance
      go_events = go_table->get_event( ).
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_double_click FOR go_events.
      PERFORM modify_columns.
      go_table->display( ).
    END-OF-SELECTION.
    *&      Form  MODIFY_COLUMNS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM modify_columns .
    * define local data
      DATA:
        lt_dfies        TYPE ddfields,
        ls_dfies        TYPE dfies,
        lo_typedescr    TYPE REF TO cl_abap_typedescr,
        lo_strucdescr   TYPE REF TO cl_abap_structdescr,
        lo_tabledescr   TYPE REF TO cl_abap_tabledescr,
        lo_columns      TYPE REF TO cl_salv_columns_table,
        lo_column       TYPE REF TO cl_salv_column.
      lo_columns = go_table->get_columns( ).
      lo_typedescr = cl_abap_typedescr=>describe_by_data( gt_knb1 ).
      lo_tabledescr ?= lo_typedescr.
      lo_strucdescr ?= lo_tabledescr->get_table_line_type( ).
      lt_dfies = lo_strucdescr->get_ddic_field_list( ).
      LOOP AT lt_dfies INTO ls_dfies.
        lo_column = lo_columns->get_column( ls_dfies-fieldname ).
        IF ( ls_dfies-keyflag = abap_true ).
          CONTINUE.
        ELSEIF ( ls_dfies-fieldname = 'WEBTR' ).  " Bill of ex. limit
          lo_column->set_zero( if_salv_c_bool_sap=>true ).   " display zero
          lo_column->set_zero( if_salv_c_bool_sap=>false ).  " hide zero
        ELSE.
          lo_column->set_technical( if_salv_c_bool_sap=>true ).  " hide col
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " MODIFY_COLUMNS
    Regards
      Uwe

  • Multiple ALV display using SALV(Factory method)...

    Hello Experts,
    Please provide me any examples on how to display multiple ALV
    displays in a screen using SALV(Factory method).
    Hope you can help me guys.
    Thank you and take care!

    Hi Viraylab,
    Kindly check the program below, this will help you..
    *& Report  Z101754_REPORT
    REPORT  z101754_report.
    TABLES: zvbak_101754,zvbap_101754,mara.
    TYPE-POOLS: slis.
    DATA : i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: FLDNAME(24).
    DATA : BEGIN OF itab_zvbap OCCURS 0,
           zvbeln LIKE zvbap_101754-zvbeln,
      zposnr LIKE zvbap_101754-zposnr,
      zmatnr LIKE zvbap_101754-zmatnr,
      zbrgew LIKE zvbap_101754-zbrgew,
      zgi_qty LIKE zvbap_101754-zgi_qty,
      zinv_qty LIKE zvbap_101754-zinv_qty,
           END OF itab_zvbap.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-t01.
    SELECT-OPTIONS : s_zvbeln FOR zvbak_101754-zvbeln,
                     s_zkunwe FOR zvbak_101754-zkunwe,
                     s_zerdat FOR zvbak_101754-zerdat,
                     s_zmatnr FOR zvbap_101754-zmatnr.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN: BEGIN OF BLOCK block2 WITH FRAME TITLE t02.
    PARAMETERS     : invoiced AS CHECKBOX,
                     s_gi AS CHECKBOX .
    SELECTION-SCREEN: END OF BLOCK block2.
    SELECTION-SCREEN: BEGIN OF BLOCK block3 WITH FRAME TITLE t03.
    PARAMETERS     : alv_list RADIOBUTTON GROUP g1,
                     alv_grid RADIOBUTTON GROUP g1,
                     s_class RADIOBUTTON GROUP g1.
    SELECTION-SCREEN: END OF BLOCK block3.
    Screen Field Validation event
    AT SELECTION-SCREEN ON s_zvbeln.
      SELECT SINGLE *
       FROM zvbak_101754 WHERE zvbeln IN s_zvbeln.
      IF sy-subrc NE 0.
        MESSAGE e000(z754).
      ENDIF.
    AT SELECTION-SCREEN ON s_zkunwe.
      SELECT SINGLE *
       FROM zvbak_101754 WHERE zkunwe IN s_zkunwe.
      IF sy-subrc NE 0.
        MESSAGE e001(z754).
      ENDIF.
    AT SELECTION-SCREEN ON s_zerdat.
      SELECT SINGLE *
         FROM zvbak_101754 WHERE zerdat IN s_zerdat.
      IF sy-subrc NE 0.
        MESSAGE e002(z754).
      ENDIF.
    AT SELECTION-SCREEN ON s_zmatnr.
      SELECT SINGLE *
       FROM zvbap_101754    WHERE zmatnr IN s_zmatnr.
      IF sy-subrc NE 0.
        MESSAGE e003(z754).
      ENDIF.
    Start-Of-Selection Event
    START-OF-SELECTION.
      PERFORM select-data.
    End-Of-Selection Event
    END-OF-SELECTION.
      PERFORM display.
    *&      Form  select-data
          text
    -->  p1        text
    <--  p2        text
    FORM select-data .
      SELECT zvbeln zposnr zmatnr zbrgew zgi_qty zinv_qty
         INTO CORRESPONDING  FIELDS OF TABLE itab_zvbap
         FROM zvbap_101754
         WHERE  zvbeln IN s_zvbeln.
    ENDFORM.                    " select-data3
    TOP-OF-PAGE.
    AT LINE-SELECTION.
    FORMAT HOTSPOT.
    *GET THE FIELD NAME ON LINE SELECTION
      GET CURSOR FIELD FLDNAME .  "value field_value.
      IF FLDNAME = 'itab_zvbap-zvbeln'.
      SET PARAMETER ID 'BES' FIELD itab_zvbap-zvbeln.
      CALL TRANSACTION 'ZVA01_101754'.
      ENDIF.
    *&      Form  DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM display .
      IF s_class ='X'.
        PERFORM display_header.
        LOOP AT itab_zvbap.
          WRITE : / sy-vline,
                  itab_zvbap-zvbeln ,
                  13 sy-vline,
                  itab_zvbap-zposnr ,
                  30 sy-vline,
                  itab_zvbap-zmatnr ,
                  45 sy-vline,
                  itab_zvbap-zbrgew UNIT mara-meins ,
                  65 sy-vline,
                  itab_zvbap-zgi_qty UNIT mara-meins,
                  85 sy-vline,
                  itab_zvbap-zinv_qty UNIT mara-meins,
                  105 sy-vline,
                  / sy-uline(105).
        ENDLOOP.
      ENDIF.
    *&     Creating the fieldcatalog.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = sy-repid
         i_internal_tabname           = 'ITAB_ZVBAP'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
         i_inclname                   = sy-repid
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = i_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.
      IF alv_list = 'X'.
        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        = 'USER_COMMAND '
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      =
           it_fieldcat                    = i_fieldcat
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      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                       = itab_zvbap[]
    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.
      ENDIF.
      IF alv_grid = 'X'.
        CALL FUNCTION 'REUSE_ALV_GRID_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           = 'USER_COMMAND '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
        it_fieldcat                       =  i_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      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
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
       TABLES
         t_outtab                          = itab_zvbap[]
    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.
      ENDIF.
    ENDFORM.                    " DISPLAY
    *&      Form  display_header
          text
    -->  p1        text
    <--  p2        text
    FORM display_header .
      WRITE : / sy-vline,
                  'ORDER NO',
                  13 sy-vline,
                   'ITEM NO',
                  30 sy-vline,
                   'MATERIAL NO',
                  45 sy-vline,
                   'ORDER QTY',
                  65 sy-vline,
                   'GI QTY',
                  85 sy-vline,
                  'INVOICED QTY',
                  105 sy-vline,
                  / sy-uline(105).
    ENDFORM.                    " display_header
    Please let me know if you have any doubt.
    Regards,
    Amit.

  • Problem in ALV display using OOPs

    Hi,
    I have a dynamic selection screen where i am submitting one report to the other using SUBMIT statement.
    After entering values in the selection screen, the output should be displayed using ALV.so i created a screen  in the 2nd report i.e ZARR_MASSUPDATEFORNOTES and wrote the code in the PBO module of the screen.But while executing the output is not getting displayed.
    My code is as below.
    INSERT REPORT 'ZARR_MASSUPDATEFORNOTES' FROM t_comm.
    SUBMIT ZARR_MASSUPDATEFORNOTES VIA SELECTION-SCREEN .
    Thanks in advance......
    Thanks,
    Kiran.

    Hi,
    Try creting two different 'Z' programs without creating a different screen.
    populate your internal table with data.
    Do this.
    Export the internal table using memory id.
    Import the memory id in the 2nd report and pass the required value to the selection screen of the 2nd report and execute.
    Regards,
    Amit

  • ALV display using the fieldcatalog created programatically

    Hi,
    I have created a field catalog to be passed to the FM REUSE_ALV_GRID_DISPLAY, without calling the FM REUSE_ALV_FIELDCATALOG_MERGE.
    The result is being displayed properly. But the problem is that, when I try to export the alv into a spreadsheet by clicking on the button 'Local File..', the data is saved in random manner in the excel file.(data is being placed in saome other column).
    How to rectify this.
    Please help.
    Regards
    s.a.k

    Hi,
    data:
    l_tbl_fieldcat    TYPE          slis_t_fieldcat_alv,
    lv_fcat           LIKE LINE OF   l_tbl_fieldcat.
    *********************Prepare field catalog***********************
    *Column: Role Name
      CLEAR lv_fcat.
      lv_fcat-fieldname       =   'AGR_NAME'.
      lv_fcat-ref_fieldname   =   'AGR_NAME'.
      lv_fcat-tabname         =   'AGR_1251'.
      lv_fcat-col_pos         =   1.
      lv_fcat-seltext_s       =   text-003.
      lv_fcat-seltext_m       =   text-003.
      lv_fcat-seltext_l       =   text-003.
      INSERT lv_fcat INTO TABLE l_tbl_fieldcat.
    *Column: Role Description
      CLEAR lv_fcat.
      lv_fcat-fieldname       =   'TEXT'.
      lv_fcat-ref_fieldname   =   'AGR_TITLE'.
      lv_fcat-tabname         =   'AGR_TEXTS'.
      lv_fcat-col_pos         =   2.
      lv_fcat-seltext_s       =   text-004.
      lv_fcat-seltext_m       =   text-004.
      lv_fcat-seltext_l       =   text-004.
      INSERT lv_fcat INTO TABLE l_tbl_fieldcat.
    *Column: Transaction Code
      CLEAR lv_fcat.
      lv_fcat-fieldname       =   'LOW'.
      lv_fcat-ref_fieldname   =   'TCODE'.
      lv_fcat-tabname         =   'TSTCT'.
      lv_fcat-col_pos         =   3.
      lv_fcat-seltext_s       =   text-005.
      lv_fcat-seltext_m       =   text-005.
      lv_fcat-seltext_l       =   text-005.
      INSERT lv_fcat INTO TABLE l_tbl_fieldcat.
    Display ALV****
    CLEAR l_wa_layout.
      l_wa_layout-colwidth_optimize = lc_true.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          it_fieldcat   = l_tbl_fieldcat
          is_layout     = l_wa_layout
        TABLES
          t_outtab      = l_tbl_role_res
        EXCEPTIONS
          program_error = 1
          OTHERS        = 2.
    Regards
    s.a.k

  • Disable some standard buttons from ALV display

    Hello All,
    I am creating an ALV display using object oriented approach. I know how to exclude some of the standard function buttons from the list.
    But suppose instead of deleting, the requirement is to disable (I mean grayed out)
    some standard buttons from ALV. Could anyone please comment on how to do this.
    Many thanks in advance.
    Regards
    Indrajit

    Hello Indrajit
    The following sample reports shows how to disable toolbar functions. Run the report and the push the ENTER button repeatedly.
    *& Report  ZUS_SDN_ALV_EVT_TOOLBAR
    *& This sample report explains the handling of event TOOLBAR in order
    *% to activate or inactive buttons of the ALV toolbar.
    *& Based on: BCALV_GRID_DEMO
    *& Procedure: Copy BCALV_GRID_DEMO and replace entire coding  OR
                copy screen '0100' and GUI status 'MAIN100' from
                BCALV_GRID_DEMO to this report.
    REPORT  zus_sdn_alv_evt_toolbar.
    TYPE-POOLS: abap, cntb, icon.
    DATA:
      ok_code                TYPE ui_func,
      gt_sflight             TYPE TABLE OF sflight,
      g_container        TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
      g_grid1               TYPE REF TO cl_gui_alv_grid,
      g_custom_container    TYPE REF TO cl_gui_custom_container.
    PARAMETERS:
      p_inact    RADIOBUTTON GROUP grp1  DEFAULT 'X',  " delete buttons
      p_dele     RADIOBUTTON GROUP grp1.               " inactivate buttons
    PARAMETERS:
      p_newbut   AS CHECKBOX  DEFAULT ' ',  " add new button
      p_newddm   AS CHECKBOX  DEFAULT 'X'.  " add dropdown menu
          CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_cnt    TYPE i.
        CLASS-METHODS:
          handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING
              e_object
              e_interactive
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
          CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_toolbar.
    § 2.In event handler method for event TOOLBAR: Append own functions
      by using event parameter E_OBJECT.
        DATA:
          ls_toolbar  TYPE stb_button,
          ls_menu     type STB_BTNMNU.
    E_OBJECT of event TOOLBAR is of type REF TO CL_ALV_EVENT_TOOLBAR_SET.
    This class has got one attribute, namly MT_TOOLBAR, which
    is a table of type TTB_BUTTON. One line of this table is
    defined by the Structure STB_BUTTON (see data deklaration above).
    A remark to the flag E_INTERACTIVE:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            'e_interactive' is set, if this event is raised due to
            the call of 'set_toolbar_interactive' by the user.
            You can distinguish this way if the event was raised
            by yourself or by ALV
            (e.g. in method 'refresh_table_display').
            An application of this feature is still unknown...
        ADD 1 TO md_cnt. " a simple counter
      (1.a) Inactivate toolbar buttons
        IF ( p_inact = abap_true ).
          LOOP AT e_object->mt_toolbar INTO ls_toolbar FROM 1 TO md_cnt.
            ls_toolbar-disabled = 'X'.
            MODIFY e_object->mt_toolbar FROM ls_toolbar.
          ENDLOOP.
      (1.b) Delete toolbar buttons
        ELSE.
          DO md_cnt TIMES.
            DELETE e_object->mt_toolbar INDEX 1.
          ENDDO.
        ENDIF.
      (2) Add new button
        IF ( p_newbut = abap_true ).
        Add separator to separate default and new buttons
          CLEAR: ls_toolbar.
          ls_toolbar-butn_type = cntb_btype_sep.  " separator
          APPEND ls_toolbar TO e_object->mt_toolbar.
        Add new button "DETAIL"
          CLEAR: ls_toolbar.
          ls_toolbar-function  = 'DETAIL'.
          ls_toolbar-icon      = icon_detail.
          ls_toolbar-quickinfo = 'QuickInfo'.
          ls_toolbar-butn_type = cntb_btype_button.
          ls_toolbar-disabled  = abap_false.
          ls_toolbar-text      = 'Details'.
         ls_toolbar-checked = ' '.
          APPEND ls_toolbar TO e_object->mt_toolbar.
        ENDIF.
      (3) Add new dropdown menu
        IF ( p_newddm = abap_true ).
        Add separator to separate default and new buttons
          CLEAR: ls_toolbar.
          ls_toolbar-butn_type = cntb_btype_sep.  " separator
          APPEND ls_toolbar TO e_object->mt_toolbar.
        Add new dropdown menu "DETAIL"
          CLEAR: ls_toolbar.
          ls_toolbar-function  = 'DDMENU'.
          ls_toolbar-icon      = icon_detail.
          ls_toolbar-quickinfo = 'QuickInfo'.
          ls_toolbar-butn_type = cntb_btype_dropdown.
          ls_toolbar-disabled  = abap_false.
          ls_toolbar-text      = 'DD-Menu'.
         ls_toolbar-checked = ' '.
          APPEND ls_toolbar TO e_object->mt_toolbar.
        ENDIF.
      ENDMETHOD.                    "handle_toolbar
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
          MAIN                                                          *
      SELECT * FROM sflight INTO TABLE gt_sflight.
      CALL SCREEN 100.
    END-OF-SELECTION.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
               EXPORTING container_name = g_container.
      Instantiate ALV grid control
        CREATE OBJECT g_grid1
               EXPORTING i_parent = g_custom_container.
        CALL METHOD g_grid1->set_table_for_first_display
          EXPORTING
            i_structure_name = 'SFLIGHT'
          CHANGING
            it_outtab        = gt_sflight.
      Set event handler for event TOOLBAR
        SET HANDLER:
          lcl_eventhandler=>handle_toolbar FOR g_grid1.
      ENDIF.
    $Comment: Toolbar can be modified on-the-fly
      g_grid1->set_toolbar_interactive( ).
    ENDMODULE.                    "PBO OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      to react on oi_custom_events:
      CALL METHOD cl_gui_cfw=>dispatch.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN OTHERS.
        do nothing
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                    "PAI INPUT
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    CALL METHOD G_CUSTOM_CONTAINER->FREE.
    CALL METHOD CL_GUI_CFW=>FLUSH.
      LEAVE PROGRAM.
    ENDFORM.                    "EXIT_PROGRAM[/code]
    Regards
      Uwe

  • Multiple ALV display in one screen using SALV(Factory method)...

    Hello Experts,
    I tried using the old 'REUSE_ALV_BLOCK_LIST_APPEND' but it does not suit my
    requirement. So will it be possible to display multiple ALV display(block) using
    SALV?

    check the sample code..
    REPORT  zsalv_demo_multiple.
    DATA: salv1 TYPE REF TO cl_salv_table,
          salv2 TYPE REF TO cl_salv_table,
          salv3 TYPE REF TO cl_salv_table.
    DATA: g_custom TYPE REF TO cl_gui_custom_container,
    o_splitter    TYPE REF TO cl_gui_splitter_container,
    o_grid1 TYPE REF TO cl_gui_container,
    o_grid2  TYPE REF TO cl_gui_container,
    o_grid3  TYPE REF TO cl_gui_container.
    DATA: it_flight TYPE STANDARD TABLE OF sflight,
          it_carr  TYPE TABLE OF scarr,
          it_book TYPE TABLE OF sbook.
    START-OF-SELECTION.
      SELECT * FROM sflight
      INTO TABLE it_flight
      UP TO 20 ROWS.
      SELECT * FROM scarr
      INTO TABLE it_carr
      UP TO 20 ROWS.
      SELECT * FROM sbook
      INTO TABLE it_book
      UP TO 20 ROWS.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ABC'.
      CREATE OBJECT g_custom
      EXPORTING container_name = 'CONT'.
      CREATE OBJECT o_splitter
      EXPORTING parent  = g_custom
      rows    = 3
      columns = 1.
      CALL METHOD o_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = o_grid1.
      CALL METHOD o_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = o_grid2.
      CALL METHOD o_splitter->get_container
        EXPORTING
          row       = 3
          column    = 1
        RECEIVING
          container = o_grid3.
      cl_salv_table=>factory(
        EXPORTING
          r_container    = o_grid1
        IMPORTING
          r_salv_table   = salv1
        CHANGING
          t_table        = it_flight
      cl_salv_table=>factory(
        EXPORTING
          r_container    = o_grid2
        IMPORTING
          r_salv_table   = salv2
        CHANGING
          t_table        = it_carr
      cl_salv_table=>factory(
        EXPORTING
          r_container    = o_grid3
        IMPORTING
          r_salv_table   = salv3
        CHANGING
          t_table        = it_book
      CALL METHOD salv1->display.
      CALL METHOD salv2->display.
      CALL METHOD salv3->display.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Flow Logic..
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    in the Screen i placed a custom control and named it as CONT

  • HT201210 I received an iPad for Christmas that was ex-display, however I am unable to restore it to factory settings using the iTunes restore......any suggestions??

    I received an iPad for Christmas that was ex-display, however I am unable to restore it to factory settings using the iTunes restore......any suggestions??

    If it's a store's demo model then as far as I know only Apple can potentially change it's iOS version to a non-demo version - you've tried Settings > General > Reset > Erase All Content And Settings directly on the iPad ?

  • LOGO required in ALV top of page using factory method

    Hi,
    I am doing an ALV using factory method of class Cl_SALV_TABLE. Can any one help me about putting a LOGO on the top of page.
    Thanks in advance.
    Amitava

    Hi,
    In START-OF-SELECTION.
    put form to display header
    like PERFORM build_header
    gr_table->display( ).
    then...
    in FORM
    FORM build_header.
    lr_grid  TYPE REF TO cl_salv_form_layout_grid,
    lr_logo  TYPE REF TO cl_salv_form_layout_logo,
    create object lr_logo.
      lr_logo->set_left_content( lr_grid ).
      lr_logo->set_right_logo( 'LOGO_NAME' ).
    * Set the element top_of_list
      gr_table->set_top_of_list( lr_logo ).
    ENDFORM.
    thanx.

  • I purchased the display version of my mac pro and it had the Pages app.  I just reset it to factory settings and the app is no longer on it.  Is there a way I can get it back for free?

    I purchased the display version of my Macbook Pro at a navy exchange.  The woman working at the store did not know how to reset to factory so I took it home as was.  I have been using it for about a month and the laptop had Pages and Keynote on it already.  I just reset to factory settings and it now has neither.  Is there a way to get these back for free?  I think my computer purchase makes it eligible to have these apps for free but since I reset it they are gone.

    Go to the App Store where you can purchase copies of the apps. You cannot get them for free. The ones installed belonged to the previous owner. You will need to purchase using your Apple ID.

  • I recently got a hand-me-down Macbook (white) 2010 and want to restore to factory settings. The computer did not come with any discs. It is running 10.6.8 and I purchased 10.6.3 recently to upgrade my MacBook Pro. Can I use that to restore the MacBook?

    I want to give the hand-me-down to my kids so they will stay off my MacBook Pro I'd like to start fresh with the MacBook, remove all the former owners information, restore it to factory settings, but it did not come with any installation discs, so I don't know what to do. I recently purchased Snow Lepoard for my 2008 MacBook Pro. Can I use that to restore the MacBook? Also, the former owner purchased Microsoft Office (ugh) with the computer but again, no installation discs. How do I keep that when I restore?
    Any help would be appreciated.
    Thanks!

    I purchased a mini to HDMI cable and tried to connect to the TV but the TV is not recognizing the computer. I attempted to set sound and display settings under the "my Preferences" utility with no success.  Again, I'm not sure if I need to upgrade my OS software Any Suggestions?

Maybe you are looking for

  • Warning in Deployment of EAR in AS Java Server

    Hi, I am getting below exception while deploying a particular EAR. Description:           1. Warning exception has been returned while the [cnfg_fed_ear] was starting. Warnings:[ Warning occurred on server 3226150 during startApp of cnfg_fed_ear : Ca

  • Display PDF in Browser Option

    I am able to open a PDF file from a particular protected Website. I can fill in the required info, but when I attempt to Save/File it back to the site, the following pops up: "For security reasons your return could not be saved. Please ensure that th

  • HT5557 Why am I not able to access the "store" feature in iBooks?

    Please help!

  • Aperture 2.0.1-images flash by uncontrollably

    I just updated to 2.0.1 and now when I go to an album or project, the images flash by uncontrollably. It only stops when the last image in the project/album is reached. In other words, I cannot select an image at all. I have tried rebooting the compu

  • Oracle resets JRE settings, messes up IE

    Sorry if this has been answered. I looked around and didn't see this particular topic. On Windows 2000 machines (server and workstation), I have had cases where certain applets that used to function before installing Oracle on the machine in question