01-08-2007 1:50 PM
hi
i want to get List of the called print parameter by using the FM GET_PRINT_PARAMETERS. i m not getting which are the essential parameters that i will have to set for gettin this as output.plz can any one tell me this....
thnx
01-08-2007 1:54 PM
See this sample code and change accordingly
*Print parameter declarations
DATA: val(1) TYPE c,
pripar TYPE pri_params,
arcpar TYPE arc_params,
lay TYPE pri_params-paart,
lines TYPE pri_params-linct,
rows TYPE pri_params-linsz.
lay = 'X_65_255'.
lines = 255.
rows = 65.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = arcpar
in_parameters = pripar
layout = lay
line_count = lines
line_size = rows
no_dialog = 'X'
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
valid = val
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
Reward if useful
01-08-2007 1:56 PM
Hi ,
Try this.
DATA:L_PARAMS TYPE PRI_PARAMS,
L_VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
IMMEDIATELY = ' '
LINE_SIZE = 220
RELEASE = 'X'
MODE = 'CURRENT'
NO_DIALOG = ' '
IMPORTING
OUT_ARCHIVE_PARAMETERS =
OUT_PARAMETERS = L_PARAMS
VALID = L_VALID
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG.
write : 'print'.
NEW-PAGE PRINT OFF.
Regards,
Bhavana
01-08-2007 2:24 PM
HI,
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
IMMEDIATELY = 'X'
LINE_SIZE = 220
RELEASE = 'X'
MODE = 'CURRENT'
NO_DIALOG = 'X'
IMPORTING
OUT_ARCHIVE_PARAMETERS =
OUT_PARAMETERS = L_PARAMS
VALID = L_VALID
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
Regards
Sudheer
01-08-2007 2:33 PM
call the pattern for GET_PRINT_PARAMETERS, you will get what are compulsory parameters.
e.g.;-
call function 'GET_PRINT_PARAMETERS'
EXPORTING
copies = 1
department = 'SYSTEM'
destination = 'LOCL'
expiration = 2
immediately = ' '
layout = 'X_65_255'
line_count = 65
line_size = 255
list_name = 'SPOOL ANME'
list_text = 'Spool Text'
mode = ' '
new_list_id = 'X'
no_dialog = 'X'
receiver = 'SAP*'
release = 'X'
sap_cover_page = 'X'
user = sy-uname
IMPORTING
out_parameters = l_params
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
case sy-subrc.
when 1.
raise get_print_info_not_found.
when 2.
raise get_print_invalid_prt_params.
when 3.
raise get_print_invalid_arch_params.
when 4.
raise get_print_others.
endcase.