Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

print alv and output the text of top of page in fixed position

Former Member
0 Kudos
58

hi expert

i wannt output an alv with top of page, and the text of top of page will output at fixed position . and the whole alv inculding top and grip can been print into Sp00l

Appreciated the help provided

Thank you

Kevin

3 REPLIES 3

Former Member
0 Kudos
38

Hi Kevin,

It is not possible to fixed the length on to-of-page. You need to do some trial and error and also the top of page will not be printed with ALV. You need to code for it.

Regards,

Atish

0 Kudos
38

really no solution exist?

Former Member
0 Kudos
38

Hello,

Check out and try this code. This how i did when i had arequirement.

Reward if helpfull.

Rakesh



DATA: it_std_events  TYPE slis_t_event.
DATA: is_events  LIKE LINE OF it_std_events.
DATA: hline      TYPE slis_listheader.
DATA: it_std_listheader  TYPE slis_t_listheader.


is_events-name = 'TOP_OF_PAGE'.
is_events-form = 'TOP_OF_PAGE'.

APPEND is_events TO it_std_events.

*Heading for the ALV output
  hline-info = text-001.  "You can enter ur text for heading here
  hline-typ = 'H'.
  APPEND hline TO it_std_listheader.

  hline-info = text-002. "You can enter your subheading
  hline-typ  = 'S'.
  APPEND hline TO it_std_listheader.


*-------------------------------------------------------------------------------------------------------

*This should be there in code with out any perform


FORM top_of_page.

  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = it_std_listheader
      i_logo             = 'ENJOY_SAPLOGO'.


The alv function module should be like this,

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                = ' '
*   I_BUFFER_ACTIVE                   = ' '
     i_callback_program                = sy-repid
*   I_CALLBACK_PF_STATUS_SET          = ' '
*   I_CALLBACK_USER_COMMAND           = ' '
*   I_CALLBACK_TOP_OF_PAGE            = ' '
*   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
*   I_GRID_TITLE                      =
*   I_GRID_SETTINGS                   =
     is_layout                         = is_layout
     it_fieldcat                       = it_std_fcat
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS                 =
*   IT_SORT                           =
*   IT_FILTER                         =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
*   I_SAVE                            = ' '
*   IS_VARIANT                        =
   it_events                         = it_std_events
*   IT_EVENT_EXIT                     =
*   IS_PRINT                          =
*   IS_REPREP_ID                      =
*   I_SCREEN_START_COLUMN             = 0
*   I_SCREEN_START_LINE               = 0
*   I_SCREEN_END_COLUMN               = 0
*   I_SCREEN_END_LINE                 = 0
*   IT_ALV_GRAPHICS                   =
*   IT_HYPERLINK                      =
*   IT_ADD_FIELDCAT                   =
*   IT_EXCEPT_QINFO                   =
*   I_HTML_HEIGHT_TOP                 =
*   I_HTML_HEIGHT_END                 =
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER           =
*   ES_EXIT_CAUSED_BY_USER            =
    TABLES
      t_outtab                          = it_std_display
   EXCEPTIONS
     program_error                     = 1
     OTHERS                            = 2