Header and Footer in Block ALV Display

Hi All,
My requirement includes to ALV Block List Display with header and footer.
I have made two forms TOP_OF_PAGE and END_OF_PAGE . I have pass the form and name of event to an internal table it_events.
This it_events[] is then passed to FM ' REUSE_ALV_BLOCK_LIST_APPEND' . But only Top of Page is working.
Am I missing any thing in the code? or I have to use something else.
Pls Help
Regards,
Nibha

Hi,
For end_of_page you need to use Events as follows:
*TO CAPTURE EVENTS AND HANDLE
DATA : it_event TYPE slis_t_event,
       wa_event TYPE slis_alv_event.
*&      Form  BUILD_EVENTCAT
FORM build_eventcat .
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      i_list_type     = 0
    IMPORTING
      et_events       = it_event
    EXCEPTIONS
      list_type_wrong = 1
      OTHERS          = 2.
  READ TABLE it_event INTO wa_event WITH KEY name = 'END_OF_LIST'.
  wa_event-form = 'END_OF_PAGE'.                          " Sub-routine that will be used to write
  MODIFY it_event FROM wa_event INDEX sy-tabix.           " Modify it_event
  CLEAR wa_event.
ENDFORM. " F_BUILD_EVENTCAT
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program          = sy-repid
      i_callback_top_of_page      = 'TOP_OF_PAGE'
      is_layout                   = g_t_alv_layout2
      it_fieldcat                 = g_t_fieldcat2[]
      it_events                   = it_event[]
    TABLES
      t_outtab                    = <fs_final_itab>.
Regards,
Mansi.

