ALV heading - need to removed in spool

Hi,
I am sending  a ALV output list to spool. In the spool it is stored in more than one page with header line appears for every page.  I don't need any page seperator between the records. i.e
I need to suppress the header line of the ALV list from 2nd page to last page.
Please suggest.
Thanks,
Gopi

Hi,
I think you will have to build the logic for the same.
Get the spool output into internal table using FM 'RSPO_GET_ABAP_SPOOLJOB'.
Then build the logic to delete the unwanted lines.
Best regards,
Prashant

Similar Messages

  • Need to remove space for a field when displayed in ALV Report

    Hi,
    I have material field of length 18, but the content is only 10 char. I need to remove the extra space when it is displayed on ALV Report.
    Is there any option in ALV field catalogue

    use statement condense.
    condense zmatnr.
    also giv output lenth of alv column as 10.

  • Prevent Occurence of list header and page breaks in spool file of ALV Grid

    Prevent Occurence of list header and page breaks in spool file of ALV Grid  Display.
    When we run the ALV in background and create spool request then:
    Spool file output is coming like this.
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    But the required is like this
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    Please suggest a posible answer

    Hello all,
    if you have not yet solved this on your own, here is my solution: use a format type that has 60000 lines per page for your spool output device.
    It all depends on the format type that was used for creating the spool output.
    By default (in our system), we have 65 lines per page. And after each page the column headings of the ALV will appear.
    What i did:
    create a new format type via transaction SPAD->full administration->device types->format types (copy an existing one)
    change"Number of Rows" to 60000 or something applicable
    edit the device type of your output device (e.g. LOCL) to contain the newly created format type (via SPAD; Button "Formats" in device type maintenance).
    That's it! Be sure to use this format type for your output device in the "Background Print Parameters" window (-> Button "Properties").
    Regards
    Daniel Klein
    All other parameters you discussed before didn't do it. All ALV-Settings will be overwritten by the output device settings and its print properties.

  • How to keep fields enable for Inout on ALV Header

    Hi,
    I have a requirement where I have Material and plant Number of selection screen.
    I have to display the ALV GRID report keeping Material and Plant in its header details.
    I need to put a "CHG MAT/PLNT" button on the report output screen. When user presses this button Material and Plant fields on ALV header should become enable to Change. User given new selection criteria there itself and presses ENTER, the report output should be refreshed on the basis of given new selection criteria.
    Can anyone please suggest me how to put a BUTTON in ALV display and make these two fields open for INPUT once this button is pressed.
    Please write back to me if you feel any doubt in the requirement.
    Thanks,
    Ashish Agrawal

    Hi Ashish Agrawal  ,
    in Form built layout
    check LAYOUT-GROUP_CHANGE_EDIT = 'X'.
    Hope this sole u r problem.
    <REMOVED BY MODERATOR>
    Thanks and regards ,
    rajeshwar .
    Edited by: Alvaro Tejada Galindo on Apr 23, 2008 5:13 PM

  • Need Help in Formatting Spool data

    Hi,
    Can anyone of you let me knw how to obtain the output flat file in the below format ?
    "ID"|"NAME"|"PARENT_ID"
    "NQ TEL"|"14"|"Macetown"
    But I am gettin the output.. as below.
    VENDOR_NAME||'|'||VENDOR_ID||'|'||CITY
    NQ TEL|14|Macetown
    NA TEL|14|Molokai
    I am using the following script in SQL PLUS and calling it with @ < file path>.
    set heading on
    set echo off
    set feedback off
    spool Y:\Spool\output1.txt
    select Vendor_Name || '|' || Vendor_ID || '|' || City from vendor where city like 'Ma%';
    spool off;
    set feedback on
    set echo on
    set heading on
    Can anyone help me on this.? In Addition to this, I also need to remove the line separating Header and the Data .
    Thanks a ton. :)

    Try this:
    select ' " ' || Vendor_Name || ' " ' || ' "|" ' from vendor where city like 'Ma%';

  • Space in Top of page on alv header

    Hi Experts,
    I do have a query on ALV , Can you please help me in solving my problem.
    Here goes my query...
    I have to develop a ALV where on the top of page i have to display two fields as shown in below which was highlighted in the screen
    http://img410.imageshack.us/my.php?image=op2sn9.jpg
    But i'm getting output as shown below screen
    http://img410.imageshack.us/my.php?image=op1ut4.jpg
    I have tried with space and all other alternatives but i'm unable to get the desired output.
    Can i have any sample code for the same
    Regards
    Nanda

    Hi,
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material No'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    * up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    * Form  TOP-OF-PAGE                                                 *
    * ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    * Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    * Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    * Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
    concatenate 'Total No. of Records Selected:' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
    *            i_logo             = 'Z_LOGO'.
    endform.
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    * Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
    *   Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
    *     Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    *     Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    *     Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
    *       Build events table
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events[].
      read table gt_events with key name =  slis_ev_end_of_page
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
        read table gt_events with key name =  slis_ev_end_of_list
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
    *       Setup print parameters
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
    *&      Form  END_OF_PAGE
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  END_OF_LIST
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    Try with this sample
    Regards
    Krishna

  • ALV Heading Problem

    Hi Friends,
    In ALV GRID i need to display the output header like below.
    SHIP
    SOLD
    |----
    NUM
    NAME
    NUM
    NAME
    It's not dots and pipes. But like the box with above design.
    Can any one please give me your valuable inputs regarding this.
    I want to use it in ALV GRID . i.e: By using ALV FM or OOPS also.
    Thanks
    Srinivas.

    Hi
    REPORT znnr_nnr LINE-SIZE 125.
    TABLES: ekko.
    type-pools: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
    gd_tab_group type slis_t_sp_group_alv,
    gd_layout type slis_layout_alv,
    gd_repid like sy-repid,
    gt_events type slis_t_event,
    gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-datatype = 'CURR'.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    endform. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    form build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    endform. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    form display_alv_report.
    gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    it_events = gt_events
    is_print = gd_prntparams
    i_save = 'X'
    is_variant = z_template
    tables
    t_outtab = it_ekko
    exceptions
    program_error = 1
    others = 2.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endform. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
    from ekpo
    into table it_ekko.
    endform. " DATA_RETRIEVAL
    Form TOP-OF-PAGE *
    ALV Report Header *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
    wa_header type slis_listheader,
    t_line like wa_header-info,
    ld_lines type i,
    ld_linesc(10) type c.
    Title
    wa_header-typ = 'H'.
    wa_header-info = 'EKKO Table Report'.
    append wa_header to t_header.
    clear wa_header.
    Date
    wa_header-typ = 'S'.
    wa_header-key = 'Date: '.
    CONCATENATE sy-datum+6(2) '.'
    sy-datum+4(2) '.'
    sy-datum(4) INTO wa_header-info. "todays date
    append wa_header to t_header.
    clear: wa_header.
    Total No. of Records Selected
    describe table it_ekko lines ld_lines.
    ld_linesc = ld_lines.
    concatenate 'Total No. of Records Selected: ' ld_linesc
    into t_line separated by space.
    wa_header-typ = 'A'.
    wa_header-info = t_line.
    append wa_header to t_header.
    clear: wa_header, t_line.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = t_header.
    i_logo = 'Z_LOGO'.
    endform.
    FORM USER_COMMAND *
    --> R_UCOMM *
    --> RS_SELFIELD *
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    Check function code
    CASE r_ucomm.
    WHEN '&IC1'.
    Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'EBELN'.
    Read data table, using index of row user clicked on
    READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    Set parameter ID for transaction screen field
    SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    Sxecute transaction ME23N, and skip initial data entry screen
    CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDCASE.
    ENDFORM.
    *& Form BUILD_EVENTS
    Build events table
    form build_events.
    data: ls_event type slis_alv_event.
    call function 'REUSE_ALV_EVENTS_GET'
    exporting
    i_list_type = 0
    importing
    et_events = gt_events[].
    read table gt_events with key name = slis_ev_end_of_page
    into ls_event.
    if sy-subrc = 0.
    move 'END_OF_PAGE' to ls_event-form.
    append ls_event to gt_events.
    endif.
    read table gt_events with key name = slis_ev_end_of_list
    into ls_event.
    if sy-subrc = 0.
    move 'END_OF_LIST' to ls_event-form.
    append ls_event to gt_events.
    endif.
    endform. " BUILD_EVENTS
    *& Form BUILD_PRINT_PARAMS
    Setup print parameters
    form build_print_params.
    gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
    gd_prntparams-no_coverpage = 'X'.
    endform. " BUILD_PRINT_PARAMS
    *& Form END_OF_PAGE
    form END_OF_PAGE.
    data: listwidth type i,
    ld_pagepos(10) type c,
    ld_page(10) type c.
    write: sy-uline(50).
    skip.
    write:/40 'Page:', sy-pagno .
    endform.
    *& Form END_OF_LIST
    form END_OF_LIST.
    data: listwidth type i,
    ld_pagepos(10) type c,
    ld_page(10) type c.
    endform.

  • Blocked ALV Header and Item Displau

    Hi Friends,
    I`m new to ABAP and the forum.I`m in dire need of solution for a report.
    Scenario
    I have an internal table with fields ebeln vbeln adrnr.
    For every change in ebeln i need to create a new page in ALV and display the item VBELN and some more fields.
    Its like a header and item in a single page of alv report.
    Is there a possibility to use ALV here or only classical report can be used in the scenario???

    Hi,
    For Blocked alv header and item display you
    declaration internal table fields ebeln vbeln adrn
    TYPE-POOLS SLIS.
    TYPES : BEGIN OF TY_EKKO,
         EBELN TYPE EKKO-EBELN,
         AEDAT TYPE EKKO-AEDAT,
         vblen TYPE EKKO- vbeln,
         END OF TY_EKKO.
    DATA : IT_EKKO TYPE TABLE OF TY_EKKO,
         WA_EKKO TYPE TY_EKKO.
    DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
         IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : WA_EVENTS TYPE SLIS_ALV_EVENT,
         IT_EVENTS TYPE SLIS_T_ALV_EVENT,
         IS_LAYOUT TYPE SLIS_LAYOUT_ALV.
    For Build catalog
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'EBELN'.
    WA_FIELDCAT-SELTEXT_M = 'PO NUMBER'.
    WA_FIELDCAT-COL_POS = 1.
    WA_FIELDCAT-KEY = 'X'.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'AEDAT'.
    WA_FIELDCAT-SELTEXT_M = 'DATE OF CREATION'.
    WA_FIELDCAT-COL_POS = 2.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'LIFNR'.
    WA_FIELDCAT-SELTEXT_M = 'VENDOR NO'.
    WA_FIELDCAT-COL_POS = 3.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    read_data :
    SELECT * INTO TABLE IT_EKKO FROM EKKO UP TO 20 ROWS.
    print_header :
    DATA : IT_LIST TYPE SLIS_T_LISTHEADER,
         WA_LIST TYPE LINE OF SLIS_T_LISTHEADER.
    CLEAR WA_LIST.
    WA_LIST-TYP = 'H'.
    WA_LIST-INFO = 'LIST OF PURCHASE ORDERS'.
    APPEND WA_LIST TO IT_LIST.
    Header along with write statement at top-of-page then use these function module
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = IT_LIST

  • How to delelete alv header part.

    Dear frnds,
                    I want to delete ALV header data, In alv output above the alv table sum setting are there (view filter) i dont want that settings i want to delete that header part and i want to delete columns headings also i need data part only.
    Give the code to delete that headers and column headings..
    thanks & regards,
    rajesh

    Hi ,
    I added below code in on_select method.
    data: node_customer  type ref to if_wd_context_node,
    l_salv_wd_table1 TYPE REF TO iwci_salv_wd_table,
    l_table1 TYPE REF TO cl_salv_wd_config_table.
    DATA : lr_salv_wd_table_usage1 TYPE REF TO if_wd_component_usage.
    refresh: i_custmast.
    node_customer = wd_context->get_child_node( name = `CUST_STATUS` ).
    node_customer->bind_table( new_items = i_custmast ).
    select NAME1 STATUS from zbas_custmast  into TABLE
                         i_custmast where kunnr eq <lt_kunnr>.
    if i_custmast is not INITIAL.
    node_customer = wd_context->get_child_node( name = `CUST_STATUS` ).
    node_customer->bind_table( new_items = i_custmast ).
    ELSE.
       wd_this->report_message( EXPORTING message = 'No data available for customer details' ).
    endif.
    lr_salv_wd_table_usage1 = wd_this->wd_cpuse_alv( ).
    IF   lr_salv_wd_table_usage1->has_active_component( ) IS INITIAL.
        lr_salv_wd_table_usage1->create_component( ).
      ENDIF.
    l_salv_wd_table1 = wd_this->wd_cpifc_alv( ).
      l_table1 = l_salv_wd_table1->get_model( ).
    l_table1->if_salv_wd_column_settings~delete_column( 'STAT_COL' ).

  • To change alv header dynamically

    Hello!
    I need to change header of alv according to internal table in herarical alv .
    as internal table having 10 kunnr ,i need every kunnr name at the header level.
    please guide me how is it possible.
    surely points will be awarded.
    Priya.

    Hi,
    Use the below code and declare as below :
    data : gt_listheader TYPE slis_t_listheader,
             gs_line TYPE slis_listheader,
      PERFORM f_build_alv_title USING gt_listheader[].
    *&      Form  f_build_alv_title
    *       text : ALV Header Section
    FORM f_build_alv_title
        USING lt_top_of_page
        TYPE slis_t_listheader.
      CLEAR gs_line.
    *Customer Number
      if not itab[] is initial.
    loop at itab.
        CLEAR: gs_line.
        gs_line-typ  = s.
        gs_line-key  = 'Customer'(015).
        gs_line-info = itab-kunnr.
        APPEND gs_line TO lt_top_of_page.
    endloop.
    endif.
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
               i_callback_program                = gv_repid
               i_callback_user_command           = 'F_USER_COMMAND'
               i_callback_top_of_page            = 'TOP_OF_PAGE'
               is_layout                         = gt_layout
               it_fieldcat                       = gt_fieldcat[]
               it_sort                           = gt_sort[]
               i_save                            = 'A'
               it_events                         = gt_event[]
        TABLES
          t_outtab                          = gt_output
             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  top_of_page
    *       text : Top of Page event
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_listheader.
    ENDFORM.                    "TOP_OF_PAGE
    Thanks,
    Sriram Ponna.
    Message was edited by:
            Sriram Ponna
    Message was edited by:
            Sriram Ponna

  • Print ALV Heading using FM REUSE_ALV_COMMENTARY_WRITE

    Hi,
      How to print the heading using FM REUSE_ALV_COMMENTARY_WRITE?
    I need heading format as
    Name1  :                    Date1        :
    Name2  :                    Date2        :
    like this. How can I print this?Please provide some example code.
    Regards,
    Anu.

    *& Report  Y_TOP_PAGE                                                  *
    REPORT  y_top_page                              .
    TABLES : mara.
    TYPE-POOLS: slis.
    DATA : w_repid LIKE sy-repid.
      w_repid = sy-repid.
    DATA : BEGIN OF it_mara OCCURS 0,
           matnr LIKE mara-matnr,
           END OF it_mara.
    *layout
    DATA: wa_layout           TYPE SLIS_LAYOUT_ALV.
    *field catalog
    DATA: it_fieldcat_wrt_off TYPE slis_t_fieldcat_alv,
          wa_fieldcat_wrt_off TYPE slis_fieldcat_alv.
    START-OF-SELECTION.
      SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE it_mara.
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = w_repid
       I_INTERNAL_TABNAME           = 'IT_MARA'
    *     i_structure_name             = 'IT_MARA'
    *   I_CLIENT_NEVER_DISPLAY       = 'X'
       I_INCLNAME                   = w_repid
    *   I_BYPASSING_BUFFER           =
    *   I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = it_fieldcat_wrt_off[]
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = w_repid
          i_callback_top_of_page = 'TOP-OF-PAGE'
          is_layout              = wa_layout
          it_fieldcat            = it_fieldcat_wrt_off
        TABLES
          t_outtab               = it_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.
    * Form  TOP-OF-PAGE                                                 *
    * ALV Report Header                                                 *
    FORM top-of-page.
    *ALV Header declarations
      DATA: t_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader,
            t_line LIKE wa_header-info,
            ld_lines TYPE i,
            ld_linesc(10) TYPE c.
    * Title
      wa_header-typ  = 'H'.
      wa_header-info = 'CHANDU REPORT'.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    * Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
    * Total No. of Records Selected
    *  describe table it_ekko lines ld_lines.
    *  ld_linesc = ld_lines.
    *  concatenate 'Total No. of Records Selected: ' ld_linesc
    *                    into t_line separated by space.
    *  wa_header-typ  = 'A'.
    *  wa_header-info = t_line.
    *  append wa_header to t_header.
    *  clear: wa_header, t_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
    *            i_logo             = 'Z_LOGO'.
    ENDFORM.                    "top-of-page

  • ALV  HEADER DISPLAY IN VERTICAL

    HI,
    IT IS POSSIBLE TO DISPLAY THE  ALV HEADING IN VERTICAL .
    PLZ GIVE ME THE DETAILS.
    THANKS,
    S.RANI

    Hi,
    You can refer the Link:
    < link to blocked site removed by moderator>
    Hope, this helps you,
    Regards,
    Kris
    Edited by: Thomas Zloch on Oct 27, 2011 9:12 AM

  • I will give my laptop to someone else, how do I unlink my apple id? Do I need to remove the apps I downloaded with my id?

    I will give my laptop to someone else, how do I unlink my apple id? Is it just the app store unlink? Do I need to remove the apps I downloaded with my id? Will they get removed when I unlink my apple id?
    Are there any other procedures I need to take into account?
    Thanks

    You need to remove all software that you acquired from the Mac App Store, including newer versions of OS X. These are all registered to you and encoded with your Apple ID in the licensed copy. You cannot legally pass any of the software to the new owner, which is why Apple states to erase the Mac and return it to the version of OS X that shipped from the factory on the Mac. You must also remove any older Apple software that you installed by DVD or pass the DVD to the new owner with the Mac.

  • How to display total in ALV Header

    How to display total in ALV Header?

    Hi Venkey,
    As far as your issue is concerned I would like to quote my perception.
    Create a header internal table with title and number of records.
    At the later part of your program you should have found the total number of records ,now assign it to the header internal table and print it.
    For further clarification you can go check this link:
    http://wiki.sdn.sap.com/wiki/display/ABAP/AddHeadertoALVreport
    Thanks
    P.Srikanth

  • FIELD VALUE IN ALV HEADER

    Hi friends,
    I make one header alv ok I want and take one variable count in my program so I want to display its value in ALV HEADER
    Total Target Qty:
    Total EMP. Efficiency 
    Total Machine Effi. 
    I take may header like this and pass thre text here.ok Now I want to display value of this three.
    Total Trget Qty: 2.23 like that.
    CLEAR st_line.
      st_line-typ = 'S'.
      CONCATENATE 'Total Target Qty: '  count     ' ' INTO st_line-info.
      APPEND st_line TO t_list_top_of_page.
    So I took like this in header count is my variable in which I take value.
    So how can we pass the value in ALV Header please tell me.
    its urgent so.
    Thnaks in Advance.
    Prashant.

    HI DHWANI,
    *& Report  ZPP_RE_EMP_DETAILS
    *& This Report is used to check the Employee Performance And Used Machine Quantity
    *& Rqueirement By Santhosh
    *& Developed By Prashant On Date 01.02.2008
    *&  Created By: Prashant Brahmbhatt
    *&  Creation Date: 20080201
    *&  Module: PP (Production & Plannig)
    *&  Changed By         Changed Date        Reason
    REPORT  zpp_re_emp_details.
    TABLES:zpplan.
    TYPE-POOLS:slis.
    DATA:BEGIN OF itab OCCURS 0,
         zdate LIKE zpplan-zdate,
         werks LIKE zpplan-werks,
         mname LIKE zpplan-mname,
         shftin LIKE zpplan-shftin,
         iserh LIKE zpplan-iserh,
         quaty LIKE zpplan-quaty,
         plan_qty LIKE zpplan-plan_qty,
         act_prod LIKE zpplan-act_prod,
         temp TYPE c,
         tar_qty(10) TYPE c,
         ach_qty(10) TYPE c,
         mch_eff(10) TYPE c,
        a(10) TYPE c,
         END OF itab.
    DATA:BEGIN OF temp OCCURS 0,
         zdate LIKE zpplan-zdate,
         werks LIKE zpplan-werks,
         mname LIKE zpplan-mname,
         shftin LIKE zpplan-shftin,
         iserh LIKE zpplan-iserh,
         quaty LIKE zpplan-quaty,
         plan_qty LIKE zpplan-plan_qty,
         act_prod LIKE zpplan-act_prod,
         temp TYPE c,
         tar_qty(10) TYPE c,
         ach_qty(10) TYPE c,
         mch_eff(10) TYPE c,
        a(10) TYPE c,
         END OF temp.
    DATA:BEGIN OF itab_t OCCURS 0,
         zdate LIKE zpplan-zdate,
         werks LIKE zpplan-werks,
         mname LIKE zpplan-mname,
         shftin LIKE zpplan-shftin,
         iserh LIKE zpplan-iserh,
         quaty LIKE zpplan-quaty,
         plan_qty LIKE zpplan-plan_qty,
         act_prod LIKE zpplan-act_prod,
         temp TYPE c,
         tar_qty(10) TYPE c,
         ach_qty(10) TYPE c,
         mch_eff(10) TYPE c,
        a(10) TYPE c,
         END OF itab_t.
    DATA:BEGIN OF itab1 OCCURS 0,
         zdate LIKE zpplan-zdate,
         werks LIKE zpplan-werks,
         mname LIKE zpplan-mname,
         shftin LIKE zpplan-shftin,
         act_prod LIKE zpplan-act_prod,
         quaty LIKE zpplan-quaty,
         planned LIKE zpplan-planned,
         iserh LIKE zpplan-iserh,
         temp TYPE c,
         tar_qty TYPE p DECIMALS 2,
         ach_qty TYPE p DECIMALS 2,
         mch_eff TYPE p DECIMALS 2,
         END OF itab1.
    DATA: wa LIKE  itab1.
    DATA:BEGIN OF itab2 OCCURS 0,
         zdate LIKE zpplan-zdate,
         werks LIKE zpplan-werks,
         mname LIKE zpplan-mname,
         shftin LIKE zpplan-shftin,
         act_prod LIKE zpplan-act_prod,
         quaty LIKE zpplan-quaty,
         planned LIKE zpplan-planned,
         iserh LIKE zpplan-iserh,
         temp TYPE c,
         tar_qty(10) TYPE p DECIMALS 2,
         ach_qty(10) TYPE p DECIMALS 2,
         mch_eff(10) TYPE p DECIMALS 2,
         count(10) TYPE c,
         END OF itab2.
    DATA: a(10) TYPE c,
          b(10) TYPE c,
          count(10) TYPE c,
          count1(10) TYPE c.
         c(2) TYPE p DECIMALS 2.
    DATA:t_fcat TYPE slis_t_fieldcat_alv,
         t_events TYPE slis_t_event,
         t_list_top_of_page TYPE slis_t_listheader,
         t_list_end_of_page TYPE slis_t_listheader.
    CONSTANTS:c_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
    CONSTANTS:c_formname_end_of_page TYPE slis_formname VALUE 'END_OF_PAGE'.
    DATA: st_line TYPE slis_listheader.
                  SELECTION-SCREEN
    SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    *PARAMETERS:shftin LIKE zpplan-shftin.
    SELECT-OPTIONS:date FOR zpplan-zdate,
                   shftin FOR zpplan-shftin,
                   werks FOR zpplan-werks.
    SELECTION-SCREEN:END OF BLOCK blk1.
                   ALV CALL
    INITIALIZATION.
      PERFORM build_fieldcatalog USING t_fcat .
      PERFORM event_call.
      PERFORM head_built USING t_events.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM display_alv.
    *&      Form  build_fieldcatalog
          text
         -->P_T_FCAT  text
    FORM build_fieldcatalog  USING temp_fcat TYPE slis_t_fieldcat_alv.
      DATA:w_fcat TYPE slis_fieldcat_alv.
      w_fcat-tabname = 'ITAB2'.
      w_fcat-fieldname = 'MNAME'.
      w_fcat-seltext_m = 'Machine Name'.
      APPEND w_fcat TO temp_fcat.
      CLEAR w_fcat.
      w_fcat-tabname = 'ITAB2'.
      w_fcat-fieldname = 'SHFTIN'.
      w_fcat-seltext_m = 'Emp No'.
      APPEND w_fcat TO temp_fcat.
      CLEAR w_fcat.
      w_fcat-tabname = 'ITAB2'.
      w_fcat-fieldname = 'ZDATE'.
      w_fcat-seltext_m = 'Pos Date'.
      APPEND w_fcat TO temp_fcat.
      CLEAR w_fcat.
    w_fcat-tabname = 'ITAB2'.
    w_fcat-fieldname = 'QUATY'.
    w_fcat-seltext_m = 'Quantity'.
    APPEND w_fcat TO temp_fcat.
    CLEAR w_fcat.
      w_fcat-tabname = 'ITAB2'.
      w_fcat-fieldname = 'ACT_PROD'.
      w_fcat-seltext_m = 'Actual Quantity'.
      APPEND w_fcat TO temp_fcat.
      CLEAR w_fcat.
      w_fcat-tabname = 'ITAB2'.
      w_fcat-fieldname = 'ISERH'.
      w_fcat-seltext_m = 'Down Time'.
      APPEND w_fcat TO temp_fcat.
      CLEAR w_fcat.
      w_fcat-tabname = 'ITAB2'.
      w_fcat-fieldname = 'TAR_QTY'.
      w_fcat-seltext_m = 'Target Qty.'.
      APPEND w_fcat TO temp_fcat.
      CLEAR w_fcat.
      w_fcat-tabname = 'ITAB2'.
      w_fcat-fieldname = 'ACH_QTY'.
      w_fcat-seltext_m = 'EMP Effec.'.
      APPEND w_fcat TO temp_fcat.
      CLEAR w_fcat.
      w_fcat-tabname = 'ITAB2'.
      w_fcat-fieldname = 'MCH_EFF'.
      w_fcat-seltext_m = 'Machine Effec.'.
      APPEND w_fcat TO temp_fcat.
      CLEAR w_fcat.
    w_fcat-tabname = 'ITAB2'.
    w_fcat-fieldname = 'COUNT'.
    w_fcat-seltext_m = 'Machine Effec.'.
    APPEND w_fcat TO temp_fcat.
    CLEAR w_fcat.
    ENDFORM.                    " build_fieldcatalog
    *&      Form  event_call
          text
    -->  p1        text
    <--  p2        text
    FORM event_call .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type           = 0
       IMPORTING
         et_events             = t_events
      EXCEPTIONS
        LIST_TYPE_WRONG       = 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.                    " event_call
    *&      Form  data_retrieval
          text
    -->  p1        text
    <--  p2        text
    FORM data_retrieval .
      IF shftin <> ''.
        SELECT zdate werks mname shftin  INTO CORRESPONDING FIELDS OF TABLE
         temp FROM zpplan
         WHERE shftin IN shftin
         AND zdate IN date
         AND werks IN werks.
      ELSE.
        SELECT zdate werks mname INTO CORRESPONDING FIELDS OF TABLE
           temp FROM zpplan
           WHERE  zdate IN date
           AND werks IN werks.
      ENDIF.
      SORT temp BY mname zdate shftin.
      DELETE ADJACENT DUPLICATES FROM temp.
      SORT temp BY mname shftin zdate.
      DELETE ADJACENT DUPLICATES FROM temp.
      APPEND temp.
      LOOP AT temp.
        SELECT zdate werks mname shftin act_prod quaty iserh   FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab_t
        WHERE mname = temp-mname
        AND zdate = temp-zdate
        AND werks = temp-werks.
        LOOP AT itab_t.
          MOVE-CORRESPONDING itab_t TO itab.
          APPEND itab.
        ENDLOOP.
      ENDLOOP.
      *******************************************8
    SELECT zdate werks mname shftin act_prod quaty iserh   FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab
         FOR ALL ENTRIES IN temp
         WHERE zdate = temp-zdate AND
               werks = temp-werks
              AND mname = temp-mname.
    SELECT zdate werks mname shftin act_prod quaty iserh   FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab
       WHERE zdate IN date AND
             werks IN werks AND
    shftin = shftin.
      SORT itab BY mname zdate.
    DELETE ADJACENT DUPLICATES FROM itab.
      LOOP AT itab.
        MOVE-CORRESPONDING itab TO itab1.
        COLLECT itab1.
      ENDLOOP.
      LOOP AT itab1.
        itab1-tar_qty = itab1-tar_qty + ( itab1-quaty / 3 ).
        IF  ( itab1-tar_qty NE 0 ).
          itab1-ach_qty = ( itab1-ach_qty +  itab1-act_prod / itab1-tar_qty ) * 100.
        ELSE.
          itab1-ach_qty = 0 * 100.
        ENDIF.
        itab1-mch_eff = ( ( 8 - itab1-iserh ) / 8 ) * 100.
        MODIFY itab1 TRANSPORTING tar_qty ach_qty mch_eff.
      ENDLOOP.
      LOOP AT itab1.
        READ TABLE itab1 INDEX 1 INTO wa.
        IF itab1-mname = wa-mname.
          itab1-zdate = wa-zdate.
          itab2-shftin = itab1-shftin.
          itab2-mname = itab1-mname.
          itab2-zdate = itab1-zdate.
               itab2-quaty = itab2-quaty + itab1-quaty.     
               itab2-act_prod = itab2-act_prod + itab1-act_prod.
               itab2-iserh = itab2-iserh + itab1-iserh.
               itab2-tar_qty = itab2-tar_qty + itab1-tar_qty.
               itab2-ach_qty = itab2-ach_qty + itab1-ach_qty.
          itab2-mch_eff = itab2-mch_eff + itab1-mch_eff.
        ELSE.
               APPEND itab2.
               CLEAR itab2.
               MOVE-CORRESPONDING itab1 TO wa.
          itab2-shftin = itab1-shftin.
          itab2-mname = itab1-mname.
          itab2-zdate = itab1-zdate.
          itab2-quaty = itab2-quaty + itab1-quaty.     
          itab2-act_prod = itab2-act_prod + itab1-act_prod.
               itab2-iserh = itab2-iserh + itab1-iserh.
               itab2-tar_qty = itab2-tar_qty + itab1-tar_qty.
               itab2-ach_qty = itab2-ach_qty + itab1-ach_qty.
               itab2-mch_eff = itab2-mch_eff + itab1-mch_eff.
        ENDIF.
      ENDLOOP.
      APPEND itab2.
      LOOP AT itab2.
        IF  ( itab2-tar_qty NE 0 ).
          itab2-ach_qty = ( itab2-ach_qty +  itab2-act_prod / itab2-tar_qty(10) ) * 100.
        ELSE.
          itab2-ach_qty = 0 * 100.
        ENDIF.
        itab2-mch_eff = ( ( 8 - itab2-iserh ) / 8 ) * 100.
        MODIFY itab2 TRANSPORTING tar_qty ach_qty mch_eff.
      ENDLOOP.
    APPEND itab2.
      LOOP AT itab2.
       count = sy-tfill.
        a = a + itab2-tar_qty.
        b = b + itab2-ach_qty.
      ENDLOOP.
      CLEAR itab2.
      itab2-tar_qty = a.
      itab2-ach_qty = b.
      APPEND itab2.
      CLEAR itab2.
      count = a / sy-tfill.
      count1 = b / sy-tfill.
      itab2-tar_qty = count.
      itab2-ach_qty = count1.
    itab2-tar_qty = count.
      APPEND itab2.
    ENDFORM.                    " data_retrieval
    *&      Form  head_built
          text
         -->P_T_EVE  text
    FORM head_built  USING    p_t_eve TYPE slis_t_event.
    count = a / sy-tfill.
      DATA: ls_event TYPE slis_alv_event.
      REFRESH t_list_top_of_page.
      READ TABLE p_t_eve WITH KEY name = slis_ev_top_of_page INTO ls_event.
      IF sy-subrc = 0.
        MOVE c_formname_top_of_page TO ls_event-form.
        MODIFY p_t_eve FROM ls_event   INDEX sy-tabix.
      ENDIF.
       CLEAR st_line.
        st_line-typ = 'S'.
        st_line-key = 'Total Target Qty: '.
        st_line-info = count.
        APPEND st_line TO t_list_top_of_page.
    CLEAR st_line.
    st_line-typ = 'S'.
    st_line-info = count.
    CONCATENATE 'Avg Target Qty.'  count  ' ' INTO st_line-info.
    APPEND st_line TO t_list_top_of_page.
      CLEAR st_line.
        st_line-typ = 'S'.
        st_line-key = 'Avg.EMP Efficiency: '.
        st_line-info = count1.
        APPEND st_line TO t_list_top_of_page.
      CLEAR st_line.
        st_line-typ = 'S'.
        st_line-key = 'Avg. Machine Efficincy: '.
       st_line-info = count.
        APPEND st_line TO t_list_top_of_page.
    REFRESH t_list_end_of_page.
    READ TABLE p_t_eve WITH KEY name =  slis_ev_end_of_list INTO ls_event.
    IF sy-subrc = 0.
       MOVE c_formname_end_of_page TO ls_event-form.
       MODIFY p_t_eve FROM ls_event INDEX sy-tabix.
    ENDIF.
    CLEAR st_line.
    st_line-typ = 'S'.
    CONCATENATE 'END OF PAGE' ' ' INTO st_line-info.
    APPEND st_line TO t_list_end_of_page.
    ENDFORM.                    " head_built
    *&      Form  top-of-page
          text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_list_top_of_page
        I_LOGO                   =
        I_END_OF_LIST_GRID       =
        I_ALV_FORM               =
    ENDFORM.                    "top-of-page
    *&      Form  display_alv
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = 'ZPP_RE_EMP_DETAILS'
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_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                   = 'ALV_BACKGROUND'
       i_grid_title                      = 'EMP Information'
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
         it_fieldcat                       = t_fcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
         it_events                         = t_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                          = itab2
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " display_alv

Maybe you are looking for

  • My 13 inch macbook pro freezes,when i use the magic mouse.pleae any help to resolve this

    My 13 inch macbook pro freezes,when i use the magic mouse.pleae any help to resolve this.My OS is OS X 10.6.8.

  • Firefox page images do not display only text and links

    New desktop (not this one) with windows 8.1 Pro, Firefox 29, Norton Internet security. When I go to many of the Firefox pages images do not display, only text and links. This is true for the "get add-ons" page. I can search for add-ons, but when I tr

  • How do I keep it an "n-only" network?

    I want to keep a network accessible to n-devices only. I have g-devices at the location, and don't want them slowing down my n-devices. What settings on the Airport Extreme Base Station are required to keep the network as "n-only" network? Thank you.

  • Project System structure for Telecom domain

    Hi all of you, Our client is in to telecom engineering services and have number of sites to develop and support technically. Currently, they are splitting up their projects according to regions and Circles then in to number of sites. The regions and

  • Report with Location attribute in Header URGENT

    Hi I need to insert the attribute dimension which is in the POV to the header of the report. Say XYZ Report for "particular Location" which we will be selecting through the POV. How to achiev it. kindly let me know.