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

Print priview -Alv grid layout display

Hi All,

I am using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

It is working fine and i am getting output ,but after i have got output if i select(press) print priview button the program is going to Dump.

I am passing below parameters :

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = w_repname

  • 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 = e_alv_layout1

IT_FIELDCAT = i_catlog1[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

I_DEFAULT = C_A

  • I_SAVE = ' '

  • IS_VARIANT =

IT_EVENTS = i_alv_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

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = T_BSIS

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

Is any other parameters should be pass for print priview and other icons. in this FM.

Thanks

Sridhar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jan 22, 2008 at 07:39 AM

    Hi Sridhar,

    I guess you need to pass value to I_CALLBACK_USER_COMMAND = ' ' parameter.

    Regards,

    Vishal.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 07:51 AM

    Hi ,

    Please follow the below Code . if you have all events implemented in your Code and compare for the Print event .

    DATA: gt_events type slis_t_event,

    gd_prntparams type slis_print_alv.

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = gd_repid

    i_callback_top_of_page = 'TOP-OF-PAGE'

    is_layout = gd_layout

    it_fieldcat = fieldcatalog[]

    it_events = gt_events

    is_print = gd_prntparams

    i_save = 'X'

    tables

    t_outtab = it_ekko

    exceptions

    program_error = 1

    others = 2.

    perform build_events.

    perform build_print_params.

    &----


    *& Form BUILD_EVENTS

    &----


    • Build events table

    ----


    form build_events.

    data: ls_event type slis_alv_event.

    call function 'REUSE_ALV_EVENTS_GET'

    exporting

    i_list_type = 0

    importing

    et_events = gt_events[].

    read table gt_events with key name = slis_ev_end_of_page

    into ls_event.

    if sy-subrc = 0.

    move 'END_OF_PAGE' to ls_event-form.

    append ls_event to gt_events.

    endif.

    read table gt_events with key name = slis_ev_end_of_list

    into ls_event.

    if sy-subrc = 0.

    move 'END_OF_LIST' to ls_event-form.

    append ls_event to gt_events.

    endif.

    endform. " BUILD_EVENTS

    &----


    *& Form BUILD_PRINT_PARAMS

    &----


    • Setup print parameters

    ----


    form build_print_params.

    gd_prntparams-reserve_lines = '3'. "Lines reserved for footer

    gd_prntparams-no_coverpage = 'X'.

    endform. " BUILD_PRINT_PARAMS

    &----


    *& Form END_OF_PAGE

    &----


    form END_OF_PAGE.

    data: listwidth type i,

    ld_pagepos(10) type c,

    ld_page(10) type c.

    write: sy-uline(50).

    skip.

    write:/40 'Page:', sy-pagno .

    endform.

    &----


    *& Form END_OF_LIST

    &----


    form END_OF_LIST.

    data: listwidth type i,

    ld_pagepos(10) type c,

    ld_page(10) type c.

    skip.

    write:/40 'Page:', sy-pagno .

    endform.

    Reward points if it is usefull ....

    Girish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 07:55 AM

    hi

    good

    If you look at the parameters,you can see more options in GRID.The following are those extra options which you cannot see in LIST.

    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 =

    IT_ALV_GRAPHICS =

    IT_ADD_FIELDCAT =

    IT_HYPERLINK =

    I_HTML_HEIGHT_TOP =

    I_HTML_HEIGHT_END =

    IT_EXCEPT_QINFO =

    If the caller specifies an EXIT routine, this routine must have the following form:

    FORM top_of_page.

    Module REUSE_ALV_COMMENTARY_WRITE can then be called within the EXIT routine. This module is responsible for formatting the header information and also ensures online HTML formatting. In the print preview or in batch mode, the text passed is then output in the normal format.

    If module REUSE_ALV_COMMENTARY_WRITE cannot be used, you must use two parameters instead. In I_CALLBACK_TOP_OF_PAGE you pass the form routine that is responsible for normal formatting in batch mode or in the print preview mode. The form routine that is responsible for online formatting, is passed in parameter I_CALLBACK_HTML_TOP_OF_PAGE. If one of these parameters is not filled, top-of-page is not output in the respective mode.

    thanks

    mrutyun^

    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.