Problem In Block ALV

Dear Friends,
  I am using Block ALV. I need diffrent labels (headings) before each block of alv. Is there any way?
Regards,
Bhavin

*& Report  ZSD_DESPATCH
REPORT  ZSD_DESPATCH NO STANDARD PAGE HEADING.
*& Type Pool Declaration
TYPE-POOLS: SLIS.
*& External Table Declaration
TABLES: VBRK, VBRP.
*& Types Declaration
TYPES: BEGIN OF ST_VBRKVBRP,
             SORTL LIKE KNA1-SORTL, "Customer Sort Name
             SALE(15),
             BISMT LIKE MARA-BISMT, "Size
             VBELN LIKE VBRK-VBELN, "Billing Doc Number
             KUNAG LIKE VBRK-KUNAG, "Customer
             VTWEG LIKE VBRK-VTWEG, "Distribution Channel
             FKART LIKE VBRK-FKART, "Billing Doc Type
             KNUMV LIKE VBRK-KNUMV, "Condition Record Number
             VKORG LIKE VBRK-VKORG, "Sales Organization
             KURRF LIKE VBRK-KURRF, "Billing Exchange Rate
             WAERK LIKE VBRK-WAERK, "SD document currency
             MATNR LIKE VBRP-MATNR, "Material Number
             MATKL LIKE VBRP-MATKL, "Material group
             FKIMG LIKE VBRP-FKIMG, "Actual billed quantity
             POSNR LIKE VBRP-POSNR, "Item Position Number
             PR00  LIKE KONV-KWERT, "PR00 Condition Based Value
             ZDRP  LIKE KONV-KWERT, "ZDRP Condition Based Value
             FUNEL LIKE VBRP-FKIMG, "FUNEL Quantity
             PANEL LIKE VBRP-FKIMG, "PANEL Quantity
             FKDAT LIKE VBRK-FKDAT, "Billing date
       END   OF ST_VBRKVBRP.
TYPES: BEGIN OF ST_FOR_MONTH,
             SORTL LIKE KNA1-SORTL,
             SALE(15),
             BISMT LIKE MARA-BISMT,
             PANEL LIKE VBRP-FKIMG,
             FUNEL LIKE VBRP-FKIMG,
             PR00  LIKE KONV-KWERT,
             ZDRP  LIKE KONV-KWERT,
       END   OF ST_FOR_MONTH.
TYPES: BEGIN OF ST_FOR_DAY,
             SORTL LIKE KNA1-SORTL,
             SALE(15),
             BISMT LIKE MARA-BISMT,
             PANEL LIKE VBRP-FKIMG,
             FUNEL LIKE VBRP-FKIMG,
             PR00  LIKE KONV-KWERT,
             ZDRP  LIKE KONV-KWERT,
       END   OF ST_FOR_DAY.
*& Internal Table Declaration
DATA: IT_VBRKVBRP  TYPE STANDARD TABLE OF ST_VBRKVBRP.
DATA: IT_FOR_MONTH TYPE STANDARD TABLE OF ST_FOR_MONTH.
DATA: IT_FOR_DAY   TYPE STANDARD TABLE OF ST_FOR_DAY.
*& Work Areas Declaration
DATA: WA_VBRKVBRP  LIKE LINE OF IT_VBRKVBRP.
DATA: WA_FOR_MONTH LIKE LINE OF IT_FOR_MONTH.
DATA: WA_FOR_DAY   LIKE LINE OF IT_FOR_DAY.
*& Variables Declaration
DATA : VALU        TYPE D,
       LOWDATE     TYPE D,
       HIGHDATE    TYPE D,
       L_LOWDT     TYPE D,
       L_HIGHDT    TYPE D,
       DAY         TYPE I,
       MONTH       TYPE I,
       LMONTH      TYPE I,
       MODN        TYPE I,
       PARTY_C(9)  TYPE C,
       LCMON(2)    TYPE C,
       YEAR(4)     TYPE C,
       LYEAR(4)    TYPE C,
       MONTH_NM(4) TYPE C,
       PARTY       LIKE VBRK-KUNAG,
       MATR        LIKE VBRP-MATNR,
       MATGRP      LIKE VBRP-MATKL.
DATA: COUNTER TYPE I.
*& ALV Data Declaration
DATA: IT_FIELDCAT_FOR_DAY    TYPE SLIS_T_FIELDCAT_ALV.
DATA: IT_FIELDCAT_FOR_MONTH  TYPE SLIS_T_FIELDCAT_ALV.
DATA: WA_FIELDCAT_FOR_DAY    LIKE LINE OF IT_FIELDCAT_FOR_DAY.
DATA: IT_EVENT_FOR_DAY      TYPE SLIS_T_EVENT WITH HEADER LINE.
DATA: IT_EVENT_FOR_MONTH    TYPE SLIS_T_EVENT WITH HEADER LINE.
DATA: TOP_OF_LIST_FOR_DAY TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST_FOR_DAY'.
DATA: TOP_OF_LIST_FOR_MON TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST_FOR_MONTH'.
DATA: IS_LAYOUT_FOR_DAY   TYPE SLIS_LAYOUT_ALV.
DATA: IS_LAYOUT_FOR_MONTH TYPE SLIS_LAYOUT_ALV.
*& Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT_001.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_003.
SELECT-OPTIONS: S_WERKS FOR VBRP-WERKS OBLIGATORY.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_004.
SELECT-OPTIONS:   S_VKORG FOR VBRK-VKORG OBLIGATORY.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_005.
SELECT-OPTIONS:   S_VTWEG FOR VBRK-VTWEG OBLIGATORY.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(23) TEXT_006.
PARAMETERS : DATE LIKE VBRK-FKDAT OBLIGATORY.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT_002.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_007.
PARAMETERS : G1 RADIOBUTTON GROUP 1.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_008.
PARAMETERS : CH1 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_009.
PARAMETERS : CH2 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_010.
PARAMETERS : CH3 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_011.
PARAMETERS : CH4 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(20) TEXT_012.
PARAMETERS : G2 RADIOBUTTON GROUP 1.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN : END OF BLOCK B2.
*& Initialization Event
INITIALIZATION.
  TEXT_001 = 'Despatch details report'.
  TEXT_002 = 'Data selection criteria'.
  TEXT_003 = 'Plant'.
  TEXT_004 = 'Sales Organization'.
  TEXT_005 = 'Distribution Channel'.
  TEXT_006 = 'Date'.
  TEXT_007 = 'Daily'.
  TEXT_008 = 'Monthly Despatch'.
  TEXT_009 = 'Plan Vs Despatch'.
  TEXT_010 = 'Total Basic Value'.
  TEXT_011 = 'Despatch Report'.
  TEXT_012 = 'Despatch Rep with only basic'.
