REPORT zhou.
DATA str(10) TYPE c VALUE 'print list'.
DATA: g_valid,
g_pripar LIKE pri_params,
g_arcpar LIKE arc_params.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
layout = 'X_65_132'
line_count = 65
line_size = 132
no_dialog = 'X'
immediately = space
new_list_id = 'X'
IMPORTING
out_parameters = g_pripar
out_archive_parameters = g_arcpar
valid = g_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF g_valid <> space AND sy-subrc = 0.
SUBMIT zhough3
WITH p_a = str
TO SAP-SPOOL
SPOOL PARAMETERS g_pripar
ARCHIVE PARAMETERS g_arcpar
WITHOUT SPOOL DYNPRO AND RETURN.
ENDIF.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REPORT zhough3.
PARAMETERS p_a(10) TYPE c.
WRITE p_a.