ALV Reports versus ABAP drilldown or high volume data

Which is better with regards to performance? An ALV grid or an ABAP drilldown ?
I am very concerned about performance given the high volume of data and therefore not sure if I should use ALV?
input is appreciated
J

hi JJ,
ALV reporting is always having lot of advantages over abap reproting in many ways,
performace increases due to the use of
object oriented cocepts like classes, objects and methods
by using the line type and row type internable declarations..
and user friendly out put
Regards,
GUDURI

Similar Messages

  • Devolped an ALV report for daily cash receipts for selected date range

    hi,   
                 how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report.

    hi,   
                 how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report.

  • Devloped an ALV report for daily cash receipts for selected date range

    hi,   
                 how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report.

    Hi,
    You can develop simple reports using Report Painter.
    You may be also interested in:
    Check report SAPMF05A for credit memo
    See the following Std reports on Payment Advices execute the Tcodes:
    S_ALR_87009888
    S_ALR_87009889
    S_ALR_87009890
    S_ALR_87009891
    S_ALR_87009892
    S_ALR_87009893
    S_ALR_87009978
    S_ALR_87009979
    S_ALR_87009980
    S_ALR_87009981
    S_ALR_87009982
    S_ALR_87009983
    S_ALR_87010056
    S_ALR_87010057
    S_ALR_87010058
    S_ALR_87010059
    S_ALR_87010060
    S_ALR_87010061
    S_ALR_87010066
    S_ALR_87010067
    S_ALR_87012106
    S_ALR_87012107
    S_ALR_87012108
    S_ALR_87012109
    S_ALR_87012110
    S_ALR_87012111
    S_ALR_87012116
    S_ALR_87012117
    S_ALR_87012200
    S_ALR_87012201
    S_ALR_87012202
    S_ALR_870122
    S_ALR_87012204
    S_ALR_87012205
    S_ALR_87012350
    S_ALR_87012351
    S_ALR_87012352
    S_ALR_87012353
    S_ALR_87012354
    S_ALR_87012355
    sample ALV report:
    tables:
    marav. "Table MARA and table MAKT
    Data to be displayed in ALV
    Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
    matically determine the fieldstructure from this source program
    Data:
    begin of imat occurs 100,
    matnr like marav-matnr, "Material number
    maktx like marav-maktx, "Material short text
    matkl like marav-matkl, "Material group (so you can test to make
                            " intermediate sums)
    ntgew like marav-ntgew, "Net weight, numeric field (so you can test to
                            "make sums)
    gewei like marav-gewei, "weight unit (just to be complete)
    end of imat.
    Other data needed
    field to store report name
    data i_repid like sy-repid.
    field to check table length
    data i_lines like sy-tabix.
    Data for ALV display
    TYPE-POOLS: SLIS.
    data int_fcat type SLIS_T_FIELDCAT_ALV.
    select-options:
    s_matnr for marav-matnr matchcode object MAT1.
    start-of-selection.
    read data into table imat
      select * from marav
      into corresponding fields of table imat
      where
      matnr in s_matnr.
    end-of-selection.
    Now, we start with ALV
    To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
    The fieldcatalouge can be generated by FUNCTION
    'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
    report source, including this report.
    The only problem one might have is that the report and table names
    need to be in capital letters. (I had it )
    Store report name
    i_repid = sy-repid.
    Create Fieldcatalogue from internal table
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME         = sy-repid
                I_INTERNAL_TABNAME     = 'IMAT'  "capital letters!
                I_INCLNAME             = sy-repid
           CHANGING
                CT_FIELDCAT            = int_fcat
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM       = i_repid
                I_STRUCTURE_NAME         = 'marav'
                I_DEFAULT                = 'X'
                I_SAVE                   = 'A'
           TABLES
                T_OUTTAB                 = imat.
      IF SY-SUBRC <> 0.
        WRITE: 'SY-SUBRC: ', SY-SUBRC .
      ENDIF.
    Hope this will help.
    Regards,
    Naveen.

  • Regarding ALV Reporting in ABAP

    Hi All,
    I have some clarifications related to <b>ALV Reporting</b> in ABAP.
    <b>Actually i have to create ALV report with Structure Length/Each record length is around 300 characters.</b>
    Is it possible to create a ALV Report with <b>300</b> length for each record!
    If possible which is the best<b>[ALV]</b> method for the same!
    Can anybody give me the solution!
    Thanks in advance.
    Thanks & Regards,
    Prasad.

    Hai Prasad
    Check with the code
    *& Report  ZALV_PRAKASH_SAMP                                           *
    REPORT  ZALV_PRAKASH_SAMP .
    TABLES: MARA.
    TYPE-POOLS : SLIS.
    Data declaration
    DATA: BEGIN OF I_MARA OCCURS 0.
            INCLUDE STRUCTURE MARA.
    DATA: END OF I_MARA.
    DATA: V_REPID LIKE SY-REPID.
    selection-screen
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
      SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.
      PARAMETERS: P_MTART LIKE MARA-MTART DEFAULT 'ROH'.
    SELECTION-SCREEN END OF BLOCK B1.
    initialisation
    INITIALIZATION.
    S_MATNR-LOW = '1400'.
    S_MATNR-HIGH = '1500'.
    APPEND S_MATNR.
    V_REPID = SY-REPID.
    start-of-selection
    START-OF-SELECTION.
    SELECT * FROM MARA
        INTO TABLE I_MARA
        WHERE MATNR IN S_MATNR AND
              MTART = P_MTART.
      CHECK SY-SUBRC = 0.
    end of selection
    END-OF-SELECTION.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
      I_CALLBACK_PROGRAM             = ' '
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
       I_STRUCTURE_NAME               = 'MARA'
      IS_LAYOUT                      =
      IT_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
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = I_MARA
    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.
    loop at i_mara.
    write:/ i_mara.
    endloop.
    Thanks & Regards
    Sreenivasulu P

  • Select Options use in ALV Report in ABAP Webdynpro

    Hello Experts,
    I Already Done ALV Report In webdynpro with use of view Container UI element.But i do not know ALV  report with help of select option.so
    Kindly Give Me simple Example of Use in select Option In ALV.
    Reply ASAP.
    Regards,
    Ameya Karadkhedkar

    First you need to add the component WDR_SELECT_OPTIONS to the tab "Used components" of your Web Dynpro component and then also in the properties tab of your view. In the layout you need to create another view container and embed the view WND_SELECTION_SCREEN of the new used component to it.
    Then in the WDDOINIT method of your view you can write this code (where SEL_OPT is the given name for the used component) in order to set the select option (This example is a select option for a date):
    DATA: lo_cmp_usage           TYPE REF TO if_wd_component_usage,
          lo_interfacecontroller TYPE REF TO iwci_wdr_select_options,
          lo_r_helper_class      TYPE REF TO if_wd_select_options,
          rt_range_date          TYPE REF TO data.
    * Instantiate used component WDR_SELECT_OPTIONS (SEL_OPT)
    lo_cmp_usage = wd_this->wd_cpuse_sel_opt( ).
    IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    * Call method in used controller
    lo_interfacecontroller = wd_this->wd_cpifc_sel_opt( ).
    lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
    * Create select option for the date
    CALL METHOD lo_r_helper_class->create_range_table
      EXPORTING
        i_typename    = 'DATS'
      RECEIVING
        rt_range_table = rt_range_date.
    CALL METHOD lo_r_helper_class->add_selection_field
      EXPORTING
        i_id          = 'DATS'
        it_result     = rt_range_date
        i_read_only   = ABAP_FALSE.
    * Hide unnecessary buttons
    CALL METHOD lo_r_helper_class->set_global_options
      EXPORTING
        i_display_btn_cancel  = abap_false
        i_display_btn_check   = abap_false
        i_display_btn_reset   = abap_false
        i_display_btn_execute = abap_false.
    Finally you need to write the following code in the action of the button in order to fetch the range table selected by the user.
    DATA: lo_cmp_usage            TYPE REF TO if_wd_component_usage,
          lo_interfacecontroller  TYPE REF TO iwci_wdr_select_options,
          lo_r_helper_class       TYPE REF TO if_wd_select_options,
          rt_date                 TYPE REF TO data.
    FIELD-SYMBOLS: <fs_date> TYPE table.
    * Instantiate used component WDR_SELECT_OPTIONS (SEL_OPT)
    lo_cmp_usage = wd_this->wd_cpuse_sel_opt( ).
    IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    * Call method in used controller
    lo_interfacecontroller = wd_this->wd_cpifc_sel_opt( ).
    lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
    * get selected range of inspections date
    CALL METHOD lo_r_helper_class->get_range_table_of_sel_field
      EXPORTING
        i_id          = 'DATS'
      RECEIVING
        rt_range_table = rt_date.
    ASSIGN rt_date->* TO <fs_date>.
    Then you can use the value that is assigned to the field symbol <fs_date> to continue with your ALV.

  • Tool to export and import high volume data from/to Oracle and MS Excel

    We are using certain reports (developed in XLS and CSV) to extract more than 500K to 1M records in single report. There around 1000 reports generated daily. The business users review those reports and apply certain rules to identify exceptions then they apply those corrections back to the system through XL upload.
    The XL reports are developed in TIBCO BW and deployed in AMX platform. The user interface is running on TIBCO GI.
    Database Version: Oracle 11.2.0.3.0 (RAC - 2 node)
    The inputs around following points will be of great help:
    1) Recommendation to handle such higher volumes reports and mechanism to apply bulk correction back to system?
    2) Suggestions for any Oracle tool or third party tool

    If you were to install Oracle client software on the PC where EXCEL is installed,
    then you can utilize ODBC such that Excel can connect directly to the DB & issue SQL.

  • ALV Report how to display from and to date values in the header.

    I develoeped alv report . i want to display selection screen from and to date values in  top of page...
    any sample code pls guide me..

    You have to do many things...
    first find the selection details using the FM.
    RS_REFRESH_FROM_SELECTOPTIONS
    use the Blog to Align/populate the Header  from the selection table
    /people/community.user/blog/2007/05/07/alignment-of-data-in-top-of-page-in-alv-grid

  • ALV report -How to display list contains no data?

    Hi Experts,
    I have developed an drill down alv report ? I like to display if 'List contains no data ' or 'No data to display' in Grid itself when there is no data to dissplay instead of an Message ?how can i do that?

    hi
        u should have used this command before calling your grid or list
    if gt_itab[] is not initial. --> comment this
    call function reuse or call method
    endif.
    assuming you have given a top of page for your grid output
    if helpful, reward
    Sathish. R

  • ALV Reports using Abap Objects ?

    <b>Hi All,
    I am trying to print the values in my internal table using ALV, using ABAP classes and objects. Here i am able to get the total succesfully. but i need to get subtotals also, like based on the carrid in table sflight i need subtotal of price for every carrid like 'LH' , 'SQ'.
    here is my code:</b>
    REPORT znav_report.
    DATA: alv TYPE REF TO cl_salv_table,
    value1 TYPE REF TO cl_salv_aggregations,
    value2 TYPE REF TO cl_salv_aggregation.
    DATA: BEGIN OF itab_flight OCCURS 0,
    carrid LIKE sflight-carrid,
    connid LIKE sflight-connid,
    fldate LIKE sflight-fldate,
    price LIKE sflight-price,
    paymentsum LIKE sflight-paymentsum,
    currency LIKE sflight-currency,
    END OF itab_flight.
    SELECT carrid
    connid
    fldate
    price
    paymentsum
    currency
    FROM sflight INTO TABLE itab_flight
    WHERE carrid = 'LH' OR carrid = 'SQ'.
    cl_salv_table=>factory( IMPORTING r_salv_table = alv
    CHANGING t_table = itab_flight[] ).
    CALL METHOD alv->get_aggregations
    RECEIVING
    value = value1.
    CALL METHOD value1->add_aggregation
    EXPORTING
    columnname = 'PAYMENTSUM'
    aggregation = if_salv_c_aggregation=>total
    RECEIVING
    value = value2.
    alv->display( ).
    <b>here how to get subtotals for every different carrid.
    regards,
    Navneeth.K</b>

    Hi,
    Make use of one of these statement,,,,
    <b>Either</b>
    <b>(a)</b>  select carrid connid fldate price currency planetype into table itab_flight from sflight.
    <b>or</b>
    <b>(b)</b>  select * into corresponding fields of table itab_flight from sflight.
    <b>(a)</b> is better in performace than<b> (b)</b>
    <b>But before that, please note some performance related issues with OO Context...</b>
    1. When defining an Internal table, avoid occurs specification, It is Obsolete,Make use of Initial Size n.
    2. Declare Workarea separately,since Internal table defined along with header line is Obsolete in OO Context.Its better and more robust to fill the itab and fetch the values from itab using a separate Workarea rather than the header line... So avoid header lines...
    3. When defining an internal table, follow this way ....
          Define a Linetype (Field String) using the TYPES Statement
          TYPES: begin of ty_line,
                      f1 type i,
                      f2 type i,
                      end of ty_line.
          Then define a Table type using TYPES Statement...
         TYPES: ty_lines type standard table of ty_line with default key.   
      "there is differnnce between line and lines..... make it clear..."
        Then after, define the internal table and its work area using DATA statement... as shown below..
    DATA: i_lines type ty_lines,
              wa_lines like line of i_lines
    <b>This is the standard way of defining the internal table under OO Context.,,..
    Your definition is creating a default header line....that should be avoided...</b>
    Thanks for ur patience,
    Regards..
    Mohammed Anwar..

  • ALV  Report(sap-abap)

    Hi Friends,
        Could u pls tell me how to down load my report output to excel sheet with proper coumn headings through function module  with small example ? So that it can be used in future whenever i required it .bcoz it takes so much time (30 min - 1 hr).
    Thx in Adv.,
    Bapi

    Hi ,
    you can use following code fragment to d/l excel sheet with header.
    Populate fieldnames.
          I_FIELDNAMES-NAME = 'Customer'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Name'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Sales Order'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Item'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Material'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Description'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Quantity'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Net Value'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Total Tax'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Net Value + Total Tax'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Creation Date'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Resource Category'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Resource Sub Category'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Resource Type'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Project ID'.
          APPEND I_FIELDNAMES.
          I_FIELDNAMES-NAME = 'Account ID'.
          APPEND I_FIELDNAMES.
          CALL FUNCTION 'WS_DOWNLOAD'
               EXPORTING
                    FILENAME                = P_PATH
                    FILETYPE                = 'DAT'
                    MODE                    = 'O'
               TABLES
                    DATA_TAB                = IT_TPF
                    FIELDNAMES              = I_FIELDNAMES
               EXCEPTIONS
                    FILE_OPEN_ERROR         = 1
                    FILE_WRITE_ERROR        = 2
                    INVALID_FILESIZE        = 3
                    INVALID_TYPE            = 4
                    NO_BATCH                = 5
                    UNKNOWN_ERROR           = 6
                    INVALID_TABLE_WIDTH     = 7
                    GUI_REFUSE_FILETRANSFER = 8
                    CUSTOMER_ERROR          = 9
                    OTHERS                  = 10.
    Regards,
    Sumit

  • Relate between two tables in ALV REPORT(SAP-ABAP)

    Hi Friends,
         I want to retrieve name1 and city1 from <b>kna1</b> , and kunrg from <b>vbrk</b>.
         Could u pls tell me on what basis i should pick these value ?
    Thx and Regds,
    Bapi

    Hi
    tables: kna1
    select single KUNNR name1 ort01 from kna1 where kunnr = vbrk-kunrg.
    or
    select single KUNNR name1 ort01 from kna1 where kunnr = vbrk-kunag.
    write: / kna1-kunnr, kna1-name1, kna1-ort01.
    <b>
    link between tables is
    VBRK-KUNAG = KNA1-KUNNR (customer/Sold to party)
    Reward points for useful Answers</b>
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • ALV report value is not coming in output

    Hi all,
    I have developed one ALV report using ABAP OOPS. i have used Custom Container to display my all values.
    below are the methods i am calling to dispaly and all values is coming in T_DATASET[] ans fcat, But after Executing my report it is not displaying any value.
    my container is blank in output only fcat-coltext is coming and fieldname value is not coming.
    wa_fcat-fieldname = 'T_DATASET-KAVS'.
                 wa_fcat-coltext = ' '.
    CALL METHOD grid1->set_table_for_first_display
        CHANGING
          it_outtab       = T_DATASET[]
          it_fieldcatalog = fcat.
    please guide me.
    Thanks in Advance.

    Check below code. And make sure you code below steps before calling set table for first display.
    IF G_CUSTOM_CONTAINER1 IS INITIAL.
    *     create container for ALV grid1
          CREATE OBJECT G_CUSTOM_CONTAINER1
             EXPORTING
               CONTAINER_NAME = 'CUST_CONT'.
    else.
        ENDIF.
        IF GRID1 IS INITIAL.
    *     create ALV grid
          CREATE OBJECT GRID1
             EXPORTING
               I_APPL_EVENTS = SELECTED    "application event
               I_PARENT = G_CUSTOM_CONTAINER1.
          G_LAYOUT1-EDIT       = 'X'.
          G_LAYOUT1-sel_mode   = '3'.
          G_LAYOUT1-NO_TOOLBAR = 'X'.
          G_LAYOUT1-ZEBRA      = 'X'.
          G_LAYOUT1-info_fname = 'ROWCOLOR'.
          G_LAYOUT1-GRID_TITLE = TEXT-006.
          G_LAYOUT1-STYLEFNAME = 'CELLTAB'.
          CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
               EXPORTING IS_LAYOUT        = G_LAYOUT1
                         IT_TOOLBAR_EXCLUDING = GT_TOOLBAR_EXCLUDING
               CHANGING  IT_FIELDCATALOG  = GT_FIELDCAT_LVC[]
                         IT_OUTTAB        = CONP[].

  • Trafic lights in ALV report

    Hi Masters,
    i have tried my best to Impliment the TRAFIC LIGHTS in my alv report but i could not succeed.
    can i have some input as to how we impliment the TRAFIC LIGHTS CODE in alv report.
    your valuble info is highly appriciated.
    thank you,
    pasala.

    the previous post is the sample code if you want to use ALV via cl_salv_table, but if you want to build ALV using function module REUSE_ALV_GRID_DISPLAY, please try following sample code. It works in my computer. Hope it helps.
    types: begin of gs_outtab.
       types:   lights               type char1,
                color                type i,
                tabcol               type lvc_t_scol,
                id                   type char25, " Already exist in ICON, Flat Structure
                name                 type icon-name,
                symbol               type icon-id,
           end   of gs_outtab.
    data: gt_outtab type standard table of gs_outtab.
    data: gr_grid   type ref to cl_gui_alv_grid.
    data: gr_container type ref to cl_gui_custom_container,
          gs_layout type lvc_s_layo,
          gt_fieldcat type lvc_t_fcat.
    data: ls_vari   type disvariant.
    data: g_okcode type syucomm.
    data: gt_exc type table of ALV_S_QINF.
    data: text type string.
    selection-screen begin of block gen with frame.
    parameters:
    p_amount type i default 20.
    selection-screen end of block gen.
    selection-screen begin of block dsp with frame.
    parameters:
    p_full   radiobutton group dsp,
    p_grid   radiobutton group dsp.
    selection-screen end of block dsp.
    START-OF-SELECTION.
    END-OF-SELECTION.
       perform select_data.
       IF p_full = 'X'.
         perform display_fullscreen.
       ELSE.
         perform display_grid.
       ENDIF.
    STEP 1: load data *******************************************
    form select_data.
      select * from icon into corresponding fields of table gt_outtab
               up to p_amount rows.
    endform.
    STEP2: build full screen **************************************
    form display_fullscreen .
      data: ls_layout type slis_layout_alv,
            lt_fcat type slis_t_fieldcat_alv,
            ls_fcat type slis_fieldcat_alv.
          ls_layout-lights_tabname   = '1'.
          ls_layout-lights_fieldname = 'LIGHTS'.
          ls_layout-coltab_fieldname =  'TABCOL'.
          clear ls_fcat.
          ls_fcat-fieldname = 'LIGHTS'.
          ls_fcat-inttype = 'C'.
          ls_fcat-seltext_l = ls_fcat-seltext_m = ls_fcat-seltext_s = 'Lights'.
          append ls_fcat to lt_fcat.
          clear ls_fcat.
          ls_fcat-fieldname = 'COLOR'.
          ls_fcat-inttype = 'I'.
          ls_fcat-seltext_l = ls_fcat-seltext_m = ls_fcat-seltext_s = 'Color'.
          append ls_fcat to lt_fcat.
          clear ls_fcat.
          ls_fcat-fieldname = 'ID'.
          ls_fcat-inttype = 'C'.
          ls_fcat-seltext_l = ls_fcat-seltext_m = ls_fcat-seltext_s = 'Icon'.
          ls_fcat-icon = abap_true.
          append ls_fcat to lt_fcat.
          clear ls_fcat.
          ls_fcat-fieldname = 'SYMBOL'.
          ls_fcat-inttype = 'C'.
          ls_fcat-seltext_l = ls_fcat-seltext_m = ls_fcat-seltext_s = 'Symbol'.
          ls_fcat-symbol = abap_true.
          append ls_fcat to lt_fcat.
          clear ls_fcat.
          ls_fcat-fieldname = 'NAME'.
          ls_fcat-tech = abap_true.
          append ls_fcat to lt_fcat.
          perform select_data.
          perform set_tooltips.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         IS_LAYOUT                         = ls_layout
         IT_FIELDCAT                       = lt_fcat
         IT_EXCEPT_QINFO                   = gt_exc
        TABLES
          T_OUTTAB                          = gt_outtab
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2
       ASSERT sy-subrc = 0.
    endform.
    STEP3: display grid ******************************************
    form display_grid.
      call screen 100.
    endform.
    STEP4: PBO ***************************************************
    module d0100_pbo output.
      perform d0100_pbo.
    endmodule.
    STEP5: PAI ***************************************************
    module d0100_pai input.
      perform d0100_pai.
    endmodule.
    STEP6: PBO form ***********************************************
    form d0100_pbo .
      set pf-status 'D0100'.
      if gr_container is not bound.
        create object gr_container
          exporting
            container_name = 'CONTAINER'.
        create object gr_grid
            exporting i_parent = gr_container.
      data: ls_layout type lvc_s_layo,
            lt_fcat type lvc_t_fcat,
            ls_fcat type lvc_s_fcat.
          ls_layout-excp_fname = 'LIGHTS'.
          ls_layout-ctab_fname =  'TABCOL'.
          clear ls_fcat.
          ls_fcat-fieldname = 'LIGHTS'.
          ls_fcat-inttype = 'C'.
          ls_fcat-scrtext_l = ls_fcat-scrtext_m = ls_fcat-scrtext_s = 'Lights'.
          append ls_fcat to lt_fcat.
          clear ls_fcat.
          ls_fcat-fieldname = 'COLOR'.
          ls_fcat-inttype = 'I'.
          ls_fcat-scrtext_l = ls_fcat-scrtext_m = ls_fcat-scrtext_s = 'Color'.
          append ls_fcat to lt_fcat.
          clear ls_fcat.
          ls_fcat-fieldname = 'ID'.
          ls_fcat-inttype = 'C'.
          ls_fcat-scrtext_l = ls_fcat-scrtext_m = ls_fcat-scrtext_s = 'Icon'.
          ls_fcat-icon = abap_true.
          append ls_fcat to lt_fcat.
          clear ls_fcat.
          ls_fcat-fieldname = 'SYMBOL'.
          ls_fcat-inttype = 'C'.
          ls_fcat-scrtext_l = ls_fcat-scrtext_m = ls_fcat-scrtext_s = 'Symbol'.
          ls_fcat-symbol = abap_true.
          append ls_fcat to lt_fcat.
          clear ls_fcat.
          ls_fcat-fieldname = 'NAME'.
          ls_fcat-tech = abap_true.
          append ls_fcat to lt_fcat.
      perform select_data.
      perform set_tooltips.
      data: lt_tooltips type lvc_t_qinf,
            lt_toolb type ui_functions,
            ls_toolb type UI_FUNC.
      ls_toolb = CL_GUI_ALV_GRID=>mc_fc_call_crbatch.
      append ls_toolb to lt_toolb.
      lt_tooltips = gt_exc.
      call method gr_grid->set_table_for_first_display
            exporting is_layout   = ls_layout
                 it_except_qinfo  = lt_tooltips
                 it_toolbar_excluding = lt_toolb
            changing
                  it_fieldcatalog = lt_fcat
                  it_outtab       = gt_outtab.
      endif.
    endform.
    STEP7: PAI form ******************************************************
    form d0100_pai .
      case g_okcode.
        when 'BACK' or 'EXIT' or 'CANC'.
          set screen 0.
          leave screen.
      endcase.
    endform.
    STEP8: Set Tooltip *************************************************
    FORM set_tooltips .
      field-symbols: <outtab> type gs_outtab.
      data: tooltips type ref to cl_salv_tooltips,
            settings type ref to cl_salv_functional_settings,
            ls_styl type lvc_s_styl,
            value type char128,
            text type char40,
            ls_symbol type icon,
            lt_symbol type standard table of icon,
            ls_exc type ALV_S_QINF,
            tabix type sy-tabix,
            col type lvc_s_scol.
      loop at gt_outtab assigning <outtab>.
        tabix = sy-tabix.
        read table lt_symbol index sy-tabix into ls_symbol.
        <outtab>-symbol = ls_symbol-id.
        value = <outtab>-id(3).
        text = <outtab>-name.
        concatenate value '\Q' text '@' into value.
        <outtab>-id = value.
        value = ls_symbol-id.
        text  = ls_symbol-name.
        ls_exc-type = cl_salv_tooltip=>c_type_symbol.
        ls_exc-value = value.
        ls_exc-text = text.
        append ls_exc to gt_exc.
        <outtab>-color = tabix mod 7 + 1.
        <outtab>-lights = tabix mod 3 + 1.
        col-fname = 'COLOR'.
        col-color-col = tabix mod 7 + 1.
        if tabix ge 7.
          col-color-inv = 1.
        endif.
        if tabix ge 14.
          col-color-int = 1.
        endif.
        append col to <outtab>-tabcol.
      endloop.
    ENDFORM.

  • Print program for large ALV Report

    I have an ALV report that has around 20 columns of data which I would approximate that it will take 3 pages to display the data.
    When I use the print button for this report, the layout is changed to the max possible columns 65x255 and yet many columns go missing in the hard copy.
    It seems I need to write some separate logic to print this document. How can I handle this?
    I am using CL_SALV_TABLE t o generate the report. I am already handling events ON_USER_COMMAND & TOP_OF_PAGE.
    Thank you.

    Hi,
      Because the standard format of ALV output setting is X_65_255, when you want to extend the column number, you have to choose other format type follow the steps below:
       1.ALV screen, press 'print.' button->properties->
       2.double click 'format  X_65_255'->
       3.In format field you can choose your setting with search help.
      In R/3 system, we have several format as default, we can also define our own format by t-code: spad.
       1.Spad->
       2.Full administration->
       3.Devices types->
       4.Click 'Display' of Format types->
       5.Now, you can find X_65_255 format type here, click modify button and create a new one.
       6.Input format type, 'L' format type for ABAP lists, fill Attribuetes... ...
       7.Spad->Full administration->Device types->Device Types-> choose the device type you alredy use and double click it
       8.Click 'formats' button in application bar
       9.Click 'Create' button in application bar.
      10.Add the format you just created.
      11.After above steps you added the format to your device type, double click the format you added.
      12.In the tab page of Formats we have to fill the following Actions:
                       a.Printer initialization
                       b.End of page
                       c.End of line.
           You can copy  the code of each action from other formats, they are exactly the same!
        You can find your own defined page format in the ALV print properity, now!
    Best regards!

  • Download alv report output to excel format with out header line

    Hi experts,
    i want to download a alv report output into excel formatt with out the header line but it has to download including field description. as this output will fed into another transaction, the downloaded excel file should be with out header line.
    fro eg:
    Report   : Zabc                      ABAP Development          Page  :     1
    Run Date : 12/14/06                                                     System: UD400 
    Run Time : 08:45:37
    this header details should not be downloaded into the excel file.
    could somebody help me please.
    thanks
    deepu

    hi jayanti,
    thanks for your response.
    i have delclared all the field types as character but still it is not downloading and it 's sy-subrc is 4... the code is as below.
    *field names
      lt_fieldnames-value = 'Material Number'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Plant'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Material Group'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Material Description'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'UOM'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Price Unit'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Material Type'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'X-Plant Status'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Valuation Class'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = lw_avmng.
      APPEND lt_fieldnames.
      lt_fieldnames-value = lw_avntp.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Latest PO Qty'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Latest PO Cost'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'PO Creation Date'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = lw_fcaqt.
      APPEND lt_fieldnames.
      lt_fieldnames-value = 'Prev. Yr. Std. Cost'.
      APPEND lt_fieldnames.
      lt_fieldnames-value = lw_stcst.
      APPEND lt_fieldnames.
      CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          file_name                       = 'XLSHEET'
        CREATE_PIVOT                    = 0
        DATA_SHEET_NAME                 = ' '
        PIVOT_SHEET_NAME                = ' '
        PASSWORD                        = ' '
        PASSWORD_OPTION                 = 0
        TABLES
        PIVOT_FIELD_TAB                 =
          data_tab                        = t_output1
          fieldnames                      = lt_fieldnames
        EXCEPTIONS
          file_not_exist                  = 1
          filename_expected               = 2
          communication_error             = 3
          ole_object_method_error         = 4
          ole_object_property_error       = 5
          invalid_pivot_fields            = 6
          download_problem                = 7
          OTHERS                          = 8
      IF sy-subrc <> 0.
        MESSAGE e001 WITH 'Data could not be downloaded'.
      ENDIF.
    ENDFORM.                               " z_dwn_xl
    thanks
    deepu