*& Start of Selection
START-OF-SELECTION.
  PERFORM GET_LYEAR.
  PERFORM GET_DATA.
  PERFORM FILL_FOR_DAY.
  PERFORM FILL_FOR_MONTH.
  PERFORM FIELDCAT_FOR_DAY.
  PERFORM FIELDCAT_FOR_MONTH.
  PERFORM EVENTS_FOR_DAY.
  PERFORM EVENTS_FOR_MONTH.
  PERFORM APPEND_FOR_DAY.
  PERFORM APPEND_FOR_MONTH.
  PERFORM LIST_DISPLAY.
*&      Form  GET_LYEAR
      text
-->  p1        text
<--  p2        text
FORM GET_LYEAR.
  VALU      = DATE.
  DAY       = ( VALU+6(2) ) - 1.
  MONTH     = VALU+4(2).
  YEAR      = VALU+0(4).
  IF MONTH  = 1.
    LMONTH = 12.
    LYEAR  = VALU+0(4) - 1.
  ELSE.
    LMONTH = VALU+4(2) - 1.
    LYEAR  = YEAR.
  ENDIF.
  LCMON     = LMONTH.
  MODN = LYEAR MOD 4.
  IF LMONTH < 10 .
    CONCATENATE LYEAR '0' LCMON '01' INTO L_LOWDT.
    IF LMONTH = 01  OR LMONTH = 03  OR
       LMONTH = 05  OR LMONTH = 07  OR
       LMONTH = 08.
      CONCATENATE LYEAR '0' LCMON '31' INTO L_HIGHDT.
    ELSEIF LMONTH = 2.
      IF  MODN = 0.
        CONCATENATE LYEAR '0' LCMON '29' INTO L_HIGHDT.
      ELSE.
        CONCATENATE LYEAR '0' LCMON '28' INTO L_HIGHDT.
      ENDIF.
    ELSE.
      CONCATENATE LYEAR '0' LCMON '30' INTO L_HIGHDT.
    ENDIF.
  ELSE.
    CONCATENATE LYEAR LCMON '01' INTO L_LOWDT.
    IF LMONTH = 10  OR LMONTH = 12.
      CONCATENATE LYEAR LCMON '31' INTO L_HIGHDT.
    ELSE.
      CONCATENATE LYEAR LCMON '30' INTO L_HIGHDT.
    ENDIF.
  ENDIF.
  LOWDATE  = DATE - ( DAY ).
  HIGHDATE = DATE.
*& At the of this form following date we get
*& L_HIGHDT - Last Month Hight Date
*& L_LOWDT  - Last Month Low Date
*& LOWDATE  - Current Month Low Date
*& HIGHDATE - Current Month High Date
ENDFORM.                    " GET_LYEAR
*&      Form  get_data
      text
-->  p1        text
<--  p2        text
FORM GET_DATA.
  SELECT VBRKVBELN VBRKKUNAG VBRK~VTWEG
         VBRKFKART VBRKKNUMV VBRP~MATNR
         VBRPMATKL VBRPFKIMG VBRK~VKORG
         VBRKWAERK VBRKKURRF VBRP~POSNR
         VBRK~FKDAT
         INTO CORRESPONDING FIELDS OF WA_VBRKVBRP
         FROM VBRK INNER JOIN VBRP ON
         VBRKVBELN = VBRPVBELN
          WHERE VBRP~WERKS IN S_WERKS AND
                VBRP~VKORG_AUFT IN S_VKORG AND
                VBRP~VTWEG_AUFT IN S_VTWEG AND
                VBRK~FKDAT BETWEEN LOWDATE AND DATE  AND
                ( VBRP~MATKL = 'GLASS SHE'     OR
                  VBRP~MATKL = 'GLASS FNL'     OR
                  VBRP~MATKL = 'GLASS PNL')   AND
                VBRK~RFBSK = 'C'.
              ORDER BY VBRKVBELN VBRPMATNR.
*& Select PR00 based value
    SELECT SINGLE KWERT INTO WA_VBRKVBRP-PR00
          FROM KONV
          WHERE KNUMV = WA_VBRKVBRP-KNUMV AND
                KPOSN = WA_VBRKVBRP-POSNR AND
                KSCHL = 'PR00'.
*& Select ZDRP based value
    SELECT SINGLE KWERT INTO WA_VBRKVBRP-ZDRP
          FROM KONV
          WHERE KNUMV = WA_VBRKVBRP-KNUMV AND
                KPOSN = WA_VBRKVBRP-POSNR AND
                KSCHL = 'ZDRP'.
*& Select Sort name of the party
    SELECT SINGLE SORTL INTO WA_VBRKVBRP-SORTL
           FROM KNA1
           WHERE KUNNR = WA_VBRKVBRP-KUNAG.
*& Select size of the product
    SELECT SINGLE BISMT INTO WA_VBRKVBRP-BISMT
           FROM MARA
           WHERE MATNR = WA_VBRKVBRP-MATNR.
*& Multiply with exchange Rate
    WA_VBRKVBRP-PR00 = WA_VBRKVBRP-PR00 * WA_VBRKVBRP-KURRF.
    WA_VBRKVBRP-ZDRP = WA_VBRKVBRP-ZDRP * WA_VBRKVBRP-KURRF.
