Skip to Content
author's profile photo Former Member
Former Member

Block ALV: New-page, Page No after each block, TOP-OF-PAGE

Hi All,

I am using block ALV to show 4 blocks in one report.

I want these functionalities in that:

1. TOP-OF-PAGE above all the blocks ie main top-of-page

I want a main top-of-page above all the blocks. This will be

different from top-of-page wrt every block,

like commentry_write in normal alv.

2. After every block i want to trigger a new-page for next block.

3. After every block i want Number of pages for that block to be

printed at end-of-page of that block.

Please provide answers to these. Points assured.

Thanks.

Vinod.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 22, 2008 at 05:58 AM

    Hi Debarish,

    I want a main top-of-page, not for every blocks.

    Like this:

    Main Heading

    Company: XX

    Report Name:

    Current date: XX

    Block 1

    Block2

    .

    .

    .

    Vinod.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Verry well then just do the way I said once and pass the it_event to your first alv block fm.

      i.e only one top.

      and in it write the way you want i.e. Main Heading

      Company: XX

      Report Name:

      Current date: XX

      Regards

      Debarshi

  • author's profile photo Former Member
    Former Member
    Posted on Oct 22, 2008 at 05:44 AM

    Hello,

    I think using Blocked alv we can dispaly multiple blocks it is not possible to display multiple top-of-pages.

    So better you use normal output display i.e. without alv go for wirte statements.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 22, 2008 at 05:46 AM

    hI,

    For top of page do like this...

    
    data:       it_evt_fl1 TYPE slis_t_event,
                 it_evt_fl2 TYPE slis_t_event,
                 is_events   TYPE slis_alv_event.
    
    
      is_events-name ='TOP_OF_PAGE'.
      is_events-form ='TOP1'.
      APPEND is_events TO it_evt_fl1.
      CLEAR is_events.
      is_events-name ='TOP_OF_PAGE'.
      is_events-form = 'TOP2'.
      APPEND is_events TO it_evt_fl2.
    
    then...give the headings
    
    *&      Form  top1
    *&--------------------------------------------------------------------*
    *       text
    *---------------------------------------------------------------------*
    FORM top1.
      SKIP.
      WRITE:/20 'your text'(025) COLOR 5.
    *  WRITE:/20  'your text'(024) COLOR 4.
    ENDFORM.                                                    "top1
    
    
    *&---------------------------------------------------------------------*
    *&      Form  top2
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    FORM top2.
      SKIP.
      WRITE:/20 'your text'(026) COLOR 5.
    *  WRITE:/20  'your text'(024) COLOR 4.
    ENDFORM.                                                    "top2
    
    
    
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                        = it_layout
          it_fieldcat                      = it_fcat
          i_tabname                        = 'IT_FINAL_D2'
          it_events                        = it_evt_fl1
    *    IT_SORT                          =
    *    I_TEXT                           = ' '
        TABLES
          t_outtab                         = it_final_d2
      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_APPEND'
        EXPORTING
          is_layout                        = it_layout
          it_fieldcat                      = it_fcat
          i_tabname                        = 'IT_FINAL_D2'
          it_events                        = it_evt_fl2
    *    IT_SORT                          =
    *    I_TEXT                           = ' '
        TABLES
          t_outtab                         = it_final_d2
      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.
    
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 22, 2008 at 09:33 AM

    One problem has been solved..

    Now can anyone guide me for

    Number of pages and new page for after each block.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.