on 01-04-2016 9:54 PM
Hi all,
I have a requirement of sending a spool file generated in a background job via email as a PDF document. The Program uses Function Module,
CONVERT_ABAPSPOOLJOB_2_PDF to convert the spool file to PDF format and send the email using Function Module,
SO_DOCUMENT_SEND_API1. If I use line count as 60 for the Report, the spool file shows 60 lines in a page and the email PDF also displays all the lines in the spool file. When I use line count as 90 in the Program for the Report, the spool file shows 90 lines in a page, but the email PDF gets cut off at a certain number of lines in the first page and the second page of PDF does not display the lines that got cut off.
How can I display all the 90 lines in a page in the PDF file similar to the spool file?
For example, spool file is displayed as,
Page 1
111
222
333
444
Page 2
555
666.
The PDF in the email is displayed as,
Page 1
111
222
333
Page 2
555
666.
Here is a summary of the function calls.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = ' '
dst_device = 'LOCL'
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
...
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = TG_RECLIST
EXCEPTIONS
....
Thanks,
Anjana
Just for logging purposes --- I was able to solve the issue. Even though when submitting the Report, I was specifying an output device whose settings were the one I needed, the system was automatically changing the output device to another default one since the default output device on my user profile settings was blank. I changed the setting to point to the output device with correct settings for the Report and which resulted in Report printing out with all the lines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.