Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Emailing output using type M printer

Former Member
0 Likes
673

i just recently set up a new printer of type M. When i use it with a spool dialog, all is well. i put in the printer id, and it pops up and asks for the email address. the system converts the spool to PDF and emails it, no problem. The problem is when i dont want a spool dialog, such as when i use a submit statement to run the report. i have looked through the forums, and everyone suggests converting the spool list to PDF, then sending the PDF. i dont want to do this, since i already have a printer that does it for me!

i looked for someplace in the PRI_PARAMS for a email address, but the only field is PRREC, which requires an SAP user ID. I am trying to send to external, non-sap email addresses which again, works fine if i use the print dialog. is there NO WAY to specify an external email address for the submit statement???

3 REPLIES 3
Read only

Former Member
0 Likes
591

Try this:

*write a list into spool

CALL FUNCTION 'GET_PRINT_PARAMETERS'

IMPORTING

out_parameters = print_parameters

valid = valid

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3

others = 4.

if sy-subrc <> 0.

message e105 with 'GET_PRINT_PARAMETERS'.

elseif valid is initial.

return.

endif.

new-page print on parameters print_parameters no dialog.

*now begin to write:

write: / sy-vline,

'CARRID', 10 sy-vline,

'CARRNAME', 35 sy-vline,

'CURRCODE', 46 sy-vline.

Read only

0 Likes
591

thanks for the answer, but it does not address the problem. the problem is specifying an email address for an external internet email address in the print parameters. i KNOW how to get the parameters, i just cannot find a method to send the report via email, using printer type M, except to a SAP user ID.

Read only

Former Member
0 Likes
591

took care of it myself