*& Deciding Return and Fresh Sale
    IF WA_VBRKVBRP-VKORG = '1200' AND
       WA_VBRKVBRP-VTWEG = '40'.
      IF WA_VBRKVBRP-FKART = 'ZVRO' OR
         WA_VBRKVBRP-FKART = 'ZVRW'.
        WA_VBRKVBRP-SALE = 'Return'.
      ELSE.
        WA_VBRKVBRP-SALE = 'Fresh Sale'.
      ENDIF.
    ENDIF.
*& Deciding Export Sale
    IF WA_VBRKVBRP-VKORG = '1202' AND
       WA_VBRKVBRP-VTWEG = '45'.
      WA_VBRKVBRP-SALE = 'Export'.
    ENDIF.
*& Deciding Panel Quantity for the billing
    IF WA_VBRKVBRP-MATKL = 'GLASS SHE' OR
       WA_VBRKVBRP-MATKL = 'GLASS PNL'.
      WA_VBRKVBRP-PANEL = WA_VBRKVBRP-FKIMG.
    ENDIF.
*& Deciding Funel Quantity for the billing
    IF WA_VBRKVBRP-MATKL = 'GLASS FNL'.
      WA_VBRKVBRP-FUNEL = WA_VBRKVBRP-FKIMG.
    ENDIF.
*& Indicating Minus Price and quantity for the Return Sale
    IF WA_VBRKVBRP-FKART = 'ZVRO' OR
       WA_VBRKVBRP-FKART = 'ZVRW'.
      WA_VBRKVBRP-PANEL = WA_VBRKVBRP-PANEL * -1.
      WA_VBRKVBRP-FUNEL = WA_VBRKVBRP-FUNEL * -1.
      WA_VBRKVBRP-PR00  = WA_VBRKVBRP-PR00  * -1.
      WA_VBRKVBRP-ZDRP  = WA_VBRKVBRP-ZDRP  * -1.
    ENDIF.
    APPEND WA_VBRKVBRP TO IT_VBRKVBRP.
    CLEAR: WA_VBRKVBRP.
  ENDSELECT.
  SORT IT_VBRKVBRP BY SORTL SALE BISMT.
ENDFORM.                    " get_data
*&      Form  FILL_FOR_DAY
      text
-->  p1        text
<--  p2        text
FORM FILL_FOR_DAY.
  LOOP AT IT_VBRKVBRP INTO WA_VBRKVBRP WHERE FKDAT = HIGHDATE.
    AT NEW BISMT.
      WA_FOR_DAY-SORTL = WA_VBRKVBRP-SORTL.
      WA_FOR_DAY-SALE  = WA_VBRKVBRP-SALE.
      WA_FOR_DAY-BISMT = WA_VBRKVBRP-BISMT+0(3).
    ENDAT.
    WA_FOR_DAY-PANEL = WA_FOR_DAY-PANEL + WA_VBRKVBRP-PANEL.
    WA_FOR_DAY-FUNEL = WA_FOR_DAY-FUNEL + WA_VBRKVBRP-FUNEL.
    WA_FOR_DAY-PR00  = WA_FOR_DAY-PR00  + WA_VBRKVBRP-PR00.
    WA_FOR_DAY-ZDRP  = WA_FOR_DAY-ZDRP  + WA_VBRKVBRP-ZDRP.
    AT END OF BISMT.
      APPEND WA_FOR_DAY TO IT_FOR_DAY.
      CLEAR: WA_FOR_DAY.
    ENDAT.
    CLEAR: WA_VBRKVBRP.
  ENDLOOP.
ENDFORM.                    " FILL_FOR_DAY
*&      Form  FILL_FOR_MONTH
      text
-->  p1        text
<--  p2        text
FORM FILL_FOR_MONTH.
  LOOP AT IT_VBRKVBRP INTO WA_VBRKVBRP.
    AT NEW BISMT.
      WA_FOR_MONTH-SORTL = WA_VBRKVBRP-SORTL.
      WA_FOR_MONTH-SALE  = WA_VBRKVBRP-SALE.
      WA_FOR_MONTH-BISMT = WA_VBRKVBRP-BISMT.
    ENDAT.
    WA_FOR_MONTH-PANEL = WA_FOR_MONTH-PANEL + WA_VBRKVBRP-PANEL.
    WA_FOR_MONTH-FUNEL = WA_FOR_MONTH-FUNEL + WA_VBRKVBRP-FUNEL.
    WA_FOR_MONTH-PR00  = WA_FOR_MONTH-PR00  + WA_VBRKVBRP-PR00.
    WA_FOR_MONTH-ZDRP  = WA_FOR_MONTH-ZDRP  + WA_VBRKVBRP-ZDRP.
    AT END OF BISMT.
      APPEND WA_FOR_MONTH TO IT_FOR_MONTH.
      CLEAR: WA_FOR_MONTH.
    ENDAT.
    CLEAR: WA_VBRKVBRP.
  ENDLOOP.
ENDFORM.                    " FILL_FOR_MONTH
*&      Form  FIELDCAT_FOR_DAY
      text
-->  p1        text
<--  p2        text
FORM FIELDCAT_FOR_DAY .
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'SORTL'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_DAY'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Party Name'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 10.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_DAY.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'SALE'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_DAY'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Sale 4 day'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 10.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_DAY.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'BISMT'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_DAY'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Sizes'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 5.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_DAY.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'PANEL'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_DAY'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Panel'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 10.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_DAY.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'FUNEL'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_DAY'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Funel'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 10.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_DAY.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'PR00'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_DAY'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Basic Value (Rs.)'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 15.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_DAY.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'ZDRP'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_DAY'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Disc Value (Lacs.)'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 15.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_DAY.
  CLEAR WA_FIELDCAT_FOR_DAY.
ENDFORM.                    " FIELDCAT_FOR_DAY
*&      Form  FIELDCAT_FOR_MONTH
      text
