I feel like this should have been reported to SAP OSS if that's standard program...
Or are you trying to ask how can custom ABAP report take over default output device from User profile for List output? Then you should have searched first, because it's a fairly basic question. On the other hand, SCN discussions on this topic have been littered by folks neglecting to search for solution themselves before posting, so here goes - this little program illustrates how to get default output device:
DATA: gf_valid TYPE abap_bool ,
gs_pri_params TYPE pri_params.
CALLFUNCTION'GET_PRINT_PARAMETERS'
EXPORTING
no_dialog = abap_true
IMPORTING
out_parameters = gs_pri_params
valid = gf_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
write: gs_pri_params-pdest .
Yes, the IMPORTING parameter VALID must unfortunately be supplied.
If the program prints something other than ABAP list (some kind of form, for example), the above code may be inapplicable... The SET/GET parameters to set user print defaults for some of the form output (SAP Print Workbench Forms) can be found in this SAP OSS Note 131277 - Print parameters default values.
cheers
Jānis
Message was edited by: Jānis B