Similar Messages

  • Need to add Header  and footer in an alv grid display output.

    How can I add header and footer in an alv grid dispay output.
    For the grid display, I am using the function module "REUSE_ALV_GRID_DISPLAY".

    HI,
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_html_end_of_list = 'END_OF_LIST_HTML'
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
      DATA: ls_text TYPE sdydo_text_element,
            l_grid     TYPE REF TO cl_gui_alv_grid,
            f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
      ls_text = 'Footer title'.
    adds and icon (red triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'IL'.
    adds test (via variable)
      CALL METHOD end->add_text
        EXPORTING
          text         = ls_text
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Bold text'
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Nor'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Yellow '
          sap_emphasis = 'str'.
    adds and icon (yellow triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'IC''.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Mor'.
    *set height of this section
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = l_grid.
      CALL METHOD l_grid->parent->parent->(f)
        EXPORTING
          id     = 3
          height = 14.
    ENDFORM. "end_of_list_html.
    This will solve  it. Post if you need more help in this.
    Regards,
    Madhu.

  • How to place header and footer  in OO-ALV program using class

    How to place header and footer  in OO-ALV program using class tell me wat r the class we shold use and their attributes as well

    Hi Venkatesh,
    Take a look at this how to [ABAP Objects - ALV Model - Using Header and Footer|https://wiki.sdn.sap.com/wiki/x/xdw]
    it's explaining how to define the classes and use it for display an ALV with Header and Footer.
    Regards,
    Marcelo Ramos

  • Header and Logo in Blocked ALV

    Is It possible to put header and logo in Blocked ALV Report.
    Is yes shall I go with the same way we put the Header and Logo in ALV Grid report.
    Thanks in Advance.

    Hi,
    You can put the haeder and logo  same like we have used to do in classical ALV's....
    sample code snippet..
    REPORT  ZALV_BLOCKEDALV .
    *provide tables
    TABLES: MARA, MAKT, MARD.
    *provide type-pools
    TYPE-POOLS: SLIS.
    *provide select-options
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
    *provide data objects
    DATA: V_REPID TYPE SY-REPID,
          WA_MARA_FIELD TYPE SLIS_FIELDCAT_ALV,       "it is for field catalog
          WA_MAKT_FIELD TYPE SLIS_FIELDCAT_ALV,
          WA_MARD_FIELD TYPE SLIS_FIELDCAT_ALV,
          WA_MARA TYPE MARA,
          WA_MAKT TYPE MAKT,
          WA_MARD TYPE MARD,      IT_MARA_FIELD TYPE SLIS_T_FIELDCAT_ALV,
          IT_MAKT_FIELD TYPE SLIS_T_FIELDCAT_ALV,
          IT_MARD_FIELD TYPE SLIS_T_FIELDCAT_ALV,
          IT_MARA TYPE TABLE OF MARA,
          IT_MAKT TYPE TABLE OF MAKT,
          IT_MARD TYPE TABLE OF MARD,      V_LAYOUT TYPE SLIS_LAYOUT_ALV,
          IT_EVENTS TYPE SLIS_T_EVENT,            "it is for events
          WA_EVENTS TYPE SLIS_ALV_EVENT.V_REPID = SY-REPID.
    *provide field catalog perform
    PERFORM FIELD_CAT.
    *call the initial function module
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        I_CALLBACK_PROGRAM             = V_REPID
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   IT_EXCLUDING                   =
    *provide perform for select the data
    PERFORM SELECT_DATA.
    *call mara append list
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = V_LAYOUT
        IT_FIELDCAT                      = IT_MARA_FIELD[]
        I_TABNAME                        = 'MARA'
        IT_EVENTS                        = IT_EVENTS[]
    *   IT_SORT                          =
    *   I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = IT_MARA
    EXCEPTIONS
       PROGRAM_ERROR                    = 1
       MAXIMUM_OF_APPENDS_REACHED       = 2
       OTHERS                           = 3.
    *call makt append list
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = V_LAYOUT
        IT_FIELDCAT                      = IT_MAKT_FIELD
        I_TABNAME                        = 'MAKT'
        IT_EVENTS                        = IT_EVENTS
    *   IT_SORT                          =
    *   I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = IT_MAKT
    EXCEPTIONS
       PROGRAM_ERROR                    = 1
       MAXIMUM_OF_APPENDS_REACHED       = 2
       OTHERS                           = 3.
    *call mard append list
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = V_LAYOUT
        IT_FIELDCAT                      = IT_MARD_FIELD
        I_TABNAME                        = 'MARD'
        IT_EVENTS                        = IT_EVENTS
    *   IT_SORT                          =
    *   I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = IT_MARD
    EXCEPTIONS
       PROGRAM_ERROR                    = 1
       MAXIMUM_OF_APPENDS_REACHED       = 2
       OTHERS                           = 3.
    *display the data
    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.
    *&      Form  TOP_PAGE
    *       text
    FORM TOP_PAGE.  WRITE:/ 'THIS IS BLOCKED ALV REPORT PROGRAM BASED ON 3 BLOCKS' COLOR
    5.ENDFORM.                    "TOP_PAGE
    *&      Form  FIELD_CAT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FIELD_CAT .WA_MARA_FIELD-COL_POS = 1.
    WA_MARA_FIELD-FIELDNAME = 'MATNR'.
    WA_MARA_FIELD-REF_TABNAME = 'MARA'.
    APPEND WA_MARA_FIELD TO IT_MARA_FIELD.
    CLEAR WA_MARA_FIELD.WA_MARA_FIELD-COL_POS = 2.
    WA_MARA_FIELD-FIELDNAME = 'ERSDA'.
    WA_MARA_FIELD-REF_TABNAME = 'MARA'.
    APPEND WA_MARA_FIELD TO IT_MARA_FIELD.
    CLEAR WA_MARA_FIELD.WA_MARA_FIELD-COL_POS = 3.
    WA_MARA_FIELD-FIELDNAME = 'ERNAM'.
    WA_MARA_FIELD-REF_TABNAME = 'MARA'.
    APPEND WA_MARA_FIELD TO IT_MARA_FIELD.
    CLEAR WA_MARA_FIELD.WA_MARA_FIELD-COL_POS = 4.
    WA_MARA_FIELD-FIELDNAME = 'LAEDA'.
    WA_MARA_FIELD-REF_TABNAME = 'MARA'.
    APPEND WA_MARA_FIELD TO IT_MARA_FIELD.
    CLEAR WA_MARA_FIELD.WA_MAKT_FIELD-COL_POS = '1'.
    WA_MAKT_FIELD-FIELDNAME = 'MATNR'.
    WA_MAKT_FIELD-REF_TABNAME = 'MAKT'.
    APPEND WA_MAKT_FIELD TO IT_MAKT_FIELD.
    CLEAR WA_MAKT_FIELD.WA_MAKT_FIELD-COL_POS = 2.
    WA_MAKT_FIELD-FIELDNAME = 'MAKTX'.
    WA_MAKT_FIELD-REF_TABNAME = 'MAKT'.
    APPEND WA_MAKT_FIELD TO IT_MAKT_FIELD.
    CLEAR WA_MAKT_FIELD.WA_MAKT_FIELD-COL_POS = 3.
    WA_MAKT_FIELD-FIELDNAME = 'MAKTG'.
    WA_MAKT_FIELD-REF_TABNAME = 'MAKT'.
    APPEND WA_MAKT_FIELD TO IT_MAKT_FIELD.
    CLEAR WA_MAKT_FIELD.WA_MARD_FIELD-COL_POS = 1.
    WA_MARD_FIELD-FIELDNAME = 'MATNR'.
    WA_MARD_FIELD-REF_TABNAME = 'MARD'.
    APPEND WA_MARD_FIELD TO IT_MARD_FIELD.
    CLEAR WA_MARD_FIELD.WA_MARD_FIELD-COL_POS = 2.
    WA_MARD_FIELD-FIELDNAME = 'WERKS'.
    WA_MARD_FIELD-REF_TABNAME = 'MARD'.
    APPEND WA_MARD_FIELD TO IT_MARD_FIELD.
    CLEAR WA_MARD_FIELD.WA_MARD_FIELD-COL_POS = 3.
    WA_MARD_FIELD-FIELDNAME = 'LGORT'.
    WA_MARD_FIELD-REF_TABNAME = 'MARD'.
    APPEND WA_MARD_FIELD TO IT_MARD_FIELD.
    CLEAR WA_MARD_FIELD.WA_EVENTS-FORM = 'TOP_PAGE'.
    WA_EVENTS-NAME = 'TOP_OF_PAGE'.
    APPEND WA_EVENTS TO IT_EVENTS.ENDFORM.                    " FIELD_CAT
    *&      Form  SELECT_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM SELECT_DATA .SELECT *
    FROM MARA
    INTO TABLE IT_MARA
    WHERE MATNR IN S_MATNR.SELECT *
    FROM MAKT
    INTO TABLE IT_MAKT
    WHERE MATNR IN S_MATNR.SELECT *
    FROM MARD
    INTO TABLE IT_MARD
    WHERE MATNR IN S_MATNR.ENDFORM.                    " SELECT_DATA
    hope  this will help you
    regards,
    kiran
    Edited by: kiran  kumar on Aug 23, 2010 1:43 PM

  • Header and footer area in alv

    Hi All,
           What is the use of Header and Footer Area (Top of List & End of List ) in ALV table. Can any one explain me..
    Thanks,
    Susil

    hi ,
    In the below link there is an example for creating top of list end end of list.. in this the header and footer are displayed outside the ALV table.. My question is what is the use of the header and footer even I can use UI's to display the header and footer...
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0ee06d0-d475-2b10-ddad-bc4bf134cfb8?overridelayout=true
    Thanks,
    Susil.

  • Header and Footer for ALV Layout

    Hi All,
    I have used the following code to create the Header and Footer Areas for ALV Report.
      CLEAR: FS_EVENTCAT.
      FS_EVENTCAT-NAME = 'TOP_OF_PAGE'.
      FS_EVENTCAT-FORM = 'build_comment'.
      APPEND FS_EVENTCAT TO GT_EVENTS.
      CLEAR: FS_EVENTCAT.
      FS_EVENTCAT-NAME = 'END_OF_LIST'.
      FS_EVENTCAT-FORM = 'F_WRITE_SUMMARY'.
      APPEND FS_EVENTCAT TO GT_EVENTS.
    Now the space is available for both Header and Footer...
    But i would like to display the Text in Header and Footer areas...
    How to insert the Texts....????
    Can you help me please.....???
    Regards
    Pavan

    Hi,
    Try with following example program:
    REPORT  ZRJR02                                  .
    *Table declaration.
    TABLES:ZEMP_MST,ZDEPT_MST,ZDESG_MST,ZSL_TXN.
    *Varriable declaration.
    TYPE-POOLS SLIS.
    DATA : POS TYPE I.
    DATA  REPID  LIKE SY-REPID.
    DATA : F1 TYPE SLIS_T_FIELDCAT_ALV,
           F2 TYPE SLIS_FIELDCAT_ALV,
           L_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA  L_POS TYPE I VALUE 1.               "position of the column
    DATA  GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    *DATA  GT_SORT TYPE SLIS_T_SORTINFO_ALV.
    data:  GT_EVENTS    TYPE SLIS_T_EVENT,
           FS_EVENTCAT LIKE LINE OF GT_EVENTs.
    *Internal table declaration.
    *DATA  BEGIN OF IT_SORT OCCURS 5.
         INCLUDE TYPE SLIS_SORTINFO_ALV.
    *DATA  END OF IT_SORT.
    DATA:BEGIN OF ITAB OCCURS 0,
          ZEMPNO    LIKE ZEMP_MST-ZEMPNO,
          ZEMPNAME  LIKE ZEMP_MST-ZEMPNAME,
          ZDEPTCD   LIKE ZEMP_MST-ZDEPTCD,
          ZDEPTNAME LIKE ZDEPT_MST-ZDEPTNAME,
          ZDESGCD   LIKE ZEMP_MST-ZDESGCD,
          ZDESGNAME LIKE ZDESG_MST-ZDESGNAME,
         END OF ITAB.
    REFRESH ITAB.CLEAR ITAB.
    START-OF-SELECTION.
    SELECT AZEMPNO AZEMPNAME AZDEPTCD BZDEPTNAME AZDESGCD CZDESGNAME
           FROM ZEMP_MST AS A
             INNER JOIN ZDEPT_MST AS B
               ON AZDEPTCD EQ BZDEPTCD
             INNER JOIN ZDESG_MST AS C
               ON AZDESGCD EQ CZDESGCD
           INTO CORRESPONDING FIELDS OF TABLE ITAB.
    IF SY-SUBRC <> 0.
       MESSAGE E899(M3) WITH 'No records'.
    ENDIF.
    perform f_build_eventcat.
    PERFORM LAYOUT.
    END-OF-SELECTION.
    *&      Form  LAYOUT
    FORM LAYOUT .
      PERFORM FCAT USING 'ZEMPNO'    'ITAB' '' 'Emp.No.'   'ZEMPNO'    'ZEMP_MST'  ''.
      PERFORM FCAT USING 'ZEMPNAME'  'ITAB' '' 'Emp. Name' 'ZEMPNAME'  'ZEMP_MST'  ''.
      PERFORM FCAT USING 'ZDEPTCD'   'ITAB' '' 'Dept.Code' 'ZDEPTCD'   'ZEMP_MST'  ''.
      PERFORM FCAT USING 'ZDEPTNAME' 'ITAB' '' 'Dept.Name' 'ZDEPTNAME' 'ZDEPT_MST' ''.
      PERFORM FCAT USING 'ZDESGCD'   'ITAB' '' 'Desg.Code' 'ZDESGCD'   'ZEMP_MST'  ''.
      PERFORM FCAT USING 'ZDESGNAME' 'ITAB' '' 'Desg.Name' 'ZDESGNAME' 'ZDESG_MST' ''.
    PERFORM LSORT USING  'ZEMPNO' 'IDATA' ''.
    PERFORM LSORT USING  'ZEMPNAME' 'IDATA' ''.
    MOVE IT_SORT[] TO GT_SORT[].
      REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
             I_CALLBACK_PROGRAM       = REPID
             IT_FIELDCAT              = F1
            IT_SORT                  = GT_SORT
             I_SAVE                   = 'X'
             IT_EVENTS                = GT_EVENTS[]
         TABLES
              T_OUTTAB                 = ITAB.
      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.                    " LAYOUT
    *&      Form  FCAT
    FORM FCAT USING P_FIELD P_TABLE P_SUM P_TEXT P_RFIELD P_RTABLE P_DISP.
      ADD 1 TO POS.
      F2-COL_POS       = POS.
      F2-FIELDNAME     = P_FIELD.
      F2-TABNAME       = P_TABLE.
      F2-SELTEXT_L     = P_TEXT.
      F2-REF_FIELDNAME = P_RFIELD.
      F2-REF_TABNAME   = P_RTABLE.
      F2-DO_SUM        = P_SUM.
      F2-NO_OUT        = P_DISP.
      APPEND F2 TO F1.
      CLEAR F2.
    ENDFORM.                " FCAT
    *&      Form  LSORT
    *FORM LSORT USING P_FIELD P_TABLE P_UP.
    ADD 1 TO L_POS.
    IT_SORT-SPOS      = L_POS.
    IT_SORT-FIELDNAME = P_FIELD.
    IT_SORT-TABNAME   = P_TABLE.
    IT_SORT-UP        = P_UP.
    APPEND IT_SORT.
    *ENDFORM.                    " LSORT
    FORM F_BUILD_EVENTCAT .
    CLEAR: GT_EVENTS.  REFRESH: GT_EVENTS.
      CLEAR: FS_EVENTCAT.
      FS_EVENTCAT-NAME = 'TOP_OF_PAGE'.
      FS_EVENTCAT-FORM = 'F_REPORT_HEADER_ALV'.
      APPEND FS_EVENTCAT TO GT_EVENTS.
      CLEAR: FS_EVENTCAT.
      FS_EVENTCAT-NAME = 'END_OF_LIST'.
      FS_EVENTCAT-FORM = 'F_WRITE_SUMMARY'.
      APPEND FS_EVENTCAT TO GT_EVENTS.
    ENDFORM.                    " F_BUILD_EVENTCAT
    FORM F_REPORT_HEADER_ALV.
    CALL FUNCTION 'Z_YHEAD_PRINT'
    EXPORTING
       TITLE1        = 'XYZ Limited'
       TITLE2        = 'Employee Master'
       TITLE3        = 'Created on '
       COLOR         = 'X'
    ENDFORM.
    *&      Form  F_WRITE_SUMMARY
          Write summary before exit
    FORM F_WRITE_SUMMARY .
    write:/ 'Welcome to XYZ Limited'.
    write:/ 'This is a test program to display Report in ALV Format'.
    ENDFORM.
    Regards,
    Bhaskar

  • Header and footer in ALV using CL_SALV_TABLE

    How to add header and footer for an ALV report using CL_SALV_TABLE. I know how to add header lr_table->set_top_of_list_print( lr_header )
    but how do I make it aligned center.
    Also how to add a footer
    I want it to look like Current page of total pages
    What is the system variable for total pages.

    Hi,
    this should be the Method:
    SET_END_OF_LIST_PRINT
    Best Regards

  • Creating Header and Footer in ALV

    hi,
    can anyone please tell how will you create Header and Footer in ALv and Classical Report.

    Hi,
    In classical report use events 'top-of-page' for header and 'end-of-page' for footer.
    in ALV
    follow this link
    http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/header-footer-display-in-alv-grid-for-layout-description-344391
    Regards and Best wishes.

  • Header and Footer in ALV.. URGENT

    Hi All,
    I want to print Header and Footer in ALV list/grid. Like in header, i want page no.( 1 of 10), UserName, Report Name etc.. and in Footer, I need selection screen criteria. For this I am using a function module (FM_SECECTOIN_CRITERIA_PRINT).
    Where exactly should i code this part in my program.
    Regards,
    Parvez.

    Check this link -
    http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
    http://www.sap-img.com/fu037.htm
    http://www.sap-img.com/abap-function.htm
    Regards,
    Amit

  • Header and Footer in not displaying correctly on each page in Adobe Forms

    Hi experts,
       I need your little help on Adobe Form.  I have develop a customer account statement and facing problem.
         In header and footer part I have to display customer address. It is ok if data is of one page. But when data is overflowing, customer address is showing only at first page in header, and not displaying address neither in header nor in footer(footer section will print on last page, it may be either first page or third page ) on other pages. (Address is table type data )
           Header and footer Section address has been designed on Master Page.
    Please help me to resolve these two problems as soon as possible.
    Regards
    Piyush

    I found this post which I hope helps:
    This can be done by bit of tweaking using JavaScript. 
    Actually the problem was, the header was printing continuously in subsequent pages and once the header data was over the rest of the pages contained blank header. But we need have to print same header for each group of items till that group of items finish in the specific page. And for new group of items different header will be filled and so on.
    So to overcome this issue, create the item table in such a way that the header data is also included in the item table for each group of items. In the layout, select your header field and the event READY LAYOUT and write the below JavaScript code. This event is called for each page for that header field, so you can directly map the item table value and put it in your header field.
    // Get the current page
    var currpage = xfa.layout.page(this);
    // variable to store number of fields in that page.
    var fields = 0;      
    // Get the number of fields
            fields = xfa.layout.pageContent(currpage-1, "field", 0);
    // Loop on each field on the page
            for ( i=0; i<= fields.length-1; i++ )
    // Check if the field is in the item table column (it will be actually header data column in your item table)
                if ( fields.item(i).name == "TL" ) 
    // Fetch that value and store in your header field.
                           this.rawValue = fields.item(i).rawValue;

  • Problem in displaying header and footer in RTF template..

    Hi all,
    How to display first "n" number of pages with one set of header and footer and the next "m" number of pages with other set of header and footer?
    Thanks,
    Makesh
    Message was edited by: Makesh

    we can try doing this,...
    but not based on page number ,
    page number will not be available during this time, it will generated during the rendering time, so the condition of Page number may not help,
    if we can find a way to identify the logic to display FOOTER A or B in the page based on something else, wee can do that..
    create a two named templateA and B , and call them according to the logic to b displayed.

  • How to display 2 layouts with 2 different Header and Footer in a template.

    Hi,
    I am using XML Publisher 5.5. I have created one template which is having two layouts. I am using <?Start: Body?> and <?end body?> for displaying Headers and footers. Now my problem is, I need to display first layout with it's associated Header and footer and then second layout with other header and footer. But the two layouts should come in single template file. How is it possible?. Is there any work around? Please help me as this is the urgent requirement to my client.
    Thanks.
    Siva.

    No problem. Select Insert -> Break from the menu bar. Then select a "Section Break" - Next page.
    Header 1
    <?start:body?>
    Page 1
    <?end: body?>
    Footer 1
    ==================Section Break (Next Page)=================
    Header 2
    <?start:body?>
    Page 2
    <?end: body?>
    Footer 2
    Worked like a charm.
    Klaus

  • Header and Footer display using XXL_FULL_API function module

    Hi All,
    I have a requirement that I have to display the Header and Footer in the XL file download usig the FM : XXL_FULL_API.
    Data Upload  for condition type is to be printed in the header.
    No. of the success and failure records will be printed in the footer.
    Can any one please let me know how can I achieve this?
    I have checked some of the threads and tried in sample programs I could not achieve it.
    Sample code is an added advantage.
    Thanks in advance.
    Abhilash.

    Answered.

  • Header and Footer Not Displayed

    I have created an rtf template and have a header and footer sections, but they are defined within the body with tags, e.g., <?template:header?> and <?end template?>. In the header section, for example, I then call <?call:header?> to display the header. When I preview the data in PDF from BI bublisher, everything is just fine. But, when I then register the template in Oracle Applications and run it as a concurrent program, the header and footer are not displayed at all in PDF output. It's as if the header and footer are totally being ignored. I even tried just putting plain text in the header and footer in the rtf template, but it's still being ignored. What could be the issue? I also tried increasing the header and footer margin area thinking that perhaps there's too much to display and I'm not giving enough space, but this didn't seem to help either. I'm working in a different instance as I have switched job. I have worked on other rtf templates and have integrated into Oracle Applications, but never run into this issue before. I've always been able to display header and footer. Could I need a patch of some sort or am I missing some setups that I'm not aware of?

    Have you verified that the XML/BI publisher version that the server is running is the same version as what you are running on the desktop? Not sure if this will make a difference, but worth a check.
    If they are the same, can you post the tags you are using exactly as they appear in your template?

  • Header and footer display too narrow in IE

    I'm working on a client website and have finished the basic template layout for all my pages. Everything displays beautifully in Safari, Opera, and Firefox, but in IE both the header and footer are narrower than the container. My header uses a background image which is 1000 px wide by 100 px high. The footer has a solid background color that is different from the color of container. The width of the container, header and footer are all set to 1000 px in the css. Any thoughts on what I can do to fix this? 

    Actually, it IS live on a test server, just not uploaded to the main server yet. I'm surprised (but happy) to hear it displays fine in an old version of IE. It isn't horrible in the newer version, but I'd like it to look the way it's supposed to, especially since it's for a client. Thanks for the heads up on the gallery tab - it doesn't make any sense since all the tabs are identical except for the actual text, but I'll look into it.

Maybe you are looking for