-->  p1        text
<--  p2        text
FORM FIELDCAT_FOR_MONTH .
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'SORTL'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_MONTH'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Party Name'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 10.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_MONTH.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'SALE'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_MONTH'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Sale'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 10.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_MONTH.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'BISMT'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_MONTH'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Sizes'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 5.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_MONTH.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'PANEL'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_MONTH'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Panel'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 10.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_MONTH.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'FUNEL'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_MONTH'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Funel'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 10.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_MONTH.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'PR00'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_MONTH'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Basic Value (Rs.)'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 15.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_MONTH.
  CLEAR WA_FIELDCAT_FOR_DAY.
  COUNTER = COUNTER + 1.
  WA_FIELDCAT_FOR_DAY-COL_POS    = COUNTER.
  WA_FIELDCAT_FOR_DAY-FIELDNAME  = 'ZDRP'.
  WA_FIELDCAT_FOR_DAY-TABNAME    = 'IT_FOR_MONTH'.
  WA_FIELDCAT_FOR_DAY-SELTEXT_L  = 'Disc Value (Lacs.)'.
  WA_FIELDCAT_FOR_DAY-OUTPUTLEN  = 15.
  APPEND WA_FIELDCAT_FOR_DAY TO IT_FIELDCAT_FOR_MONTH.
  CLEAR WA_FIELDCAT_FOR_DAY.
ENDFORM.                    " FIELDCAT_FOR_MONTH
*&      Form  EVENTS_FOR_DAY
      text
-->  p1        text
<--  p2        text
FORM EVENTS_FOR_DAY .
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      I_LIST_TYPE     = 0
    IMPORTING
      ET_EVENTS       = IT_EVENT_FOR_DAY[]
    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.
  READ TABLE IT_EVENT_FOR_DAY
             WITH KEY NAME = SLIS_EV_TOP_OF_LIST
             INTO IT_EVENT_FOR_DAY.
  IF SY-SUBRC = 0.
    MOVE TOP_OF_LIST_FOR_DAY TO IT_EVENT_FOR_DAY-FORM.
    APPEND IT_EVENT_FOR_DAY.
  ENDIF.
ENDFORM.                    " EVENTS_FOR_DAY
*&      Form  EVENTS_FOR_MONTH
      text
-->  p1        text
<--  p2        text
FORM EVENTS_FOR_MONTH .
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      I_LIST_TYPE     = 0
    IMPORTING
      ET_EVENTS       = IT_EVENT_FOR_MONTH[]
    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.
  READ TABLE IT_EVENT_FOR_MONTH
             WITH KEY NAME = SLIS_EV_TOP_OF_LIST
             INTO IT_EVENT_FOR_MONTH.
  IF SY-SUBRC = 0.
    MOVE TOP_OF_LIST_FOR_MON TO IT_EVENT_FOR_MONTH-FORM.
    APPEND IT_EVENT_FOR_MONTH.
  ENDIF.
  CLEAR: IT_EVENT_FOR_MONTH.
ENDFORM.                    " EVENTS_FOR_MONTH
*&      Form  TOP_OF_LIST_FOR_DAY
      text
-->  p1        text
<--  p2        text
FORM TOP_OF_LIST_FOR_DAY.
  WRITE: / 'FOR DAY'.
ENDFORM.                    " EVENTS_FOR_MONTH
*&      Form  TOP_OF_LIST_FOR_MONTH
      text
-->  p1        text
<--  p2        text
FORM TOP_OF_LIST_FOR_MONTH.
  WRITE: / 'FOR MONTH'.
ENDFORM.                    " EVENTS_FOR_MONTH
*&      Form  APPEND_FOR_DAY
      text
-->  p1        text
<--  p2        text
FORM APPEND_FOR_DAY .
  IF NOT IT_FOR_DAY IS INITIAL.
    WA_FOR_DAY-SORTL = ''.
    APPEND WA_FOR_DAY TO IT_FOR_DAY.
    CLEAR: WA_FOR_DAY.
  ENDIF.
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
      IT_FIELDCAT = IT_FIELDCAT_FOR_DAY
      IS_LAYOUT   = IS_LAYOUT_FOR_DAY
      I_TABNAME   = 'IT_FOR_DAY'
      IT_EVENTS   = IT_EVENT_FOR_DAY[]
    TABLES
      T_OUTTAB    = IT_FOR_DAY[].
  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.                    " APPEND_FOR_DAY
*&      Form  APPEND_FOR_MONTH
      text
-->  p1        text
<--  p2        text
FORM APPEND_FOR_MONTH .
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
      IT_FIELDCAT = IT_FIELDCAT_FOR_MONTH
      IS_LAYOUT   = IS_LAYOUT_FOR_MONTH
      I_TABNAME   = 'IT_FOR_MONTH'
      IT_EVENTS   = IT_EVENT_FOR_MONTH[]
    TABLES
      T_OUTTAB    = IT_FOR_MONTH[].
  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.                    " APPEND_FOR_MONTH
*&      Form  LIST_DISPLAY
      text
-->  p1        text
<--  p2        text
FORM LIST_DISPLAY .
  DATA: GT_PRINT TYPE SLIS_PRINT_ALV.
  GT_PRINT-RESERVE_LINES = 2.
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
      IS_PRINT = GT_PRINT.
  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.                    " LIST_DISPLAY