Maybe you are looking for

  • Unable to see days in Week view.

    I open my iCal, and switch over to Week view, but the days of the week don't display on the top. My brother's Mac and friends display the days. I have tried to reinstall iCal, and also removed the plist file and rebooted, and days still don't show up

  • I bank on line and when I run my statement it is placed horizonal instead of vertical and freezes the screen

    I bank on line and tried to run a copy of my latest statement.  It was placed on the screen horizonally  instead of vertical and freezes the screen when I try to print it.  My bank told me the Adobe was responsible for this situation and they could n

  • Do gift recipients need credit card to open account

    I already have an account with my cc info but I want to gift a tv series to my in-laws who are (thankfully) cautious about putting their cc info anywhere on the internet. If I gift them the tv show for use on their imac, will they have to supply cred

  • Not able to control the interactive ALV

    Hi all, I am having a requirement that when i double click on the PO field it has to call the transaction ME23N and it is working. But when I am clicking on the other fields also it is trying to call the transaction.. and giving error that this docum

  • Kwqiclode: Error 3113 happened during loading of queue

    Hi, in ( alert_VIS.log ) of BDUMP file errors are captured as follows; =============================================== Tue Jan 29 07:49:51 2008 kwqiclode: Error 3113 happened during loading of queue Tue Jan 29 07:49:52 2008 kwqiclode: Error 3113 happ