Two headers in an ALV Output

Hi,
Searched but could find anything.
Would anybody know how i could code 2 headers in an ALV output.
Tnks.
eg..
Month1      Month2
Value1 Value2  Value1 Value2
5           6           7          8

Hi,
Check this thread
Re: multiple headers in alv output
aRs

Similar Messages

  • Assigning Column Headers Dynamically in ALV output

    Hello Experts,
    I have to create dynamic column headers based on the user input on the selection-screen. Basically users enter the period and the ALV output has to create the column headers dynamically for that along with some standard columns.
    For eg, The selection screen is like this:
    From:  'Q4' '2009'
    To      'Q2'  '2011'.
    Then I have to create 12 columns for the months and rest for the Quarters.
    Then the output will be like this:
    Material, Description,10/09, 11/09, 12/09, 01/10, 02/10, 03/10, 04/10, 05/10, 06/10, 07/10, 08/10, 09/10, Q4/10, Q1/11, Q2/11
    I have built the logic to determine the number of colums for the periods based on input.
    By reading other posts, I have learnt that I have to use call method cl_alv_table_create=>create_dynamic_table to get the functionality.
    I have also looked at program BCALV_TABLE_CREATE for some help. It only has column headers in increasing order. But I am not able to understand How to pass the Column Header Label (for eg 10/09 or Q1/10) to the fieldcat dynamically.
    Is there any blog/sample prog close to my req? Can anybody please please help me. I grealy appreciate it.
    Thanks.

    Hi Lope,
    You need to filll column heading based on dynamic internal table column names.
    In your final internal table, you will have some column names like '1009, 1109, 1209' .
    While filling fieldcatalog you need to put your logic for column heading text.
    If column name is 1009, concatenate '10 '  '/'   '09', or calculate the quarter 10 falls into ,and display Q4/09.
    Regards,
    Nisha Vengal.

  • To download alv output to two excel sheets because of large data

    Hi all,
    I want to download alv output to excel sheet,I know how to do,but the no of record is very large and can not be accomodated in one sheet.
    can anyone please tell how to download it into two sheets or some other way.
    I want excel format only.
    Regards,
    sudha

    hi sudha yadav,
    right now i am working on the same issue.
    what right i am doing is that,
    i want to download an internal table it is containing more than 2 lakhs records but excel can accomidate 60000 records, so
    before call gui download i am sending first 60000 records into another internal table with same time, by using append statemen and indexs,
    that new internal table i am downloading
    again i am repeating the same thing by using sy-tabix,
    finally i am creating more than one excel file
    by using oops concepts we can also create in one excel file no of work sheets
    but its lengthy process so i am right now creating no of excel files only
    if it is useful , pls rewards points to this answer

  • ALV Output into Excel problem

    HI ,
    I developed ALV report, the output is coming properly. But if i download that output into local file or spreadsheet from ALV output screen am unable to get the data only header and field headers are coming but data is not coming. But for other ALV with same importing parameters it is downloading properly. I donu2019t know whatu2019s problem only for this ALV, any one can please help me out from this situation pls.
    Thx

    Hi Lavanya
        There can be two possibilities
      1.) check the authorization, if it's missing, then this might happen...u hav said that the other report, it's downloading fine...r u trying to download the other report also with the same user id? is it a standard program or a customized report?
    2.) just try reducing the security level in excel --> Tools -> Macros -> Security
    regards
    Sathish

  • Problem in downloading ALV output in excel

    Dear Abapers,
                           I am facing a problem while downloading alv output in spreadsheet. Report headers and data headings are coming in excle but contents are missing instead of that No Data is displaying on excel sheet. I have debug that and observed the deep structure name T_OUTTAB using by the FM ALV_DATA_EXPORT is empty, It should contain the contents of my output data.
    Below I am giving my code. 
    ***********************************************declaration****************
          BEGIN OF d_file_out,
            index           TYPE i,                      "Index no
            msg             TYPE string,              "Message
            msgtyp(1)       TYPE c,                 "Message type
           END OF d_file_out,
    DATA:t_file_out       TYPE TABLE OF d_file_out.
    DATA:wa_file_out          TYPE d_file_out.
    Display Error Logs
    PERFORM display_logs USING text-006.
    FORM display_logs USING p_text TYPE string.
      CONSTANTS:  c_count    TYPE char5 VALUE 'INDEX',
                  c_mestyp   TYPE char6 VALUE 'MSG',
                  c_message  TYPE char7 VALUE 'MSGTYP'.
    *Field catalog
      PERFORM: z_field_catalog USING c_count   text-010,  "Record number
               z_field_catalog USING c_mestyp  text-011,  "Message type
               z_field_catalog USING c_message text-012.  "Message
    *Top of page event
      PERFORM z_event USING t_events.
    wa_layout-colwidth_optimize = c_x.
    ALV grid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
         i_buffer_active          = 'X'
           i_callback_program = sy-repid
         is_layout          = wa_layout
         I_STRUCTURE_NAME   = wa_file_out
          it_fieldcat        = t_field
          it_events          = t_events
        TABLES
          t_outtab           = t_file_out
        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.
    ***********************************Fieldcatalog**********************************************
    FORM z_field_catalog USING p_field TYPE any
                                                p_name  TYPE any.
      wa_field-fieldname = p_field.
      wa_field-seltext_l = p_name.
      IF p_field = 'INDEX'.
        wa_field-outputlen = '14'.
        wa_field-col_pos = 1.
      ELSEIF p_field = 'MSG'.
        wa_field-outputlen = '120'.
        wa_field-col_pos = 2.
      ELSEIF p_field = 'MSGTYP'.
        wa_field-outputlen = '08'.
        wa_field-col_pos = 3.
      ENDIF.
      APPEND wa_field TO t_field.
      CLEAR wa_field.
    ENDFORM. 
    Here I have given my code, which contain the building of field catalog and Calling ALV Grid. I have already checked the excel micros settings. Other programs are working fine on my system and downloading in excel is also working.
    Hope to get reply soon.
    Regards,
    Himanshu

    Hi ,
    use this to down load to xcel
    v_file = lv_file.
      DATA:  BEGIN OF s_head OCCURS 0,
             head(40) TYPE c ,
             END OF s_head.
      s_head-head = text-015."'Sales price'.   * for header
      APPEND s_head.
      s_head-head = text-016."'Purchase price'.   * for header
      APPEND s_head.
      s_head-head = text-017."'Listing Procedure'.   * for header
      APPEND s_head.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_file
         filetype                        = 'ASC'
         write_field_separator           = '#'
        TABLES
          data_tab                        = it_output1[]
          fieldnames                      = s_head[]
       EXCEPTIONS
         file_write_error                = 1
         no_batch                        = 2
         gui_refuse_filetransfer         = 3
         invalid_type                    = 4
         no_authority                    = 5
         unknown_error                   = 6
         header_not_allowed              = 7
         separator_not_allowed           = 8
         filesize_not_allowed            = 9
         header_too_long                 = 10
         dp_error_create                 = 11
         dp_error_send                   = 12
         dp_error_write                  = 13
         unknown_dp_error                = 14
         access_denied                   = 15
         dp_out_of_memory                = 16
         disk_full                       = 17
         dp_timeout                      = 18
         file_not_found                  = 19
         dataprovider_exception          = 20
         control_flush_error             = 21
         OTHERS                          = 22
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • ALV: Send ALV output as mail - background processing

    Hi all,
    I'm a newbie in SDC and try to implement the following functionality (Version 4.0B):
    A ABAP report (to be scheduled as e.g. a daily job run) with ALV output should send an automated email containing the ALV informations to a receiver specified in the selection criterias.
    I already have the following pieces:
    1) The report with ALV output (running online and clicking on List/send/office works perfectly, the alv-output is attached to the mail). The report runs also in background and generates a spool.
    2) A subroutine wich sends a email (input has to be in an itab)
    Now I try to put them together.
    Question: How can I automate the send process?
    I did a little bit of debugging, but got lost in the SAP Office functions.
    Any help appreciated!
    Thomas

    Hi Michael,
    thank you again a helpfull reply. To solve the issue I ended up writing a second little report.
    Here is a short description of my solution just in case anybody else is also interested in.
    I set up a Job with two steps.
    Step 1 is the ABAP that creates e.g. a ALV output (anything that goes to spool).
    Step 2 is a little ABAP that does nothing else than reading the output of step 1 (Spool) and send it as SAP Office Document. (To be a little more flexible I added some selection criterias for step 2 like Jobstep number, receiver, sendmode, ...).
    It works fine online (by keying in the spool number manually) and in batch mode (by determining the spool  number based on the job number). I think this solution is flexible and lightwight.
    Kind regards,
    Thomas
    Message was edited by: Thomas Hager
    Message was edited by: Thomas Hager

  • Query on display the Alv output,...................its urgent pls help

    hi friends,
        Here is my query on a Alv Report output display
      I have two internal tables i_vbak and i_vbap
    i_vbak contains the fields and value as
    vbeln     kunnr    auart  audat                   bstnk   vkorg
    1000066         1000071  ze0r   20070918       Itest1     PA11
    1000067         1000072  ze0r   20070919       SLA-Test1  PA11
    i_vbap contains the field and value as
    VBELN             MATNR             ARKTX
    1000066    SAMPLE MATERIAL1   Sample Material for reports
    1000066    SAMPLE MATERIAL    Sample Material for reports
    1000066    TEST   MATERIAL       Test Material for reports
    1000067    SAMPLE MATERIAL    Sample Material for reports
    1000067    TEST MATERIAL         Test Material for reports
    1000067    SAMPLE MATERIAL1   Sample Material for reports
    I have a another internal table called inv_final which contain all these fields and respective values to display in the alv output.Here i am giving only two field how it whould come in alv output.
    Sold to Patry(kunnr)  Sales Doc No(vbap-vbeln)    Material Name(matnr)
    1000071                  1000066                  Sample Material1
    1000071                  1000066                  Sample Material
    1000071                  1000066                  Test Material
    1000072                  1000067                  Sample Material 
    1000072                  1000067                  Test Material
    1000072                  1000067                  Sample Material1
    If anybody have done similay kind of repore than help me with the code,or else if anybody having any idea to solve this out than help me.I have only prob with the logic bofore the final table display in the alv output.
    Helpful answer will be rewardad generously.
    Thanks a lot
    mrutyun^

    Hi
    Put all the fields in to an internal table and disply only your required fields.
    Kuntal

  • Can we get the data from two internal tables in ALV.

    hi friends i would like to display the data using two internal tables using alv grid.please guide me.

    Hi,
    ALV would be having a specific layout say :
    MATNR
    MAKTX
    QTY
    Now, if you have two internal tables, then do they have a different structure. If they have different structures, then what kind of ALV layout you expect. The ALV output should be as per the structure of 1st or 2nd internal table.
    If both internal table have same layout, then populate the data from 2nd internal table into 1st internal table and pass the 1st internal table ( it will have data of both internal tables) to ALV.
    Best regards,
    Prashant

  • Add new selection fields and ALV output  fields in VA05

    Hi,
    I want to add two new selection fields in VA05 'Further selection criteria' screen, also want to add some more fields in VA05 ALV output.
    Please help me how i can do it using user exit ?
    Thanks ,
    Archana

    hi,
    You have to copy the standard program SAPMV75A to ZSAPMV75A, change them accordingly.

  • Transfer ALV Output through Function Module

    Hi All,
    I have a requirement where I am dealing with two systems.
    1) There is a report program which run in ECC Server and it makes an RFC Call to trigger another program in APO Server
    2) The target program generates an ALV Output and I just want to bring back the output into ECC system
    3) How to achieve this ? How can transport the AVL Output throug the parameters of the RFC Function Module.
    Any help/clue  on this would be highly appreciated
    Thanks,
    Babu Kilari

    Hello Babu,
    If you are submitting the standard report in background mode, try this algo:
    1. You can export the output list to the ABAP memory using the EXPORTING LIST TO MEMORY.
    2. Then get the list details using the FM: LIST_FROM_MEMORY. Return the resultant internal table to your RFC.
    Hope this helps.
    BR,
    Suhas

  • Right Click in ALV output ?

    Hi,
    I have got an ALV output.
    The reqmnt now is that, if the user Right Clicks on a particular field which is displayed, it should show two transactions, and then it should go to the transaction which is selected by the user.
    How to do this in ALV. Any sample code would be very helpful.
    Regards.

    Check this sample program..may be it will help u.
    REPORT z_alv_context_menu NO STANDARD PAGE HEADING.
    * Type pool declaration
    TYPE-POOLS: slis.
    * Internal table declaration
    DATA: BEGIN OF gt_outtab OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA: END OF gt_outtab.
    data: gt_events       TYPE slis_t_event.
    * Structure / Variable declaration
    DATA: g_repid         LIKE sy-repid,
          event           TYPE slis_alv_event.
    * Event: START-OF-SELECTION
    START-OF-SELECTION.
    * Storing the program name
      g_repid = sy-repid.
    * Building ALV event table
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 4
        IMPORTING
          et_events       = gt_events
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc = 0.
        REFRESH gt_events.
    *   Adding records for CONTEXT_MENU event
        event-name = 'CONTEXT_MENU'.
        event-form = 'CONTEXT_MENU'.
        APPEND event TO gt_events.
      ENDIF.
    * Data Selection
      SELECT * FROM sflight INTO CORRESPONDING FIELDS
                       OF TABLE gt_outtab
                       UP TO 00030 ROWS.
    * Display ALV grid
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
          i_callback_program          = g_repid
          i_callback_user_command     = 'USER_COMMAND'
          i_structure_name            = 'SFLIGHT'
          it_events                   = gt_events
        TABLES
          t_outtab                    = gt_outtab
        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 html_top_of_page
    FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
      CALL METHOD top->add_text
        EXPORTING
          text      = 'Hello world '
          sap_style = 'heading'.
      CALL METHOD top->add_gap
        EXPORTING
          width = 200.
      CALL METHOD top->add_picture
        EXPORTING
          picture_id = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "html_top_of_page
    * Form  context_menu
    FORM context_menu USING e_object TYPE REF TO cl_ctmenu.
      DATA: l_smenu TYPE REF TO cl_ctmenu.
      IF e_object IS BOUND.
    *   Create custom Sub-menu to hide column on which right
    *   mouse button will be clicked
        CREATE OBJECT l_smenu.
        CALL METHOD l_smenu->add_function
          EXPORTING
            fcode = 'ZFN1'
            text  = 'Hide Column'(001).
        CALL METHOD e_object->add_submenu
          EXPORTING
            menu = l_smenu
            text = 'Hide'(002).
      ENDIF.
    ENDFORM.                    "CONTEXT_MENU
    * Form  user_command
    FORM user_command  USING r_ucomm TYPE sy-ucomm
                             ls_selfield TYPE slis_selfield.
      DATA: g_grid TYPE REF TO cl_gui_alv_grid,
            t_catalog TYPE lvc_t_fcat,
            w_catalog TYPE lvc_s_fcat,
            l_repid  TYPE sy-repid.
      CASE r_ucomm.
    *   When 'hide column' sub-menu is clicked from the context menu
    *   then hide the column from where this is happened
        WHEN 'ZFN1'.
    *     Get the global instance of the ALV grid as well as
    *     it's field catalog info.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              e_callback_program = l_repid
              e_grid             = g_grid
              et_fieldcat_lvc    = t_catalog.
          CHECK l_repid = g_repid.
          IF g_grid IS BOUND AND t_catalog[] IS NOT INITIAL.
    *       Set the 'NO_OUT' attribute of the catalog to 'X'
            w_catalog-no_out = 'X'.
    *       Modify the field with this above value
    *       on which right click occured
            MODIFY t_catalog FROM w_catalog TRANSPORTING no_out
                WHERE fieldname = ls_selfield-fieldname.
            IF sy-subrc = 0.
    *         Set the field catalog with this modified one
              CALL METHOD g_grid->set_frontend_fieldcatalog
                EXPORTING
                  it_fieldcatalog = t_catalog.
            ENDIF.
          ENDIF.
        WHEN OTHERS.
    * Do nothing
      ENDCASE.
      ls_selfield-refresh = 'X'.
    ENDFORM.                    "USER_COMMAND

  • Navigate betwenn more ALV Outputs

    Hi UI Experts,
    suppose there is a dynpro and four custom tables. At the above section are two arrow icons. On click to
    the arrow I can either page forward or backward and display mentioned custom tables sequently on the
    Dynpro as ALV output. Is it possible ? If so pls. do you have an example code for me ?
    Regards
    sas erdem

    Yes, it should be possible.
    No i don't have an example.
    What you could do is have a look at how ALV's are displayed and then be a bit creative and try things out.

  • How to get two header colums using alv?

    Hi,
    experts,
    I want to display alv output with two header columns like shows below:
    Subjects
    |   English       |         Maths       |     Science     |    Social   |         Politics                   |                
    100
    56
    89
    12
    85
    25
    85
    36
    78
    100
    75
    55
    65
    74
    100
    How to acheive this by using ALV Grid dispaly. please end me any document on this .
    Thanks in advance,
    Shabeer Ahmed.

    Hi,
    Please check the link given below :
    Two column header in ALV Report
    hope it will help you.
    Thanks & Regards,
    Sarita Singh Rathour

  • Total is not getting displayed in the ALV output.

    Hi,
    Total is not getting displayed in the ALV output.
    I m using :REUSE_ALV_BLOCK_LIST_APPEND & REUSE_ALV_BLOCK_LIST_DISPLAY
    Are  there any issues with it as the same settings are working fine with REUSE_ALV_LIST_DISPLAY
    source code:
    DATA: layout TYPE slis_layout_alv,
          IT_eventS  TYPE slis_t_event,
          fcat   TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          rec_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    TYPES: BEGIN OF ty_tab,
          belnr TYPE dberchz-belnr,
          belzart TYPE dberchz-belzart,
          net TYPE dberchz-nettobtr,
          END OF ty_tab.
    DATA: lt_tab TYPE STANDARD TABLE OF ty_tab.
    SELECT belnr belzart nettobtr
      FROM dberchz
      INTO TABLE lt_tab[]
    WHERE belnr eq '000000000001'.
      if sy-subrc ne 0.
      ENDIF.
    *  defining layout
    layout-colwidth_optimize = 'X'.
    layout-def_status = 'X'.
    *defning event
    *event
    *defining field catalog
    fcat-col_pos = 1.
    fcat-fieldname = 'BELNR'.
    fcat-tabname  = 'LT_TAB'.
    APPEND fcat.
    fcat-col_pos = 2.
    fcat-fieldname = 'BELZART'.
    fcat-tabname  = 'LT_TAB'.
    APPEND fcat.
    fcat-col_pos = 3.
    fcat-fieldname = 'NET'.
    fcat-tabname  = 'LT_TAB'.
    fcat-do_sum = 'X'.
    APPEND fcat.
    *calling alv
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program             = 'YZ_PLR'
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   IT_EXCLUDING                   =
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = layout
        it_fieldcat                      = fcat[]
        i_tabname                        = 'LT_TAB'
        it_events                        = IT_EVENTS[]
    *   IT_SORT                          =
    *   I_TEXT                           = ' '
      tables
        t_outtab                         = lt_tab[]
    * EXCEPTIONS
    *   PROGRAM_ERROR                    = 1
    *   MAXIMUM_OF_APPENDS_REACHED       = 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_BLOCK_LIST_DISPLAY'
    Thanks,
    Gaurav

    Hi
    No I don't think, this is my code (based on your code) and it works fine:
    TYPE-POOLS SLIS.
    DATA: BEGIN OF LT_TAB OCCURS 0,
           BELNR LIKE BSEG-BELNR,
           GJAHR LIKE BSEG-GJAHR,
           WRBTR LIKE BSEG-WRBTR,
           WAERS LIKE BKPF-WAERS,
          END OF LT_TAB.
    DATA: LAYOUT     TYPE SLIS_LAYOUT_ALV,
          IT_EVENTS  TYPE SLIS_T_EVENT,
          FCAT       TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          REC_FCAT   TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
    START-OF-SELECTION.
      FCAT-COL_POS       = 1.
      FCAT-FIELDNAME     = 'BELNR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'BELNR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 2.
      FCAT-FIELDNAME     = 'GJAHR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'GJAHR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 3.
      FCAT-FIELDNAME     = 'WRBTR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-CFIELDNAME    = 'WAERS'.
      FCAT-REF_FIELDNAME = 'WRBTR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      FCAT-DO_SUM        = 'X'.
      APPEND FCAT.
      FCAT-COL_POS       = 4.
      FCAT-FIELDNAME     = 'WAERS'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'WAERS'.
      FCAT-REF_TABNAME   = 'BKPF'.
      FCAT-DO_SUM        = SPACE.
      APPEND FCAT.
      SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE LT_TAB
        WHERE BUKRS = 'MAAB'
          AND BELNR = '0000000001'.
      LT_TAB-WAERS = 'EUR'.
      MODIFY LT_TAB FROM LT_TAB TRANSPORTING WAERS WHERE WAERS = SPACE.
    *CALLING ALV
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM = 'ZPROVAMAX5'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT   = LAYOUT
          IT_FIELDCAT = FCAT[]
          I_TABNAME   = 'LT_TAB'
          IT_EVENTS   = IT_EVENTS[]
        TABLES
          T_OUTTAB    = LT_TAB[].
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    I've also inserted a currency field
    Max

  • I am not getting the headings of the fields in ALV output.

    I am not getting ALV out put but  the headings of the fields in ALV output.
    Please see my below code .
    TYPES : BEGIN OF ty_zgxmit.
              INCLUDE STRUCTURE zgxmit.
    TYPES : END OF ty_zgxmit.
    DATA : gt_zgxmit TYPE TABLE OF ty_zgxmit.
    *&      Form  alv_display                                              *
    This subroutine is to display the out put in ALV.                    *
    FORM alv_display .
    Local data
      DATA: y_x          LIKE boole  VALUE 'X'.
    DATA: lt_fieldcat  TYPE slis_t_fieldcat_alv.
      DATA: lf_fieldcat  TYPE slis_fieldcat_alv.
      DATA: lh_index     LIKE lf_fieldcat-col_pos.
    For variant
    DATA: ws_repid LIKE sy-repid,
          g_save TYPE c VALUE 'A',
          g_exit TYPE c,
          g_variant LIKE disvariant,
          gx_variant LIKE disvariant.
      For 1st field.( RPT_LOC )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'RPT_LOC'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'RPT_LOC'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 2nd field.( BAL_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'BAL_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'BAL_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 3rd field.( INC_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'INC_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'INC_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 4th field.( Z500_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'Z500_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'Z500_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = 'ZJV_2245'
                it_fieldcat              = lt_fieldcat
           TABLES
                t_outtab                 = gt_zgxmit
           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.                    " alv_display

    You can force the headings like so.
    CLEAR lf_fieldcat.
    lf_fieldcat-fieldname = 'RPT_LOC'.
    lf_fieldcat-tabname = 'GT_ZGXMIT'.
    lf_fieldcat-ref_tabname = 'RPT_LOC'.
    lf_fieldcat-ref_fieldname = 'ZGXMIT'.
    lf_fieldcat-reptext_ddic  = 'Whatever Heading'.    "<-  Right here
    lh_index = lh_index + 1.
    lf_fieldcat-col_pos = lh_index.
    lf_fieldcat-key = y_x.
    lf_fieldcat-no_sum = y_x.
    APPEND lf_fieldcat TO lt_fieldcat.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Game center just says loading and cant play any games

    I am using a Iphone 3gs at&t but i have switched to Straight talk the phone is not Jailbroke or anything just have downloaded unlockit.co.nz for my APN settings.Everything has always worked but now for some reason when i go into Game Center it just s

  • Can't see other phones in account?

    Why can't I see the other phone on my account and view usage details?  I'm the account owner.

  • How to specify  inclusion and exclusion rules for File data sources

    This is the seed URL for a file data source: file://localhost/c:/myDir/ I want to exclude indexing and searching of files under: file://localhost/c:/myDir/obsolete/ What is the exact format for the exclusion URL? I have tried both file://localhost/c:

  • IMovie 09 import hangs

    24" iMac 2.66 intel Core 2 Duo 4GB RAM I've seen a few archived posts on this with no apparent solution. iMovie 09 is hanging (spinning wheel) during import from a Canon Vixia. It will import a few clips at a time just fine, but if importing more tha

  • Scrolling Row Text Color in JScrollPane

    Hi, I've implemented a JTable that overrides the prepareRenderer method so that if certain criteria are met, the text of the associated row are set to a certain color.           // Create JTable and override prepareRenderer method           centertab