Similar Messages

  • Problem in Blocked ALv's

    Hi,
    I have a requirement where i am supposed to display the employee details( Personal details, Education details and corporate details) in different blocks. I am using Blocked ALV for displaying the same, and displaying .
    But the problem is that i have to display the information in page by page - that is for every employee i have to display 3 blocks, and so on for all the employees given in the selection criteria. I am not able to do so.
    For a single employee i am using the following -
    1. 'REUSE_ALV_BLOCK_LIST_INIT'
    2. 'REUSE_ALV_BLOCK_LIST_APPEND' - 3 times for three blocks
    3. 'REUSE_ALV_BLOCK_LIST_DISPLAY' - for displaying the info.
    Regrds,
    Srini

    Hi this can help u,
    BLOCKED ALV REPORT.
    REPORT  ZCS_PRG21.
    TABLES: LFA1,EKKO.
    DATA:  BEGIN OF ITAB OCCURS 0,
           LIFNR LIKE LFA1-LIFNR,
           NAME1 LIKE LFA1-NAME1,
           ORT01 LIKE LFA1-ORT01,
           LAND1 LIKE LFA1-LAND1,
           REGIO LIKE LFA1-REGIO,
           END OF ITAB.
    DATA:  BEGIN OF JTAB OCCURS 0,
           LIFNR LIKE EKKO-LIFNR,
           EBELN LIKE EKKO-EBELN,
           BUKRS LIKE EKKO-BUKRS,
           BSTYP LIKE EKKO-BSTYP,
           EKORG LIKE EKKO-EKORG,
           BSART LIKE EKKO-BSART,
           END OF JTAB.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 5 ROWS.
    SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE JTAB UP TO 5 ROWS.
    TYPE-POOLS: SLIS.
    DATA:  LAYOUT TYPE SLIS_LAYOUT_ALV,
           HEADER TYPE SLIS_T_LISTHEADER WITH HEADER LINE,
           FLDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
           FLDCAT2 TYPE SLIS_T_FIELDCAT_ALV,
           EVE1 TYPE SLIS_T_EVENT WITH HEADER LINE,
           EVE2 TYPE SLIS_T_EVENT WITH HEADER LINE.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT-WINDOW_TITLEBAR = 'BLOCKED ALV'.
    EVE2-NAME = 'TOP_OF_PAGE'.
    EVE2-FORM = 'TOP_OF_PAGE1'.
    APPEND EVE2.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = EVE1[]
    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.
    READ TABLE EVE1 WITH KEY NAME = 'TOP_OF_PAGE'.
    EVE1-FORM = 'TOP_OF_PAGE'.
    MODIFY EVE1 TRANSPORTING FORM WHERE NAME = 'TOP_OF_PAGE'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        I_CALLBACK_PROGRAM             = SY-REPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      IT_EXCLUDING                   =
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_INTERNAL_TABNAME           = 'ITAB' “it must be in capital letters, otherwise gives “no-fieldcatalog” is found
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
       I_INCLNAME                   = SY-REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = FLDCAT1
    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_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = LAYOUT
        IT_FIELDCAT                      = FLDCAT1
        I_TABNAME                        = 'ITAB'
        IT_EVENTS                        = EVE1[]
      IT_SORT                          =
      I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = ITAB
    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_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_INTERNAL_TABNAME           = 'JTAB'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
       I_INCLNAME                   = SY-REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = FLDCAT2
    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_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = LAYOUT
        IT_FIELDCAT                      = FLDCAT2
        I_TABNAME                        = 'JTAB'
        IT_EVENTS                        = EVE2[]
      IT_SORT                          =
      I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = JTAB
    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'
    EXPORTING
      I_INTERFACE_CHECK             = ' '
      IS_PRINT                      =
      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        =
    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.
    REFRESH HEADER.
    HEADER-TYP = 'H'.
    HEADER-INFO = 'VENDOR DETAILS'.
    APPEND HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = HEADER[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.
    FORM TOP_OF_PAGE1.
    REFRESH HEADER.
    HEADER-TYP = 'H'.
    HEADER-INFO = 'PURCHASE DOCUMENTS DETAILS'.
    APPEND HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = HEADER[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.
    if u want more then try by adding the function modules
    'REUSE_ALV_BLOCK_LIST_APPEND' and 'REUSE_ALV_FIELDCATALOG_MERGE'
    reward points,if it is useful.
    thank you,
    chandu.

  • Printing problem in Blocked ALV

    Hello,
    I  am displaying a report using ALV blocked list where I have to do transpose of the output table using dynamic internal table.
    Now I need to take the printout of report , but can not do it through spool beause I need to print material no on the top of the each block and the relavent data in the transposed from. So I am downloading it in word and printing. But now i need to print each new material and its block on new page. New-page is not workijg, neiither i can use sort.
    Please suggest some good solution for this.
    Thanks in advance

    Hello,
    I  am displaying a report using ALV blocked list where I have to do transpose of the output table using dynamic internal table.
    Now I need to take the printout of report , but can not do it through spool beause I need to print material no on the top of the each block and the relavent data in the transposed from. So I am downloading it in word and printing. But now i need to print each new material and its block on new page. New-page is not workijg, neiither i can use sort.
    Please suggest some good solution for this.
    Thanks in advance

  • Subtotal in Blocked ALV

    Hi All,
    I am facing the problem in displaying the subtotal in Blocked ALV.
    My requirement is, I need to display the subtotals in 3 lines like below.
    for ex:
    subtotal:          7 <above total>
                          (5)<coming from someother field>
                           2
    from the above: 7 is total of that column.
                              5 is coming from some other field.
                              2 is substraction of above 2.
    Could anyone please help me in the above.
    Many thanks in advance.
    Regards,
    venkat.

    Hi Vaibhav,
    Thanks for your response.
    and one thing here in my above example is,  the value  5 is neither total nor subtotal. its just a different value coming from some other field.
    only the 7 is total of that column.
    and if I write that logic manually, It may not able display as the position of that column is around 500. because write statment may display upto 252nd position in the output, I guess.
    thank you very much.
    Regards,
    Venkat.
    Edited by: venkat reddy on Jan 18, 2010 8:45 PM

  • END OF PAGE IN BLOCK  ALV : PLZ HELP

    Hi experts.
    I have a requirement to display top-of-page end-of-page end-of-list in block alv but the problem is that end-of-page is not getting triggered instead top-of-page is getting triggered twice.
    Below is the code for your reference :
    REPORT  zbhr_workers_comp_report
    LINE-COUNT 60(4)
    LINE-SIZE 999
    NO STANDARD PAGE HEADING
    MESSAGE-ID zmhr.
    *//// This is how event table is getting populated:*
    FORM events_get1  CHANGING t1_events TYPE slis_t_event.
      DATA:ls1_events TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        IMPORTING
          et_events = t1_events.
      READ TABLE t1_events INTO ls1_events WITH KEY name = slis_ev_top_of_page.
      IF sy-subrc = 0.
        MOVE c_form_top_of_page TO ls1_events-form.
       APPEND ls1_events TO t1_events.
        modify t1_events FROM ls1_events INDEX sy-tabix TRANSPORTING form.
        CLEAR ls1_events.
      ENDIF.
    READ TABLE t1_events INTO ls1_events WITH KEY name = slis_ev_end_of_page.
      IF sy-subrc = 0.
        MOVE c_form_end_of_page TO ls1_events-form.
       APPEND ls1_events TO t1_events.
        modify t1_events FROM ls1_events INDEX sy-tabix TRANSPORTING form.
        CLEAR ls1_events.
      ENDIF.
      READ TABLE t1_events INTO ls1_events WITH KEY name = slis_ev_end_of_list.
      IF sy-subrc = 0.
        MOVE c_form_end_of_list TO ls1_events-form.
       APPEND ls1_events TO t1_events.
        modify t1_events FROM ls1_events INDEX sy-tabix TRANSPORTING form.
        CLEAR ls1_events.
      ENDIF.
    ENDFORM.                    " EVENTS_GET1
    FORM    :  TOP_OF_PAGE
    FORM top_of_page.
      WRITE : /45 text-020, 65(5) text-021 , 71(11) v_begda, 84(3) text-022 , 89(11) v_endda.
    ENDFORM. "TOP_OF_PAGE
    FORM    :  end_of_page
    FORM end_of_page.
    DATA: lv_process TYPE i.
      CLEAR: lv_process.
       LOOP AT t_final_temp INTO w_final_temp where customer = t_final-customer.
         lv_process = lv_process + 1.
      ENDLOOP.
    *RESERVE 3 LINES.
      WRITE: /4 'Number of read Record : '(023), v_total_read.
      WRITE: /4 'Number of processed Record : '(024), lv_process.
    ENDFORM. "end_of_page
    FORM    :  end_of_list
    FORM end_of_list .
    v_total_process =  LINES( t_final[] ).
    WRITE: /4 'Total sum of all processed data: '(029), v_total_process.
    ENDFORM. "end_of_list
    *****Displaying the block alv.
    FORM display_output .
    To restrict the display of sel info and list info.
      st_print-no_print_selinfos = 'X'.
      st_print-no_print_listinfos = 'X'.
    st_print-reserve_lines = 2. " Lines reserved for end of page
    Initialize ALV Block List
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          i_callback_program = sy-repid.
    Append the ALV Block list with table t_final.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                  = w1_layout
          it_fieldcat                = t1_fieldcat
          i_tabname                  = 'T_FINAL'
          it_events                  = t1_events
          it_sort                    = t_sort
        TABLES
          t_outtab                   = t_final
        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.
    Append the ALV Block list with table t_msg_display.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                  = w2_layout
          it_fieldcat                = t2_fieldcat
          i_tabname                  = 'T_MSG_DISPLAY'
          it_events                  = t2_events
        TABLES
          t_outtab                   = t_msg_display
        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'
        EXPORTING
          i_interface_check = ' '
          is_print          = st_print
        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_OUTPUT
    Above is the core logic which I have used for displaying top-of-page end-of-page and end-of-list in block alv.
    Please Help
    Regards
    Arvind.

    Hi
    MOVE 'TOP_OF_PAGE' TO ls1_events-form.
    what is thie c_form_top_of_page instead write as above ,i hope it will work
    Regards
    Pavan

  • Blocked alv list display

    hi,
    in blocked alv list , i want add push button on application tool bar. any one please tell me what is the process.?
    last time i added one push button on alv grid display, same process i followed now, but i did not get push button on application tool bar of , blocked alv list.

    I am able to add it , what is the problem you are facing.
    Check the Program BALVBT01.
    call function 'REUSE_ALV_BLOCK_LIST_INIT'
           exporting
                i_callback_program       = repid
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'STATUS'. "<------Status
    form pf_status_set using extab type slis_t_extab.
      BREAK-POINT.
      set pf-status 'STANDARD' excluding extab.
    endform.
    Copy the status From standard program SAPLKKBL, and Status is STANDARD using SE41 transaction.

  • How to make an interactive block ALV

    Hi,
       I am new to the field of ABAP and have recently started working on ALV's. My problem is that i do not know how to make an interactive block ALV. I have implemented this functionality with the simple ALV but I am not getting the same for block ALV. Anyone who has worked on the same or has any idea please help me.
    Regards.
    Alok Bhardwaj

    Hi jester526,
    You'll need Acrobat to create links in a PDF file. Please see https://acrobatusers.com/tutorials/creating-and-editing-links for instructions.
    Best,
    Sara

  • Difference between blocked ALV and Hierarchical ALV

    Hi All,
    Can some body tell me what's the difference between hierarchical and blocked ALV Report Please telle me some body what's the type of ALV it's displaying for the standard Report V/LD this is pricing report I want to develop custom report exactly looks as V/LD but the problem is I am not able to identify what's the ALV format it's displaying either Hierarchical or blocked?
    Thanks&Regards
    Mahesh

    Hi Mahesh,
    Blocked ALV displays the data in blocks together in output. e.g. suppose you want to dsplay the data of header & item level. Then you candisplay the data of header records in first block & Item level data in another block on same output screen.
    For hierarchical ALV  check the below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6e/4e2941fa918739e10000000a1550b0/frameset.htm
    & check this link also:
    /people/sap.user72/blog/2005/09/14/a-new-approach-to-alv-programming
    Reward points if helpful answer.
    Ashvender

  • Block alv .

    Hello masters,
    I m using block alv to display 5 tables one below other ,
    i have used the fm REUSE_ALV_BLOCK_LIST_INIT , REUSE_ALV_BLOCK_LIST_APPEND , REUSE_ALV_BLOCK_LIST_DISPLAY
    my problem is only the last table is displayed .

    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program             = 'ZD_ALV_BLOCK_DISPLAY'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = LAYOUT1
        IT_FIELDCAT                      = FCAT
        I_TABNAME                        = 'I_EKKO'
        IT_EVENTS                        = GT_EVENT1
        I_TEXT                           = 'HEADER BLOCK'
      TABLES
        T_OUTTAB                         = I_EKKO.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = LAYOUT2
        IT_FIELDCAT                      = FCAT1
        I_TABNAME                        = 'I_EKPO'
        IT_EVENTS                        = GT_EVENT1
        I_TEXT                           = 'ITEMS BLOCK'
      TABLES
        T_OUTTAB                         = I_EKPO.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    have you used REUSE_ALV_BLOCK_LIST_INIT at first...
    Regards
    Ganesh Reddy

  • What is blocked alv

    can any one explain me what is a blocked alv
    Message was edited by:
            ameen shaik

    hi
    This report is used if you have to display more than one report on the output. Technically speaking if you have multiple internal table with data to be displayed as separate blocks then we go for block report of ALV
    This looks like a simple report but this report has the features of sorting
    and filtering only. 
    The important functions used for creating this report are:
         A. REUSE_ALV_BLOCK_LIST_INIT
         B. REUSE_ALV_BLOCK_LIST_APPEND
         C. REUSE_ALV_BLOCK_LIST_DISPLAY
    check with this report
    Declarations for BLOCK ALV DISPLAY
    *--type pools
    TYPE-POOLS:slis.
    DATA:x_layout TYPE slis_layout_alv,
    t_field TYPE slis_t_fieldcat_alv,
    *--field catalog
    x_fldcat LIKE LINE OF t_field,
    *--to hold all the events
    t_events TYPE slis_t_event,
    x_events TYPE slis_alv_event,
    t_sort TYPE slis_t_sortinfo_alv,
    x_sort LIKE LINE OF t_sort ,
    *--Print Layout
    x_print_layout TYPE slis_print_alv.
    *----Macro to add field catalog.
    *field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN
    DEFINE add_catalog.
    clear x_fldcat.
    x_fldcat-fieldname = &1.
    x_fldcat-seltext_m = &2.
    x_fldcat-outputlen = &3.
    x_fldcat-tech = &4.
    x_fldcat-col_pos = &5.
    x_fldcat-no_zero = 'X'.
    x_fldcat-ddictxt = 'M'.
    x_fldcat-datatype = &6.
    x_fldcat-ddic_outputlen = &7.
    if &6 = 'N'.
    x_fldcat-lzero = 'X'.
    endif.
    *--build field catalog
    append x_fldcat to t_field.
    END-OF-DEFINITION.
    *----- data declerations.
    data: v_repid like sy-repid.
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    ernam like mara-ernam,
    meins like mara-meins,
    end of itab.
    data: begin of jtab occurs 0,
    matnr like makt-matnr,
    maktx like makt-maktx,
    end of jtab.
    select matnr ernam meins
    up to 20 rows
    from mara
    into table itab.
    select matnr maktx
    up to 20 rows
    from makt
    into table jtab.
    v_repid = sy-repid.
    *DISPLAY alv
    Initialize Block
    call function 'REUSE_ALV_BLOCK_LIST_INIT'
    exporting
    i_callback_program = v_repid.
    *Block 1:
    *INITIALIZE
    refresh t_field. clear t_field.
    refresh t_events.
    *field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN
    add_catalog:
    'MATNR' 'Material' '18' '' '1' 'C' '18',
    'ERNAM' 'Created By' '12' '' '2' 'C' '12',
    'MEINS' 'Unit' '5' '' '3' 'C' '3'.
    *--build table for events.
    x_events-form = 'TOP_OF_LIST1'.
    x_events-name = slis_ev_top_of_list.
    append x_events to t_events.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
    exporting
    is_layout = x_layout
    it_fieldcat = t_field
    i_tabname = 'ITAB'
    it_events = t_events
    it_sort = t_sort
    tables
    t_outtab = itab
    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.
    *--BLOCK 2(SUMMARY REPORT)
    *INITIALIZE
    refresh t_field. clear t_field.
    refresh t_events.
    *field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN
    add_catalog:
    'MATNR' 'Material' '20' '' '1' 'C' '18',
    'MAKTX' 'Description' '40' '' '2' 'C' '40'.
    *--build table for events.
    x_events-form = 'TOP_OF_LIST2'.
    x_events-name = slis_ev_top_of_list.
    append x_events to t_events.
    Append table block.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
    exporting
    is_layout = x_layout
    it_fieldcat = t_field
    i_tabname = 'JTAB'
    it_events = t_events
    tables
    t_outtab = jtab
    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 FM TO DISPLAY THE BLOCK REPORT.
    call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    exporting
    is_print = x_print_layout
    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_list1.
    skip 1.
    write: 10 'List 1',
    /5 '----
    skip 1.
    format reset.
    endform.
    form top_of_list2.
    skip 1.
    write: 10 'List 2',
    /5 '----
    skip 1.
    format reset.
    endform.
    and this link
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-ProgramforALVBlocklist&
    Hope this helps to solve ur problem....
    do reward if useful....
    regards
    dinesh

  • To find total in blocked alv

    hi experts,
    i have created blocked ALV program.
    in the o/p , it displays list of recors for open items,then list of records for cleared items.
    now i want it  to display sum of both open and cleared items of particular column.
    in grid display it is displaying total for open and cleared items.
    but in blocked alv it is not displaying total for open and closed items separately.
    and also i need grand total of both.
    if any body knows please tell me..

    Hi Sridevi
    Refer this code as an example.
    This code calculates the occupied column from sflight table.
    TYPE-POOLS: slis.
    DATA:it_fieldcat  TYPE  slis_t_fieldcat_alv,
         is_layout TYPE slis_layout_alv,
         it_events TYPE  slis_t_event ,
        it_sort TYPE  slis_t_sortinfo_alv .
    DATA: wa_fcat LIKE LINE OF it_fieldcat,
          wa_sort LIKE LINE OF it_sort.
    DATA: i_flight TYPE sflight_tab1.
    SELECT * FROM sflight
    INTO TABLE i_flight
    UP TO 10 ROWS.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = sy-repid
        i_structure_name       = 'SFLIGHT'
      CHANGING
        ct_fieldcat            = it_fieldcat
      EXCEPTIONS
        inconsistent_interface = 1
        program_error          = 2.
    wa_fcat-do_sum = 'X'.
    MODIFY it_fieldcat FROM wa_fcat
         TRANSPORTING do_sum WHERE fieldname = 'SEATSOCC'.
    wa_sort-up = 'X'.
    wa_sort-fieldname = 'CARRID'.
    wa_sort-subtot = 'X'.
    APPEND wa_sort TO it_sort.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program = sy-repid.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = is_layout
        it_fieldcat                      = it_fieldcat
        i_tabname                        = 'I_FLIGHT'
        it_events                        = it_events
        it_sort                          = it_sort
    *   I_TEXT                           = ' '
      TABLES
        t_outtab                         = i_flight
    EXCEPTIONS
       program_error                    = 1
       maximum_of_appends_reached       = 2
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = is_layout
        it_fieldcat                      = it_fieldcat
        i_tabname                        = 'I_FLGIHT'
        it_events                        = it_events
       it_sort                          = it_sort
    *   I_TEXT                           = ' '
      TABLES
        t_outtab                         = i_flight
    EXCEPTIONS
       program_error                    = 1
       maximum_of_appends_reached       = 2
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    Thanks and Regards

  • Sorting in Blocked ALV Report

    Hi Experts,
    Can i achieve sorting in Blocked ALV report as we can do in ALV Grid Display.???
    If so, how can this be achieved????
    For example, if there are 3 records with the same value for a field.....say thfreee rows with name 'Gaurav'.
    I want to show 'Gaurav' only in the first row and the other two rows must be empty.
    Gaurav 1 2 3
    Gaurav 4 5 6
    Gaurav 7 8 9
    Should be seen as
    Gaurav 1 2 3
               4 5 6
               7 8 9
    Thanks and regards
    Gaurav raghav

    Here is the code.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-repid
          i_structure_name       = 'ZCRM_ACTIVITY_REPORT'
        CHANGING
          ct_fieldcat            = gt_fieldcatalog[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc EQ 0.
          CLEAR gs_sort.
          gs_sort-fieldname = 'ORG'.
          gs_sort-tabname = 'GT_ITAB'.
          gs_sort-spos = '1'.
          gs_sort-up = 'X'.
          APPEND gs_sort TO gt_sort.
        CLEAR gs_sort.
        gs_sort-fieldname = 'EMPLOYEE'.
        gs_sort-tabname = 'GT_ITAB'.
        gs_sort-spos = '2'.
        gs_sort-up = 'X'.
        APPEND gs_sort TO gt_sort.
      ENDIF.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
          EXPORTING
            is_layout                  = gt_layout
            it_fieldcat                = gt_fieldcatalog
            i_tabname                  = 'GT_ITAB'
            it_events                  = gt_events
            it_sort                    = gt_sort
            i_text                     = 'Report 1 '
          TABLES
            t_outtab                   = gt_itab
          EXCEPTIONS
            program_error              = 1
            maximum_of_appends_reached = 2
            OTHERS                     = 3.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.

  • Interactive in blocked ALV

    Hi to all,
    Iam displaying out put in BLOCKEd ALV using 2 internal tables.
    Each table has 10 fields.
    When I double click on particular column entry, it should call Transaction iw33.
    Other 9 columns should not call transacton if i select entry from the column.
    But iam able to call transaction for all the other column entries.
    Iam tried using this with slis_selfield structure.
    In the run time this structure is not capturing the fieldname.
    How can i capture field name.
    kindly send yr valuable replys.

    Hi naveen,
    1. I also tried the same thing, but its not returning the column name
       on which we click.
    2. One workaround can be
    a) we get the VALUE in slis_selfield structure.
    b) loop at the internal table where COLUMN1 = VALUE
    c) if found, then we can somehow deduce that column1 has been clicked.
    (It can happen that other columns can contain the same value,
    then it can be confusing)
    regards,
    amit m.

  • Page Number - Total Page number in Blocked ALV

    Hi Gurus,
      I need to print the page numbers like 1 of 5 in the ALV footer. Am able to print the current page number but am unable to print the total page number in the footer of the Blocked ALV. Can any one guide me how to display the total number of pages.
    Points will be awarded
    Thanks
    Ravi

    Hi,
    Please refer to the link below :
    http://www.sapdev.co.uk/reporting/alv/alvgrid_events.htm
    Thanks,
    Sri.

  • Seperate ALV  Properties in Blocked ALV

    Hi All,
    I have created a blocked ALV. The standard ALV functionalities like Sort ,Filter etc is working only for the first list.
    Is there any techniques to give seperate functionalities for each list?
    Iam using reuse_alv_grid_display .
    and  LAYOUT-LIST_APPEND to show the blocked ALV.
    thanks and regards,
    Subeesh Kannottil

    Hi Yawa Ding,
    I have 3 lists .The standard ALV unctionality works only for the first list.
    I want all these properties to be applied to all lists
    Thanks and Regards,
    Subeesh Kannottil

Maybe you are looking for

  • How can i watch all movies in english with a spanish account?

    I want to see the films in english in my spanish account because i live in spain. but i can only see little movies in english. i what to know if there is any option so that i can see all movies in english.

  • Strange make error when script is started in PKGBUILD

    Hi I have an extremely strange error related to make when I tried to package the -git version of Open Watcom (v2 fork) https://aur.archlinux.org/packages/open_watcom-v2-git/ When running makepkg -s, the build chokes on the following step: building ws

  • My Edits are there, but 'Revert to Original' has gone

    Sorry, yet another iPhoto problem I've noticed that though all my recent iPhoto edits are still there, the 'Revert to Original' has gone, for all of them. And the sliders - which should be in their post-edit positions - are all at zero or default. I

  • Unable to connect using SMB in finder to iPhone

    i am running 10.6.2, i can connect in finder using afp://xxx.xxx.x.x to my iphone logging in using root and password however, when i try smb://xxx.xxx.x.x, i get this error connection failed: there was an error connectiong to the server "xxx.xxx.x.x"

  • To get Current BP number

    HI All, I need find last bp Number that is created.Is there any function module or table available to get this.