Skip to Content
0
Former Member
Jun 14, 2011 at 12:46 PM

print facility on hierarchical ALV - Problem

41 Views

Hi ,

I have develop a herarchical list ALV using REUSE_ALV_HIERSEQ_LIST_DISPLAY.

The output is correct as well as the behaviour of the whole ALV.

Our customer need to print the ALV on paper. So the ALV become a normal ABAP list in this case.

The problem appear when you choose the print button on the dynpro status. Please note this is the common print icon on the status bar and not an add-on button on the ALV toolbar.

When we preee the print button the usual printer selection popup appear askin you to confirm/change some print parameters.

We need to change printer name and page layout (according to printer capabilities).

The example below is my attemp to fullfil the ALV structure in order to push printer name and page format, but without success. Seems the device shounw as weel as other params are the user default and not mine.

Any suggestion?

w_pri_params-paart = 'X_65_200'. "PAGE FORMAT

w_pri_params-PRNEW = 'X'.

w_pri_params-pdest = 'LOCL'. ">----NAME OF THE PRINTER

w_pri_params-LINCT = '65'.

w_pri_params-LINSZ = '200'.

w_pri_params-PRBIG = ''.

w_print_ctrl-pri_params = w_pri_params.

gs_print-print_ctrl = w_print_ctrl.

CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

EXPORTING

i_callback_program = g_sav_repid

I_CALLBACK_PF_STATUS_SET = 'STATUS'

  • I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

is_layout = g_tty_layout

it_fieldcat = g_tty_fieldcat[]

  • IT_EXCLUDING =

  • it_special_groups = gt_sp_group[]

it_sort = g_tty_sort[]

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • i_default = g_default

i_save = 'A'

is_variant = g_tty_variant

it_events = g_tty_eventcat[]

  • IT_EVENT_EXIT =

i_tabname_header = 'TALV_H'

i_tabname_item = 'TALV_P'

is_keyinfo = gs_keyinfo

is_print = gs_print

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

TABLES

t_outtab_header = talv_h

t_outtab_item = talv_p.