Adding part of table as header to every page in RTF template

Hi,
We have requirement where we need a part of table to be repeated as header of all the pages please let me know if any one has worked on similar issue
Thanks

Sent you the email with attachment and also the table which to be repeated for the pages are order number request date block please test it for 814111.xml in the attachment
Thanks for your help

Similar Messages

  • I need page no's and top of page header to every page

    Hi Experts,
    i need page no's and top of page header to every page
    to this report.
    i took print outs it came only page number 1 to all the pages, after took prints it seems header to all the pages
    but not displaying in output screen.
    TYPE-POOLS: SLIS.
    TABLES: MKPF,LFA1,MSEG,EKET,T001L,MAKT,S031,S032,MARA,LIPS,LIKP,T001W.
    DATA  FLAG TYPE I.
    DATA : MENGE_RE LIKE MSEG-MENGE,
           MENGE_IS LIKE MSEG-MENGE,
           MENGE_O LIKE MSEG-MENGE,
           MENGE_BAL LIKE MSEG-MENGE.
    DATA  MAGBB LIKE S031-MAGBB.
    DATA  MZUBB LIKE S031-MZUBB.
    DATA  V_MONTH LIKE S031-SPMON.
    DATA  XBLNR LIKE MKPF-XBLNR.
    DATA : BEGIN OF ITAB1 OCCURS 100,
           MATNR LIKE MAKT-MATNR,
           END OF ITAB1.
    DATA : BEGIN OF ITAB2 OCCURS 100,
    MATNR LIKE MAKT-MATNR,
    WERKS LIKE MARD-WERKS,
    LGORT LIKE MARD-LGORT,
    BUSTW LIKE MSEG-BUSTW,
    BWART LIKE MSEG-BWART,
    SHKZG LIKE MSEG-SHKZG,
    MENGE LIKE MSEG-MENGE,
    END OF ITAB2.
    DATA: PAGNO(5) TYPE C.
    DATA : PAGENO LIKE SY-PAGNO.
    DATA: STR1 TYPE DATS,
          STR2(14) TYPE C,
          STR3(10) TYPE C.
    DATA : V_MONUM LIKE T015M-MONUM,
           V_MONAM LIKE T015M-MONAM.
    TYPES:  FARBE TYPE SLIS_T_SPECIALCOL_ALV.
    DATA  V_STOCK LIKE MSEG-MENGE.
    DATA  V_STOCK1 LIKE MSEG-MENGE.
    DATA: V_MONTH1 LIKE S031-SPMON.
    DATA: OSTOCK LIKE MSEG-MENGE.
    CONSTANTS:
    GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          GT_LAYOUT   TYPE SLIS_LAYOUT_ALV,
          GS_KEYINFO  TYPE SLIS_KEYINFO_ALV,
          GT_SORT     TYPE SLIS_T_SORTINFO_ALV,
          GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          GT_EVENTS   TYPE SLIS_T_EVENT,
         G_PRINT     TYPE SLIS_PRINT_ALV.
    DATA:  LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV OCCURS 0 WITH HEADER LINE.
    DATA: FC_HIER      TYPE SLIS_FIELDCAT_ALV OCCURS 0 WITH HEADER LINE.
    DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    DATA: GT_REPID       LIKE SY-REPID.
    DATA: GT_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    DATA: GT_TOP_OF_LIST TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST'.
    DATA: FLD(15).
    DATA: TXT(50).
    I N I T I A L I Z A T I O N
    GT_REPID = SY-REPID.
    PAGNO = SY-PAGNO.
    PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
    A T  S E L E C T I O N  S C R E E N
    *AT SELECTION-SCREEN ON BUDAT.
    PERFORM VALIDATION.
    S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
      PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].
      PERFORM FETCH_DATA.
    E N D O F S E L E C T I O N
    END-OF-SELECTION.
      IF NOT ITAB2[] IS INITIAL.
        PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
           I_CALLBACK_PROGRAM = GT_REPID
           IT_FIELDCAT        = GT_FIELDCAT[]
           IT_EVENTS          = GT_EVENTS[]
           IT_SORT            = GT_SORT[]
           IS_LAYOUT          = GT_LAYOUT
         TABLES
           T_OUTTAB           = ITAB2.
      ELSE.
        MESSAGE S006(Z1).
      ENDIF.
      CLEAR : GT_LAYOUT.
    Report Selections
      DATA: BEGIN OF IT_HEADER OCCURS 10,
      WERKS LIKE MSEG-WERKS,
      NAME1 LIKE T001W-NAME1,
      MAKTX LIKE MAKT-MAKTX,
      MATNR LIKE MSEG-MATNR,
      MENGE_O LIKE MSEG-MENGE,
      END OF IT_HEADER.
      DATA: BEGIN OF ITAB OCCURS 50,
            WERKS LIKE MSEG-WERKS,
            MATNR LIKE MSEG-MATNR,
            BWART LIKE MSEG-BWART,
            LGORT LIKE MSEG-LGORT,
            EBELN LIKE MSEG-EBELN,
            XBLNR LIKE MKPF-XBLNR,
            BUDAT LIKE MKPF-BUDAT,
            MBLNR LIKE MSEG-MBLNR,
            MENGE LIKE MSEG-MENGE,
            MAKTX LIKE MAKT-MAKTX,
            XAUTO LIKE MSEG-XAUTO,
            NAME1 LIKE T001W-NAME1,
            MENGE_O LIKE MSEG-MENGE,
            SHKZG LIKE MSEG-SHKZG,
            MENGE_IS LIKE MSEG-MENGE,
            MENGE_RE LIKE MSEG-MENGE,
      END OF ITAB.
      DATA: BEGIN OF INT_DATA OCCURS 50,
            WERKS LIKE MSEG-WERKS,
            MATNR LIKE MSEG-MATNR,
            BWART LIKE MSEG-BWART,
            XBLNR LIKE MKPF-XBLNR,
            MBLNR LIKE MSEG-MBLNR,
            BUDAT LIKE MKPF-BUDAT,
            MAKTX LIKE MAKT-MAKTX,
            MENGE_O LIKE MSEG-MENGE,
            MENGE_R LIKE MSEG-MENGE,
            MENGE_TO LIKE MSEG-MENGE,
            MENGE_TI LIKE MSEG-MENGE,
            MENGE_S LIKE MSEG-MENGE,
            MENGE_ST LIKE MSEG-MENGE,
            MENGE_AD LIKE MSEG-MENGE,
            MENGE_RT LIKE MSEG-MENGE,
            MENGE_C LIKE MSEG-MENGE,
            MENGE_CL LIKE MSEG-MENGE,
            MENGE_BAL LIKE MSEG-MENGE,
            MENGE_CR LIKE MSEG-MENGE,
            NAME1 LIKE T001W-NAME1,
            MENGE_RE LIKE MSEG-MENGE,
            MENGE_IS LIKE MSEG-MENGE,
            MENGE_BAL1 LIKE MSEG-MENGE,
            SHKZG LIKE MSEG-SHKZG,
             MENGE LIKE MSEG-MENGE,
            END OF INT_DATA.
      DATA: BEGIN OF INT_DATA1 OCCURS 50,
             WERKS LIKE MSEG-WERKS,
             MATNR LIKE MSEG-MATNR,
             BWART LIKE MSEG-BWART,
             MENGE_ST LIKE MSEG-MENGE,
             MENGE_O LIKE MSEG-MENGE,
             WAMNG LIKE EKET-WAMNG,
             WEMNG LIKE EKET-WEMNG,
             MENGE LIKE MSEG-MENGE,
             RETPO LIKE EKPO-RETPO,
             UMREN LIKE EKPO-UMREN,
             UMREZ LIKE EKPO-UMREZ,
             BSTMG LIKE EKPO-MENGE,
             XBLNR LIKE MKPF-XBLNR,
       END OF INT_DATA1.
      DATA: BEGIN OF INT_DATA2 OCCURS 50,
             WERKS LIKE MSEG-WERKS,
             LGORT LIKE S031-LGORT,
             MATNR LIKE MSEG-MATNR,
             BWART LIKE MSEG-BWART,
             MENGE_IS LIKE MSEG-MENGE,
             MBWBEST LIKE S032-MBWBEST,
             MAKTX LIKE MAKT-MAKTX,
       END OF INT_DATA2.
      DATA:V_GJAHR LIKE MKPF-BUDAT.
      DATA : FLAG6 TYPE C,
        PAGENO1 LIKE SY-PAGNO,
        PAGENO2 LIKE SY-PAGNO.
      SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-064.
      SELECT-OPTIONS:
      MATNR FOR MSEG-MATNR,
      MATKL FOR MARA-MATKL OBLIGATORY,
      WERKS FOR MSEG-WERKS OBLIGATORY,
      LGORT FOR MSEG-LGORT,
    *CHARG FOR MSEG-CHARG,
      BWART FOR MSEG-BWART,
    *LIFNR FOR LFA1-LIFNR,
    *WADAT FOR LIKP-WADAT_IST,
      BUDAT FOR MKPF-BUDAT.
      SELECTION-SCREEN END OF BLOCK 0.
    *SELECTION-SCREEN SKIP 1.
    Parameters
    *SELECTION-SCREEN SKIP 1.
    Variante
    *SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-064.
      DATA: P_VARI LIKE DISVARIANT-VARIANT.
    *SELECTION-SCREEN END OF BLOCK 0.
    Layout
      SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-060.
      DATA:   P_ZEBRA VALUE 'X'.
      SELECTION-SCREEN END OF BLOCK A.
      SELECTION-SCREEN BEGIN OF BLOCK D WITH FRAME TITLE TEXT-063.
      PARAMETERS:
                  P_EXPAND AS CHECKBOX DEFAULT ' '.
      DATA: P_DETPOP VALUE 'X' .
      SELECTION-SCREEN END OF BLOCK D.
      DATA:       G_BOXNAM TYPE SLIS_FIELDNAME VALUE  'BOX',
                  G_EXPANDNAME TYPE SLIS_FIELDNAME VALUE 'EXPAND',
                  P_F2CODE LIKE SY-UCOMM       VALUE  '&ETA',
                  P_LIGNAM TYPE SLIS_FIELDNAME VALUE  'LIGHTS',
                  G_SAVE(1) TYPE C,
                  G_TABNAME_HEADER TYPE SLIS_TABNAME,
                  G_TABNAME_ITEM   TYPE SLIS_TABNAME,
                  G_EXIT(1) TYPE C,
                  GX_VARIANT LIKE DISVARIANT,
                  G_VARIANT LIKE DISVARIANT.
    INITIALIZATION.
      GT_REPID = SY-REPID.
      G_TABNAME_HEADER = 'IT_HEADER'.
      G_TABNAME_ITEM   = 'INT_DATA'.
    define keyinfo
      CLEAR GS_KEYINFO.
      GS_KEYINFO-HEADER01 = 'MATNR'.
      GS_KEYINFO-ITEM01   = 'MATNR'.
    *GS_KEYINFO-HEADER01.
    PERFORM E01_FIELDCAT_INIT  USING GT_FIELDCAT[].
    PERFORM E03_EVENTTAB_BUILD USING GT_EVENTS[].
    PERFORM E04_COMMENT_BUILD  USING GT_LIST_TOP_OF_PAGE[].
    PERFORM E06_T_SORT_BUILD   USING GT_SORT[].
    PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
    Schalter Varianten benutzerspezifisch/allgemein speicherbar setzen
    Set Options: save variants userspecific or general
      G_SAVE = 'A'.
      PERFORM VARIANT_INIT.
    Get default variant
      GX_VARIANT = G_VARIANT.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          I_SAVE     = G_SAVE
        CHANGING
          CS_VARIANT = GX_VARIANT
        EXCEPTIONS
          NOT_FOUND  = 2.
      IF SY-SUBRC = 0.
        P_VARI = GX_VARIANT-VARIANT.
      ENDIF.
    Process on value request
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
      PERFORM F4_FOR_VARIANT.
    AT SELECTION-SCREEN.
      PERFORM PAI_OF_SELECTION_SCREEN.
    START-OF-SELECTION.
    END-OF-SELECTION.
    PERFORM LAYOUT_BUILD USING GT_LAYOUT.     "wg. Parameters
    Call ABAP/4 List Viewer
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = GT_REPID
          IS_LAYOUT          = GT_LAYOUT
          IT_FIELDCAT        = GT_FIELDCAT[]
          IT_SPECIAL_GROUPS  = GT_SP_GROUP[]
          IT_SORT            = GT_SORT[]
          I_SAVE             = G_SAVE
          IS_VARIANT         = G_VARIANT
          IT_EVENTS          = GT_EVENTS[]
          I_TABNAME_HEADER   = G_TABNAME_HEADER
          I_TABNAME_ITEM     = G_TABNAME_ITEM
          IS_KEYINFO         = GS_KEYINFO
          IS_PRINT           = G_PRINT
        TABLES
          T_OUTTAB_HEADER    = IT_HEADER
          T_OUTTAB_ITEM      = INT_DATA.
          FORM E01_FIELDCAT_INIT                                        *
    -->  E01_LT_FIELDCAT                                               *
    FORM FIELDCAT_INIT
                      USING RT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      DATA: POS TYPE I VALUE 1.
    CLEAR LS_FIELDCAT.
    LS_FIELDCAT-FIELDNAME    = 'WERKS'.
    LS_FIELDCAT-TABNAME      =  G_TABNAME_HEADER .
    LS_FIELDCAT-SELTEXT_L        = 'Plant'.
    APPEND LS_FIELDCAT TO RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
    LS_FIELDCAT-FIELDNAME    = 'NAME1'.
    LS_FIELDCAT-TABNAME      =  G_TABNAME_HEADER .
    LS_FIELDCAT-SELTEXT_L        = 'Description'.
    APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_HEADER .
      LS_FIELDCAT-SELTEXT_M        = 'Material'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_HEADER .
      LS_FIELDCAT-SELTEXT_M        = 'Material Description'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'XBLNR'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M        = ' Doc No.'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BUDAT'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M        = ' Doc Date.'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BWART'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M        = ' Mvt.'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MBLNR'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M        = ' Mat.Doc No'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_R'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = '  STO-In '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_RT'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Sales Returns '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_CL'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Canc of Invoice'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_AD'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Adjustments '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_S'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M     = '  Sales.  '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_TO'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = '  STO-Out  '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_CR'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Canc of Sal Returns'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_AD'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = 'Adjustments '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_O'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Opening Balance  '.
      LS_FIELDCAT-NO_ZERO = 'X'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_BAL'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Balance   '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
    ENDFORM.                    "E01_FIELDCAT_INIT
          FORM E02_DATA_ADD                                             *
    -->  E02_LT_SFLIGHT                                                *
          FORM E03_EVENTTAB_BUILD                                       *
    -->  E03_LT_EVENTS                                                 *
    *FORM E03_EVENTTAB_BUILD USING E03_LT_EVENTS TYPE SLIS_T_EVENT.
    DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE = 1
       IMPORTING
         ET_EVENTS   = E03_LT_EVENTS.
    READ TABLE E03_LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                              INTO LS_EVENT.
    IF SY-SUBRC = 0.
       MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
       APPEND LS_EVENT TO E03_LT_EVENTS.
    ENDIF.
    *ENDFORM.                    "E03_EVENTTAB_BUILD
          FORM E04_COMMENT_BUILD                                        *
    -->  E04_LT_TOP_OF_PAGE                                            *
    FORM E04_COMMENT_BUILD USING E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
      DATA: LS_LINE TYPE SLIS_LISTHEADER.
    Listenüberschrift: Typ H
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = TEXT-001.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY  = TEXT-050.
      LS_LINE-INFO = TEXT-010.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      LS_LINE-KEY  = TEXT-051.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
    Aktionsinfo: Typ A
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'A'.
      LS_LINE-INFO = TEXT-002.
      APPEND LS_LINE TO  E04_LT_TOP_OF_PAGE.
    ENDFORM.                    "E04_COMMENT_BUILD
          FORM E05_LAYOUT_BUILD                                         *
    <->  E05_LS_LAYOUT                                                 *
    FORM LAYOUT_BUILD USING LS_LAYOUT TYPE SLIS_LAYOUT_ALV.
      LS_LAYOUT-F2CODE            = P_F2CODE.
      LS_LAYOUT-ZEBRA          = P_ZEBRA.
      LS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      IF P_EXPAND = 'X'.
        LS_LAYOUT-EXPAND_FIELDNAME     = G_EXPANDNAME.
      ELSE.
        CLEAR LS_LAYOUT-EXPAND_FIELDNAME.
      ENDIF.
      LS_LAYOUT-DETAIL_POPUP      = P_DETPOP.
    ENDFORM.                    "E05_LAYOUT_BUILD
          FORM E06_T_SORT_BUILD                                         *
    -->  E06_LT_SORT                                                   *
    *FORM E06_T_SORT_BUILD USING E06_LT_SORT TYPE SLIS_T_SORTINFO_ALV.
    DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
    CLEAR LS_SORT.
    LS_SORT-FIELDNAME = 'WERKS'.
    LS_SORT-TABNAME   = G_TABNAME_HEADER.
    LS_SORT-SPOS      = 1.
    LS_SORT-UP        = 'X'.
    APPEND LS_SORT TO E06_LT_SORT.
    CLEAR LS_SORT.
    LS_SORT-FIELDNAME = 'MATNR'.
    LS_SORT-TABNAME   = G_TABNAME_ITEM.
    LS_SORT-SPOS      = 2.
    LS_SORT-UP      = 'X'.
    APPEND LS_SORT TO E06_LT_SORT.
    *ENDFORM.                    "E06_T_SORT_BUILD
          FORM E07_SP_GROUP_BUILD                                       *
    -->  E07_LT_SP_GROUP                                               *
    FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
      DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
      CLEAR  LS_SP_GROUP.
      LS_SP_GROUP-SP_GROUP = 'A'.
      LS_SP_GROUP-TEXT     = TEXT-005.
      APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
    ENDFORM.                    "E07_SP_GROUP_BUILD
          FORM SELECTION                                                *
    FORM FETCH_DATA .
      STR3 = BUDAT-LOW+0(4).
      SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB1
                         WHERE MATNR IN MATNR AND
                         MATKL IN MATKL.
      SELECT MATNR WERKS LGORT
                         INTO TABLE ITAB2
                         FROM MARD FOR ALL ENTRIES IN ITAB1
                         WHERE WERKS IN WERKS AND
                               LGORT IN LGORT AND
                               MATNR = ITAB1-MATNR.
      SELECT SINGLE NAME1 FROM T001W INTO INT_DATA-NAME1
           WHERE WERKS = INT_DATA-WERKS.
      LOOP AT ITAB2.
        SELECT M~MATNR M~WERKS M~LGORT M~MENGE M~MBLNR  M~MJAHR M~XAUTO M~SHKZG
                       M~BWART M~EBELN N~BUDAT N~XBLNR S~NAME1
                       INTO CORRESPONDING FIELDS OF ITAB
                       FROM   MSEG AS M INNER JOIN MKPF AS N ON
                              M~MBLNR = N~MBLNR
                              AND M~MJAHR = N~MJAHR
                            INNER JOIN T001W AS S ON
                              M~WERKS = S~WERKS
                          WHERE N~BUDAT IN BUDAT AND
                             M~WERKS = ITAB2-WERKS AND
                             M~LGORT = ITAB2-LGORT AND
                             M~MATNR = ITAB2-MATNR AND
                    M~BWART IN BWART.
          APPEND ITAB.
          CLEAR ITAB.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          ITAB-MATNR = ITAB2-MATNR.
          ITAB-WERKS = ITAB2-WERKS.
          ITAB-LGORT = ITAB2-LGORT.
          ITAB-BWART = ITAB2-BWART.
          APPEND ITAB.
        ENDIF.
        CLEAR: ITAB2,ITAB.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM ITAB2 COMPARING MATNR WERKS .
      V_MONTH = BUDAT-LOW+0(6).
      SELECT * INTO CORRESPONDING FIELDS OF TABLE INT_DATA2
               FROM S032 FOR ALL ENTRIES IN ITAB2
               WHERE MATNR = ITAB2-MATNR
                     AND WERKS   = ITAB2-WERKS
                     AND LGORT   = SPACE
                     AND   MBWBEST <> SPACE.
      LOOP AT INT_DATA2 .
        SELECT SINGLE *  FROM S031
                         WHERE MATNR = INT_DATA2-MATNR AND
                               WERKS = INT_DATA2-WERKS AND
                               LGORT = SPACE AND
                               SPMON GT V_MONTH.
        MODIFY INT_DATA2.
        CLEAR: INT_DATA2, S031.
      ENDLOOP.
      DELETE INT_DATA WHERE MENGE_O IS INITIAL .
      DELETE ADJACENT DUPLICATES FROM INT_DATA COMPARING XBLNR MATNR MAKTX.
      V_MONTH1 = BUDAT-LOW+0(6).
      SORT ITAB BY  MATNR  WERKS  XBLNR .
      LOOP AT ITAB.
        XBLNR = ITAB-XBLNR.
        INT_DATA-MENGE = ITAB-MENGE.
        INT_DATA-BWART = ITAB-BWART.
        INT_DATA-XBLNR = ITAB-XBLNR.
        INT_DATA-BUDAT = ITAB-BUDAT.
        INT_DATA-MATNR = ITAB-MATNR.
        INT_DATA-MBLNR = ITAB-MBLNR.
        INT_DATA-MENGE = ITAB-MENGE.
        INT_DATA-SHKZG = ITAB-SHKZG.
        INT_DATA-MENGE_IS = ITAB-MENGE_IS.
        INT_DATA-MENGE_RE = ITAB-MENGE_RE.
        INT_DATA-MENGE_O = ITAB-MENGE_O.
        INT_DATA-NAME1 = ITAB-NAME1.
        AT NEW MATNR.
          FLAG = 1.
          IT_HEADER-MATNR = INT_DATA-MATNR.
          SELECT SINGLE MAKTX FROM MAKT INTO IT_HEADER-MAKTX WHERE
          MATNR = INT_DATA-MATNR.
          APPEND IT_HEADER.
          CLEAR IT_HEADER.
        ENDAT.
        IF FLAG = 1.
          PERFORM GET_OPENING_STOCK.
        ENDIF.
        INT_DATA-MENGE_O = OSTOCK.
        CASE ITAB-BWART.
          WHEN '101'.
            IF INT_DATA-SHKZG = 'S'.
              INT_DATA-MENGE_R = INT_DATA-MENGE_R + ITAB-MENGE.
            ENDIF.
          WHEN  '453'.
            IF INT_DATA-SHKZG = 'S'.
              IF ITAB-XAUTO = 'X'.
                INT_DATA-MENGE_RT = INT_DATA-MENGE_RT + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '351' OR '641'.
           IF ITAB-LGORT = 0.
             INT_DATA-MENGE_R = INT_DATA-MENGE_R + ITAB-MENGE.
           ELSE.
             INT_DATA-MENGE_TO = INT_DATA-MENGE_TO + ITAB-MENGE.
           ENDIF.
          WHEN '602' OR '642'.
            IF INT_DATA-SHKZG = 'S'.
              IF ITAB-LGORT = 0.
                INT_DATA-MENGE_CL = INT_DATA-MENGE_CL + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '552' OR '310'.
            IF INT_DATA-SHKZG = 'S'.
              INT_DATA-MENGE_AD = INT_DATA-MENGE_AD - ITAB-MENGE.
            ENDIF.
          WHEN '601'.
            IF INT_DATA-SHKZG = 'H'.
              INT_DATA-MENGE_S = INT_DATA-MENGE_S + ITAB-MENGE.
            ENDIF.
          WHEN  '641' .
            IF INT_DATA-SHKZG = 'H'.
              IF ITAB-LGORT = 0.
                INT_DATA-MENGE_TO = INT_DATA-MENGE_TO + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN  '454' OR '102'.
            IF INT_DATA-SHKZG = 'H'.
              IF ITAB-XAUTO = 'X'.
                INT_DATA-MENGE_CR = INT_DATA-MENGE_CR - ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '551' OR '309'.
            IF INT_DATA-SHKZG = 'H'.
              INT_DATA-MENGE_AD = INT_DATA-MENGE_AD + ITAB-MENGE.
            ENDIF.
            IF INT_DATA-SHKZG = 'S'.
              MENGE_O = INT_DATA-MENGE_O + ITAB-MENGE.
            ENDIF.
        ENDCASE.
        IF INT_DATA-SHKZG = 'S'.
          MENGE_RE = INT_DATA-MENGE_R + INT_DATA-MENGE_RT + INT_DATA-MENGE_CL
          + INT_DATA-MENGE_AD.
        ENDIF.
        IF INT_DATA-SHKZG = 'H'.
          MENGE_IS =  INT_DATA-MENGE_S + INT_DATA-MENGE_TO +
                        INT_DATA-MENGE_CR + INT_DATA-MENGE_AD.
        ENDIF.
        PERFORM BALANCE.
        COLLECT INT_DATA.
        CLEAR: INT_DATA,ITAB ,XBLNR, FLAG, OSTOCK.
      ENDLOOP.
      SORT INT_DATA BY XBLNR BUDAT WERKS MATNR.
      LOOP AT INT_DATA.
        READ TABLE INT_DATA2 WITH KEY MATNR = INT_DATA-MATNR
                                      WERKS = INT_DATA-WERKS.
        SELECT SINGLE * FROM MAKT WHERE MATNR = INT_DATA-MATNR.
        INT_DATA-MAKTX = MAKT-MAKTX.
        MODIFY INT_DATA.
        CLEAR: INT_DATA, INT_DATA2.
      ENDLOOP.
      LOOP AT INT_DATA WHERE  MENGE_O = 0 AND MENGE_RT = 0 AND
                            MENGE_CL = 0 AND MENGE_AD = 0 AND
                            MENGE_S = 0 AND MENGE_TO = 0 AND
                            MENGE_CR = 0 AND MENGE_R = 0 AND MENGE_BAL = 0.
        DELETE IT_HEADER WHERE MATNR = INT_DATA-MATNR.
      ENDLOOP.
      DELETE INT_DATA WHERE MENGE_O = 0 AND MENGE_RT = 0 AND
                            MENGE_CL = 0 AND MENGE_AD = 0 AND
                            MENGE_S = 0 AND MENGE_TO = 0 AND
                            MENGE_CR = 0 AND MENGE_R = 0 AND MENGE_BAL = 0.
    ENDFORM.                    "SELECTION
    *&      Form  EVENTTAB_BUILD
          text
         -->P_GT_EVENTS[]  text
    FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE = 1
        IMPORTING
          ET_EVENTS   = RT_EVENTS.
      READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE GT_TOP_OF_PAGE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO RT_EVENTS.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
          FORM TOP_OF_PAGE                                              *
    FORM TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         I_LOGO             = 'ENJOYSAP_LOGO'
         IT_LIST_COMMENTARY = LT_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          I_LOGO             = 'ENJOYSAP_LOGO'
          IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.                    "TOP_OF_PAGE
          FORM F4_FOR_VARIANT                                           *
    FORM F4_FOR_VARIANT.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          IS_VARIANT       = G_VARIANT
          I_SAVE           = G_SAVE
          I_TABNAME_HEADER = G_TABNAME_HEADER
          I_TABNAME_ITEM   = G_TABNAME_ITEM
        IMPORTING
          E_EXIT           = G_EXIT
          ES_VARIANT       = GX_VARIANT
        EXCEPTIONS
          NOT_FOUND        = 2.
      IF SY-SUBRC = 2.
        MESSAGE ID SY-MSGID TYPE 'S'      NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        IF G_EXIT = SPACE.
          P_VARI = GX_VARIANT-VARIANT.
        ENDIF.
      ENDIF.
    ENDFORM.                    "F4_FOR_VARIANT
    *&      Form  PAI_OF_SELECTION_SCREEN
          text
    FORM PAI_OF_SELECTION_SCREEN.
      IF NOT P_VARI IS INITIAL.
        MOVE G_VARIANT TO GX_VARIANT.
        MOVE P_VARI TO GX_VARIANT-VARIANT.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
          EXPORTING
            I_SAVE     = G_SAVE
          CHANGING
            CS_VARIANT = GX_VARIANT.
        G_VARIANT = GX_VARIANT.
      ELSE.
        PERFORM VARIANT_INIT.
      ENDIF.
    ENDFORM.                               " PAI_OF_SELECTION_SCREEN
    *&      Form  VARIANT_INIT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT_INIT.
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = GT_REPID.
    ENDFORM.                               " VARIANT_INIT
    *&      Form  GET_OPENING_STOCK
          text
    FORM GET_OPENING_STOCK.
      SELECT SUM( MZUBB ) SUM( MAGBB )  INTO (V_STOCK, V_STOCK1)
                    FROM S031 WHERE MATNR = ITAB-MATNR AND
                                    WERKS = ITAB-WERKS AND
                                    SPMON LT V_MONTH1 AND LGORT = ITAB-LGORT.
      OSTOCK = V_STOCK1 - V_STOCK.
      IF OSTOCK < 0.
        OSTOCK = OSTOCK * -1.
      ENDIF.
    ENDFORM.                               " GET_OPENING_STOCK
    *&      Form  check
          text
    FORM CHECK.
      AUTHORITY-CHECK OBJECT 'M_IS_MATNR'
        ID 'ACTVT' DUMMY
        ID 'MATNR' FIELD MATNR-LOW.
      IF SY-SUBRC <> 0.
        MESSAGE E016(Z1) WITH MATNR-LOW.
      ENDIF.
    ENDFORM.                    "CHECK_AUTHORIZATION
    *&      Form  EVENTTAB_BUILD
          text
         -->P_GT_EVENTS[]  text
    *FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
    DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE = 1
       IMPORTING
         ET_EVENTS   = RT_EVENTS.
    READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                              INTO LS_EVENT.
    IF SY-SUBRC = 0.
       MOVE GT_TOP_OF_PAGE TO LS_EVENT-FORM.
       APPEND LS_EVENT TO RT_EVENTS.
    ENDIF.
    *ENDFORM.                    " EVENTTAB_BUILD
          FORM TOP_OF_PAGE
    *FORM TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         I_LOGO             = 'ENJOYSAP_LOGO'
         IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    *ENDFORM.                    "TOP_OF_PAGE
    *&      Form  COMMENT_BUILD
          text
         -->P_GT_LIST_TOP_OF_PAGE[]  text
    FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE
                           SLIS_T_LISTHEADER.
      DATA: LS_LINE TYPE SLIS_LISTHEADER.
      DATA: LV_PAGE_STRING(11),
             LV_PAGE_NO(3).
      PAGNO = SY-PAGNO.
      DATA: PAGNO(5) TYPE C.
      CLEAR
         LS_LINE.
      REFRESH LT_TOP_OF_PAGE.
      CLEAR
         LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY = 'Page Number'.
      PAGNO = SY-PAGNO.
      IF
        PAGNO = 0.
        PAGNO =  1.
      ENDIF.
      SHIFT PAGNO LEFT DELETING LEADING SPACE.
      LS_LINE-INFO = PAGNO.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = TEXT-001.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'A'.
      SELECT SINGLE * FROM T001W WHERE
                      WERKS IN WERKS.
      CONCATENATE 'Name Of The Plant ' '-'  T001W-NAME1 INTO
                            TXT SEPARATED BY SPACE.
      LS_LINE-INFO = TXT.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      CLEAR:TXT, LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = TEXT-002.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      IF WERKS-HIGH EQ SPACE.
        CONCATENATE 'Plant :  ' WERKS-LOW INTO TXT.
      ELSE.
        CONCATENATE 'FROM PLANT : ' WERKS-LOW 'TO PLANT : ' WERKS-HIGH INTO TXT SEPARATED  BY SPACE.
      ENDIF.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = TXT.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      IF BUDAT-HIGH EQ SPACE.
        BUDAT-HIGH = BUDAT-LOW.
      ENDIF.
      CONCATENATE 'Date : From ' BUDAT-LOW6(2) '-' BUDAT-LOW4(2) '-'
                            BUDAT-LOW0(4) 'to' BUDAT-HIGH6(2) '-'
                            BUDAT-HIGH4(2) '-' BUDAT-HIGH0(4) INTO
                            TXT SEPARATED BY SPACE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'A'.
      LS_LINE-INFO = TXT.
      APPEND LS_LINE TO  LT_TOP_OF_PAGE.
    ENDFORM.                    "COMMENT_BUILD
    *&      Form  LAYOUT_INIT
          text
         -->P_GT_LAYOUT  text
    FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
      RS_LAYOUT-DETAIL_POPUP      = 'X'.
      RS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    ENDFORM.                    " LAYOUT_INIT
    *&      Form  BALANCE
          text
    -->  p1        text
    <--  p2        text
    FORM BALANCE.
      IF INT_DATA-SHKZG = 'S'.
        MENGE_RE = INT_DATA-MENGE_O + INT_DATA-MENGE.
        INT_DATA-MENGE_BAL = MENGE_RE.
        INT_DATA-MENGE_RE = INT_DATA-MENGE.
      ELSEIF INT_DATA-SHKZG = 'H'.
        MENGE_RE =  MENGE_RE - INT_DATA-MENGE.
        INT_DATA-MENGE_BAL = MENGE_RE.
        INT_DATA-MENGE_IS = INT_DATA-MENGE.
      ENDIF.
    ENDFORM.                    " BALANCE
    Thanks & Regards,
    Sreedhar.

    Hi,
    try like this.........
      get v_linct from system varaible sy-linct
      describe table t_output lines lv_lines - Where 
      t_output is ur final internal table which is displayed
      v_pagct = ( lv_lines div v_linct ) + 3.
      write: 'PAGE NO:' , sy-pagno  ,'/', v_pagct.
    Madhavi

  • Repeat group header on every page before group footer as group spans across

    I have a group which spans across multiple pages.In group there are two subreports in Group footer.I have set all the required parameters to repeat group header on every page in group expert,but not getting desired results,please help....

    I have following structure in my report.
    I have two group headers at the top,first one contains name of the site & site number,second header contains Site-Admin as heading,below which i have kept details section of report which displays name of administrator which repeats details section in case there are more than one adminstrators.
    Below this i have two group footers which individually contain each of the two sub-reports.
    As per data,these individual subreport may or may not begin at the beginning of the new page every
    time,therefore fake group header put at the beginning of these sub-reports may come in middle of the page sometime,so thet cant be done.
    Thank you,please reply if you have another solution....

  • Header in every page of  SAP-Script

    Hi all,
    How to print header in every page of SAP-Script?
    Thanks in advance,
    SG

    Hi,
    While giving the WRITE FOR, u have to give the Value HEADER for TYPE.
    U have it to give it inside the Loop so that u ll get the header in all pages.
    For eg.,
    Loop at <itab>.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       element                        = 'ELEMENT1'
       type                             = 'HEADER'
       window                         = 'WINDOW1'.
    endloop.
    Regards,
    Padmam.

  • Header table to repeat on every page

    Hi,
         I have requirement and might be a common one. I have to built an rtf template for Purchase orders to output in pdf.I have a header table and detail table in the template. If there are more detail records the detail table get extended to next page but not the header. I have coded something like below:
    for-each: g_header
         <header_table>
    for-each: g_lines
         <detail_table>
    end for-each
    end for-each
    If i change to something like below:
    for-each: g_header
    for-each: g_lines
         <header_table>
         <detail_table>
    end for-each
    end for-each
         it repeats both the tables for every detail line. I want the header section to repeat on every page. i think, this is a general issue. If anyone knows anything, Please help.
    Thanks.

    Hi,
    I am developing a PDF report with 4 levels of data.
    Levels 1 to 3 contain the header info and Level 4 contains details.
    For each new level 1,2,3 member, I want to display in a new page.
    When the parent level has more than one child level, I want to repeat parent level info in all pages.
    But there is some problem with my RTF template, I couldn't repeat header level in all pages.
    I am doing something like below.
    <?for-each@section:G_LEVEL1?>
    <Level 1 table>
    <?for-each-group:G_LEVEL2?>
    <Level 2 table>
    <?for-each-group:G_LEVEL3?>
    <Level 3 table>
    <?for-each:G_LEVEL 4_LINES?>
    <Level 4 details table>
    end for-each
    page break end for-each
    page break end for-each
    end for-each
    I have tried having header levels in RTF header itself and set the table property to repeat header. But all the pages are displaying same header.
    Can you please help Srini ?
    Many Thanks,
    Krish

  • Header in every page of ALV List

    Hi All,
    I am working in ALV list now the requirement is that i have to fetch the data based on inputs given when the report executed. and the values which i gave in the input is printed as header of ALV list.
    I have done everything except that when i am printing the Header it is coming only on the first page but we want it in every page the list spreads. please help me ASAP.
    Regards,
    hrk

    Hi,
    As my knowledge, It can not do the thing you told (you can do this thing with Smartforms). but you can separate your report with a condition to break page. Here an example that you can break page with condition when company code changes or GL account changes.
    firstly, build a sort table:
    FORM sort_build CHANGING pt_sort TYPE slis_t_sortinfo_alv.
    *-- company code
      gs_sort-spos      = 1.
      gs_sort-fieldname = 'BUKRS'.
      gs_sort-tabname   = 'GT_FKONT'.
      gs_sort-up        = 'X'.
      gs_sort-group     = '*'.
      gs_sort-subtot    = 'X'.
      APPEND gs_sort TO gt_sort.
    *-- Account
      gs_sort-spos      = 2.
      gs_sort-fieldname = 'SAKNR'.
      gs_sort-tabname   = 'GT_FKONT'.
      gs_sort-up        = 'X'.
      gs_sort-group     = '*'.
      gs_sort-subtot    = 'X'.
      APPEND gs_sort TO gt_sort.
    ENDFORM.     
    and attach the sorted table to FM:
    FORM alv_list_display TABLES pt_itab
                          USING  pv_pf_status_set
                                 pv_user_command.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = gv_repid
          i_callback_user_command  = pv_user_command
          i_callback_pf_status_set = pv_pf_status_set
          is_layout                = gs_layout
          i_save                   = gv_save
          it_excluding             = gt_excluding[]
          is_variant               = gs_variant
          it_events                = gt_events[]
          it_event_exit            = gt_event_exit[]
          it_fieldcat              = gt_fieldcat[]
          *it_sort                  = gt_sort[]*   "sort table
        IMPORTING
          e_exit_caused_by_caller  = gv_exit_caused_by_caller
          es_exit_caused_by_user   = gt_exit_caused_by_user
        TABLES
          t_outtab                 = pt_itab.
    ENDFORM.
    regards,
    Thien
    Edited by: Thien Pham on Dec 1, 2009 2:48

  • What if I want the Report Header on every page?

    Is there a way to tell Report Builder to have the main report header show up on every page in CF Report Builder 9? There doesn't seem to be any property in the property viewer when you select the main header that tells it to do that. The secondary header shows on every page but I can't seem to find anything in that set of properties that is set any different than the main header section is.
    Any help would be appreciated.
    Thanks.

    If you see lots of views but no answers, you can assume that either your question was too difficult or that nobody likes you.

  • Header and trailer pages in report templates

    Hi:
    I wonder how can i make header and trailer pages in the tamplate reports , so that the objects in the template header & footer report would be inherited to the generated reports. I use Oracle reports 6.0.8 and there is no header section, niether Trailer section in the Template Editor, I've read in the reports online help :"You can use the margin and body of the Header and Trailer sections to create a Header and Trailer “page” as in earlier releases. In future releases, you will be able to add and delete sections.", is there any method i can use to make header&trailer pages in the template.

    I have the same question. This is what I found on Metalink.
    goal: How To Define A Header/Trailer Section In A Reports Template Definition File (TDF)
    fact: Oracle Reports Developer
    fix: It is not possible to have a HEADER/TRAILER section in a Reports Template Definition File (TDF). Templates do not need to have a HEADER/TRAILER section, infact there is no sectioning in a template. They just define the visual layout when applied against a report section.
    This did not answer my question!

  • Changing header information in pages made from templates

    I am familiar with GoLive and using components for menus to
    accomodate universal changes.
    I am new to Dreamweaver (CS3). I am using templates for my
    menus so I can make universal changes. However, what do I do if I
    want to put a form on a page and need to be able to put some code
    in the header? I cannot because the header is non-editable on pages
    made from templates.
    Are templates the only alternative to GoLive Components?
    THX

    This is the sign of an improperly made template.
    Do this -
    Create a new page (Basic HTML).
    Use FILE | Save as Template....
    Look at the code in the head region of the page, particularly
    the editable
    region around the <title> tag, and the other editable
    region in the head
    called "head".
    Make your template file look like that.
    Always use FILE | Save as Template when you create your
    templates and you
    won't have this problem again.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "hmogg" <[email protected]> wrote in message
    news:fe39fo$pe6$[email protected]..
    >I am familiar with GoLive and using components for menus
    to accomodate
    > universal changes.
    >
    > I am new to Dreamweaver (CS3). I am using templates for
    my menus so I can
    > make universal changes. However, what do I do if I want
    to put a form on a
    > page
    > and need to be able to put some code in the header? I
    cannot because the
    > header
    > is non-editable on pages made from templates.
    >
    > Are templates the only alternative to GoLive Components?
    > THX
    >

  • Dynamic table with header on each page

    Hi,
    I am new to livecycle forms. I am not sure if I am asking a silly question but this is what I need to achieve.
    I am designing a pdf form using livecycle designer. Need to build a dynamic table using data from xml. The challenge is I need to have a signature button on each page and the button will be below the table. So if there are for eg. 100 rows of data, then the table should be split into 5 pages of 20 rows each page (each page should have the table header) or based on page content and the button should be on the bottom of each page. Is it possible to achieve this? Also any example/suggestion on implementing signature using signature pad would be greatly appreciated.

    Hi,
    For individual objects, like the button that you want to appear on each page, you should place this on the Master Page. Position the button at the bottom of the page and then make sure that you size the Content Area, so that the button is OUTSIDE of the content area. This way objects on the design page will not overflow over the button. See here: http://assure.ly/g0Wx7r.
    If you are using a Table object for your data, then you can set it to repeat the Header row, see the Object palette.
    If you are using ADEP Designer 10 (latest version of Designer) AND your users will have Acrobat X/Reader X (eg version 10.1), then you could use Flash object for a signature field. See the example here: http://assure.ly/rqCuEn. See "Assure Dynamics Map with Signature" example. Again please note that you will need Acrobat X/Reader X to view this.
    Hope that helps,
    Niall

  • How to place two tables at a time in every page in a smartform?

    Hi All,
       I have a requirement in a smartform where i need two tables in every page. These tables should repeat on every page with regard to the data thats getting populated in it.If one table has more data it should not push the second table completely from the page.
    Can anyone please give me a solution.

    Hi
    If you see in real time printing of Smartform documents like PO or SO or Invoice
    we will see two tables data one is header data which will have a single record per document and Item data which will have mulitple records.
    So header data is fixed in all pages and the Item data is printed in MAIN window and overflows to other pages depending on the data.
    SO Item table data will be printed in number of pages where as the Header table data will pe constantly printed on the header part(top part) of every page.
    so you can handle the 2 internal tables data as above
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to add the rows formatted as table headings, Tables headings are repeated when a table spans more than one page.

    Hi all,
    i am facing problem while generating Test Result word document after successful execution of TestStand.
    The Problem is :
    i want to add rows Formatted as table headings, table headings are repeated when a table spans more than one page(marked as Red).
    Example:
    Page  No. 1
    |     Test case Number  |  Test Step number      |
    |      100                         |            100                   |
    Page  No. 2
    |     Test case Number  |  Test Step number      |
    |      200                         |            300                   |
    Test Result word document should generate with Table headings(marked as Red) in every pages of the document, but i am not getting as per above example.
    Please through light on this.
    Regards,
    Susa.

    Hi Santiago,
    Thank you very much for your valuable reply.
    i want to generate MS-word report for TestStand after successful testing using MS-word2000.
    Test report contains Actual values, Expected values and Pass/Fail status.
    In my program i have customized all  fields i can able to generate test report which contains Verification engineer name , test mode, test date, start time, end time Actual values, Expected values and Pass/Fail status.etc....
    To put all values of test case number, Test step number, Actual values, Expected values and Pass/Fail status in to table for each time, i will
    insert a row into table every time values arrives, once the table exceedes its page size it moves to the next page, next page should start with table row header  but it start with  values of above said parameters.
    so i'm not able to repeat table row header for each page.
    Please find the attached file for your reference.
    Attched file expected.doc  :   This file contains what i wanted to generate MS-word report. Here table row header "Test Case Number and Test Step Number " is repeated in second page.
    Attached file Actual output from source code.doc   :  This report generated from the source code. Here table row header "Test Case Number and Test Step Number" is not repeated in second page.
    Do you know any property to set "repeat as header row at the top of each page" using MS-word ActiveX in CVI/Labwindows.
    i think this information is sufficient for you,
    Still if you need some information please ask me.
    Thanks
    Susa.
    Attachments:
    Actual output from source code.doc ‏25 KB
    expected.doc ‏26 KB

  • Repeat Header on each page

    Hi,
    I have a problem of repeating the Header on each page.
    I have tried using the following options going through other threads on this topic. But it didnt work.
    1. In Table properties, repeat as header row at the top of each page
    2. Header info <?start body?> body <?end body ?> footer information
    Please help me out..
    Thanks,
    shashi

    1.
    sorry you mis-understood it.
    ""In Table properties, repeat as header row at the top of each page""
    this is to repeat the top row or selected row to repeat as a table header in every page on the top of the table, and not as the Page header.
    2.
    the elements occurring before the beginning of the body area will compose the header.
    The elements occurring after the body area will compose the footer.
    Use the following tags to enclose the body area of your report:
    <?start:body?>
    <?end body?>
    So,this should definitely work.
    http://winrichman.blogspot.com/2008/09/header-footer-using.html
    for id , check in my profile

  • Print field in header of each page

    I am attempting to put a field in the Header of my RTF template for my BI Publisher report. I am using the BI Pub Desktop and in Word when I am doing this.
    It says that I am not allowed to put a feild in the header, footer, textbox , etc...
    How can I have a field print in the header or just below the header of every page in my report.
    Thanks
    Steve B

    Look at my explanation here ,these might help.
    http://winrichman.blogspot.com/search/label/element%20in%20header
    http://winrichman.blogspot.com/search/label/different%20page%20header
    http://winrichman.blogspot.com/search/label/diff%20header
    http://winrichman.blogspot.com/search/label/header

  • How can i add a header to each page of my form

    Hi
    Iam creating a form - it was based on one of the templates, however I would like to add a header to the top of each page (it currently only has it on the first page). Can someone please help?
    Many thanks
    Shev

    There isn't a direct way to do this for PDF forms (web forms have the header on every page). For PDF you would have to copy a text/image item at the top of each page yourself.
    Randy

Maybe you are looking for