Spool pdf email
I converted the spool to pdf mailed the pdf form. i got the mail and when i tried to open the pdf form it is showing a popup ''the file is damaged and could not be repaired".
Hi
i did the same thing in ABAP web dynpro. below is the code.
data LX_pdf type xstring.
CALL FUNCTION 'ZBAPIGETPDF_CONVERSION_DATA'
IMPORTING
EX_PDF = LX_pdf
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'Hello.PDF'
i_content = lx_pdf
i_mime_type = 'application/pdf'
i_in_new_window = 'X'
i_inplace = 'X' ).
<b>Code for FM zbapigetpdf_conversion_data</b>
FUNCTION zbapigetpdf_conversion_data.
""Local Interface:
*" EXPORTING
*" VALUE(EX_PDF) TYPE XSTRING
DATA: pdfdata TYPE STANDARD TABLE OF tline INITIAL SIZE 0,
tline TYPE tline.
CALL FUNCTION 'ZBAPIGETPDF_OUTPUT_TABLE_DATA'
EXPORTING
spoolno = '28216'
IMPORTING
RETURN =
TABLES
pdfdata = pdfdata
field-symbols <X>.
data: st(268) type c.
data l1 type i.
data len type i.
data maxline type i value 134.
l1 = 0.
loop AT pdfdata INTO tline.
clear st.
st+l1(maxline) = tline.
len = maxline + l1.
l1 = maxline - strlen( tline ).
ASSIGN st TO <x> TYPE 'X'.
CONCATENATE ex_pdf <x>(len) INTO ex_pdf IN byte MODE .
endloop.
ENDFUNCTION.
<b>Code for zbapigetpdf_output_table_data</b>
FUNCTION zbapigetpdf_output_table_data.
""Local Interface:
*" IMPORTING
*" VALUE(SPOOLNO) TYPE ZSMARTFORMINPUT2-SPOOL_ID OPTIONAL
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRETURN
*" TABLES
*" PDFDATA STRUCTURE TLINE OPTIONAL
DATA: v_spoolid TYPE tsp01-rqident.
vspool(10) VALUE '4904'.
DATA otf LIKE itcoo OCCURS 100 WITH HEADER LINE.
DATA cancel.
DATA pdf LIKE tline OCCURS 100 WITH HEADER LINE.
DATA doctab LIKE docs OCCURS 1 WITH HEADER LINE.
DATA: numbytes TYPE i,
arc_idx LIKE toa_dara,
pdfspoolid LIKE tsp01-rqident,
jobname LIKE tbtcjob-jobname,
jobcount LIKE tbtcjob-jobcount.
spoolno = '28216'.
v_spoolid = spoolno.
*SPOOLNO = 4904.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = v_spoolid
NO_DIALOG = 'X'
DST_DEVICE =
pdf_destination = 'C:\File.pdf'
IMPORTING
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
OTF_PAGECOUNT =
btc_jobname = jobname
btc_jobcount = jobcount
TABLES
pdf = pdfdata[]
EXCEPTIONS
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11.
*refresh pdfdata[].
*pdfdata-tdformat = 'hello pawan'.
*append pdfdata.
ENDFUNCTION.
Its working for me.
Regs
Manas.
Pls reward points.
Similar Messages
-
Hello,
I'm getting frustrated with a ALV issue.
My report creates a ALV grid which I'm able to print to spool, afterwards create a PDF and finally send to a specific email adress with the PDF attached.
What I'm wondering is, why when calling 'REUSE_ALV_GRID_DISPLAY' I'm getting this print parameter dialog.
Moreover calling function 'SET_PRINT_PARAMETERS' has no effect to the parameters showing in the dialog?!
As I finally want to run this report within a scheduled job I do not want that popup.
I now read the forum entires for half a day, tried almost everything, but without success.
Maybe someone can help with my code?
* Declaration section
DATA: itab_feldkatalog TYPE slis_t_fieldcat_alv,
wa_feldkatalog TYPE line of slis_t_fieldcat_alv,
gs_layout TYPE slis_layout_alv,
gs_print TYPE SLIS_PRINT_ALV.
* output as PDF eMail
g_repid = sy-repid.
CALL FUNCTION 'SET_PRINT_PARAMETERS'
EXPORTING
* destination = 'LOCL' " Printer
layout = 'X_65_200' " Format
line_count = '65' " Line Count
line_size = '200' " Line Size
in_parameters = gs_print-print_ctrl-pri_params.
* Print parameters
gs_print-print = 'X'.
gs_print-prnt_title = 'X'.
gs_print-no_coverpage = 'X'.
gs_print-no_print_listinfos = 'X'.
gs_print-no_print_selinfos = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_top_of_page = 'TOP_OF_PAGE_SETUP'
I_GRID_TITLE = 'Risk MM Report'
I_SAVE = 'A'
IT_FIELDCAT = itab_feldkatalog
is_layout = gs_layout
IS_VARIANT = is_variant
IS_PRINT = gs_print
TABLES
T_OUTTAB = t_inv_cond.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
perform pdf_email. " create PDF and send by email
Thanks a lot!Thanks for your help.
This modifications solved my problem!
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
immediately = ' '
line_size = 220
release = 'X'
mode = 'CURRENT'
no_dialog = 'X'
IMPORTING
out_parameters = gs_print-print_ctrl-pri_params
valid = gv_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
NEW-PAGE PRINT ON PARAMETERS gs_print-print_ctrl-pri_params NO DIALOG.
* Print parameters
gs_print-print = 'X'.
gs_print-prnt_title = 'X'.
gs_print-no_coverpage = 'X'.
gs_print-no_print_listinfos = 'X'. " display no listinfos
gs_print-no_print_selinfos = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_top_of_page = 'TOP_OF_PAGE_SETUP' " Ref. to form
I_GRID_TITLE = 'Risk MM Report'
I_SAVE = 'A'
IT_FIELDCAT = itab_feldkatalog
is_layout = gs_layout
IS_VARIANT = is_variant
IS_PRINT = gs_print
TABLES
T_OUTTAB = t_inv_cond.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
NEW-PAGE PRINT OFF. -
SPOOL PDF to application server
Hi
I want to write the spool pdf of a form to application server.
I am using 'convert_spool_to_pdf' FM and getting data in an internal table.
The data in this internal table is of different format, I am not sure how to write this data format to application server.
Please help.
Regards
ManuThis has been asked and answered before...did you search? PDF data is in binary format, so you need to adapt accordingly...
-
PDF is changing all my pdf documents into a word document - My boss sent me a pdf email through outlook and when I try to open it changes to a word document Help this is so frustrating
Hi tinam74565130,
That does sound frustrating! It sounds as though the filename associations have become confused on your computer. You should be able to reset that easily. Here are some instructions:
Change which programs Windows uses by default - Windows Help
How to change the default application for a file type | Macworld
Please let us know how it goes.
Best,
Sara -
How to print a pdf email attachment in android system
How to print a PDF email attachment
You need
- an application server JAVA with Adobe Document Service installed
- you need to configure the connection between that Java instance and your ERP system
https://www.sdn.sap.com/irj/sdn/adobe
Markus -
Hi,
I have a requirement where I need to send report to multiple ned user. The program runs daily once and generate one spool no daily. I have this spool no.
Can anyone tell me how to send this spool by email .
If FM SO_DOCUMENT_SEND_API1, how should I pass spool id.Hi
This is the sample code previously I achieved the same requirement.
FORM send_mail_2 USING msgid msgno msgv1.
mailuser oder Gruppe like sy-uname default 'Ruckerk'.
DATA: express_hold_time LIKE sovaltime.
DATA: text LIKE sotxtinfo.
DATA: receiver LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
MESSAGE ZF100 (FTP an UDB fehlgeschlagen)
text-msgid = msgid.
text-msgno = msgno.
text-msgv1 = msgv1.
text-msgv2 = ' '.
text-msgv3 = ' '.
text-msgv4 = ' '.
express_hold_time
express_hold_time-days = 01.
express_hold_time-h_min_sec = 240000.
receiver
receiver-receiver = mreceivr.
Gruppe von Empfängern
receiver-rec_type = 'C'.
und Expressmeldung ausgeben
receiver-express = 'X'.
APPEND receiver.
CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'
EXPORTING
msgid = text-msgid
msgno = text-msgno
msgv1 = text-msgv1
msgv2 = text-msgv2
msgv3 = text-msgv3
TABLES
receivers = receiver.
IF sy-subrc <> 0.
WRITE:/ 'hat nicht geklappt', 'SY-SUBRC =', sy-subrc.
ENDIF.
PERFORM print_error_report.
Fehlermeldung zum Abbrechen des Report's ausgeben.
MESSAGE e398 WITH 'Jobabbruch' msgv1.
ENDFORM. " SEND_MAIL_2
Regards,
kumar -
Error in SAPscript pdf email attachment
Hi All,
I have implemented the functionality in ABAP where I can send SAPscript output to user via pdf-email in its inbox.The functionality is working fine in Dev n Test system with no issues.As the form is moved into Prod system, the user is complaining that after opening the mail of pdf, a mail is sent to unknown, unexisting email id indicating that user opened the mail.As the email id is unexisting, the user receives back the mail of Delivery failure.
Please help in this.Rest is working fine.Hi Neeraj_C ,
I have also a same requirement . i don't know much about Script.Can you please send me the procedure how do u achieve this scenario . If u give the sample code of this scenario it will be very helpful for me.
Thanks & Regards,
Kumaran Duraiswamy. -
.pdf email attachments open in photoshop. How do I get them to open in Reader?
Hey,
.pdf email attachments open in photoshop. How do I get them to open in Reader?
thxYou need to change your file association to open .pdf files with Adobe Reader.
See http://windows.microsoft.com/en-us/windows/change-file-open-program#1TC=windows-7 -
Hi Friends,
I need expertise help in pdf email attachment. I have data in internal table which has to be sent as pdf mail attachment. I need help in converting the data to pdf format. After conversion I can use SO_NEW_DOCUMENT_ATT_SEND_API1 to send the mail.
Expect earliest reply.
Thanks,
NidhyaDear Friends,
Thanks for your reply, but I need help in converting the data in internal table to pdf.
Pls find my code below: With this code, I get email send with PDF attach, but the data inside the file is not in correct format.
Pls help me to correct.
DATA : mailrec LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
mailbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
mailbin1 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
mailhead LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_otf LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_pdf LIKE solisti1 OCCURS 0 WITH HEADER LINE,
mailstruc LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
maildata LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF i_sotf OCCURS 0.
INCLUDE STRUCTURE itcoo.
DATA : END OF i_sotf.
DATA : i_itcpo LIKE itcpo,
i_itcpp LIKE itcpp.
DATA : v_tlines TYPE i,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen.
maildata-obj_name = 'Document'.
maildata-obj_descr = 'Transfer Details'.
maildata-obj_prio = 1.
maildata-doc_size = strlen( mailtxt ).
mailstruc-head_start = 1.
mailstruc-head_num = 0.
mailstruc-body_start = 1.
mailstruc-body_num = 1.
mailstruc-obj_name = 'transfer'.
mailstruc-doc_type = 'RAW'.
APPEND mailstruc.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
APPEND mailrec.
CLEAR i_itcpo.
i_itcpo-tdgetotf = 'X'.
REFRESH mailbin.CLEAR mailbin.
WRITE 'Report Title:' TO mailbin-line+3.
WRITE sy-repid TO mailbin-line+18.
APPEND mailbin. CLEAR mailbin.
WRITE 'User : ' TO mailbin-line.
WRITE sy-uname TO mailbin-line+11.
APPEND mailbin. CLEAR mailbin.
WRITE 'Date of Report : ' TO mailbin-line+3.
WRITE sy-datum USING EDIT MASK mask MM/DD/YYYY TO mailbin-line+21.
APPEND mailbin. CLEAR mailbin.
WRITE 'Time of Report : ' TO mailbin-line+3.
WRITE sy-uzeit TO mailbin-line+21.
APPEND mailbin. CLEAR mailbin.
APPEND mailbin.
WRITE 'Transfer ' to mailbin-line+3.
APPEND mailbin. CLEAR mailbin.
APPEND mailbin.
WRITE sy-uline TO mailbin-line+3.
APPEND mailbin. CLEAR mailbin.
LOOP AT i_disp.
SHIFT i_disp-index LEFT DELETING LEADING '0'.
WRITE i_disp-index TO mailbin+3.
WRITE i_disp-pernr TO mailbin+6.
WRITE i_disp-ename TO mailbin+16.
WRITE i_disp-persk TO mailbin+57.
WRITE i_disp-btrtl TO mailbin+60.
APPEND mailbin. CLEAR mailbin.
ENDLOOP.
CALL FUNCTION 'SX_OBJECT_CONVERT_SCR_OTF'
EXPORTING
FORMAT_SRC = 'RAW'
FORMAT_DST = 'OTF'
DEVTYPE = 'POSTSCPT'
FUNCPARA = ''
LEN_IN = v_len_in
IMPORTING
LEN_OUT = v_len_out
TABLES
CONTENT_IN = mailbin
CONTENT_OUT = mailbin1
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH mailbin.
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
FORMAT_SRC = 'OTF'
FORMAT_DST = 'PDF'
DEVTYPE = 'POSTSCPT'
FUNCPARA =
LEN_IN = v_len_in
IMPORTING
LEN_OUT = v_len_out
TABLES
CONTENT_IN = mailbin1
CONTENT_OUT = mailbin
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH mailbin1.
DESCRIBE TABLE mailbin LINES v_tlines.
mailstruc-head_start = 1.
mailstruc-head_num = 0.
mailstruc-body_start = 1.
mailstruc-body_num = v_tlines.
mailstruc-transf_bin = 'X'.
mailstruc-doc_type = 'PDF'.
mailstruc-obj_name = 'Mid-month transfer'.
mailstruc-doc_size = v_tlines * 255.
APPEND mailstruc.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = maildata
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = mailstruc
OBJECT_HEADER = mailhead
CONTENTS_BIN = mailbin
RECEIVERS = mailrec
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
But i dont get the result in expected format. I am not getting first 2 characers of the line. instead of report, date, time in separate line I get everything in a single line as follows :
Report Title: ZHRPY0003
er : VACNIDHYA Date of Report : 02.05.2007 Time of Report
: 10:31:27 Mid-month Inter-Company Transfer
--- 1 00002609 Carla Pineda FT
2010
- 1 - -
Interactive PDF / Email marketing
I have a 20 page newsletter that I'm sending out through an eblast. I have several paragraphs in the eblast summarizing exciting points in the newsletter. What I'm trying to do is where it says "read more on page 14" in the eblast, have a link that takes the viewer directly to page 20 instead of just opening the generic PDF. I'm also trying to make it so in the PDF version where it says "story continued on page 4" the reader can click that and it will take them to page 4 instead of having to scroll through the newsletter manually. Our newsletters are hosted on our website so we usually link to the website like: www.website.org/newsletters/fall2009 and the newsletter opens from there.
Does anyone know how to make this happen? I've never done it before and haven't worked with this type of PDF/email marketing so I'm at a loss. If you have any suggestions please send links to detailed instructions and be detailed so I can figure it out!You will have to set up bookmarks and links to those bookmarks. Several folks should be around tomorrow who are good at this type of action, so please be patient.
-
My PDF email attachments open in Microsoft Word and can't be read. How can I open PDF attachments in Adobe without first having to do a 'Save As'? I have Adobe on my laptop.
nyrozzie wrote:
My PDF email attachments open in Microsoft Word and can't be read. How can I open PDF attachments in Adobe without first having to do a 'Save As'? I have Adobe on my laptop.
The problem is a file association.
If you are using Verizon's webmail then you need to fix the file association in your web browser.
If you are using an email client (Outlook, Outlook Express, Thunderbird, etc.) you need to fix the file association in your computer (varies as to how based on OS and client).
If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem. -
PDF email archives: How to selectively re-export to new archive/.pst?
A while back, I made PDF email archives of a variety of Outlook folders, and eventually deleted the Outlook messages in question.
Now, unfortunately, I am wishing I had not. So, a few "save the day" type of questions:
1) Can I convert an entire PDF email archive, or portions of an archive, back into Outlook format? How? (If you know the answer to this, ignore the rest!)
2) Can I selectively search a PDF email archive, and then group-export the messages displayed in the search results into a separate PDF email archive? How? I can manage to use the filters to select a group of messages, but I can't manage to re-export them to a new archive or a PDF portfolio.
thanks,
ErikIt cannot be done in InDesign, but, as you surmised in Acrobat.
You'll need to ask in the Acrobat forums. I don't know of any changes like that in Acrobat DC but because I don't program in JavaScript, I might have overlooked it. Try one of these forums:
Creating, Editing & Exporting PDFs
Rich Media & 3D -
PDF Email Creation for Clients
Hi, I would like to create a PDF email form that I can then hand over to a client that only has the free acrobat reader. If I create a form with his email address, will he be able to view, save and print the completed/submitted forms?
I seem to be going back and forth on whether or not to scrap this idea and build him an HTML form on my website and then just add a PDF download link for the people that want to print and snail-mail.I guess I just answered my own question. My solution will be to Enable Usage Rights and delete the "submit by email" button. Then my client will instruct them to save the file and return it in a reply email.
-
Pdf email attachments won't open
After upgrading to IOS 7 the pdf email attachments are not opening...just says "loading" and never loads.
Hi DVFFTI,
I'm not sure from your description if you're having the same problem I was having.
In my case, PDF attachments would only display as a single image of the first page of the PDF.
The only option I had was to Copy or Save the image. I couldn't open a preview of the full PDF in Mail or tap to 'Open in...' a different app.
Turns out that I had too many apps on my iPhone that can read PDFs, for example, Dropbox, Evernote, iBooks, Kindle, etc. even a Canon app for remote printing.
Removing one of them fixed the issue for me.
I remember this happening before and seeing other threads about this, so I don't think it's specific to iOS 7.
Give it a go and see if it fixes your problem. Hope it helps. -
Why cant i read PDF email toake copies why is my pdf turned off or stop working
why cant I read PDF email to make copies why is my PDF turned off or stoppd working [email address removed]
You really need to provide some information if you expect anybody to help you.
Maybe you are looking for
-
Error in Deploying CMP Bean!!!
i'm writing a CMP Bean. i wrote the Bean , home and remote interfaces. i'm using weblogic 7.0 as my application server. 1. what is the default data base for the weblogic 7.0. 2. should v create any table while deploying the CMP bean in a database. i
-
JBI Installation Error on Windows
The problem: JBI default install fails on windows. We have solved the problem with a workaround, listed below. Our configuration is: * JBI 1.0 * Application server Q2 * Windows 2000 We get the following symptoms: * After JBI is installed, the applica
-
LSO online tests via offline player
Hello, Is it possible to use the offline player to download the test and make it locally? When I look in the help provided with offline player I can see that it only mentions WBT. Hubert Edited by: Hubert Cieplak on Feb 5, 2008 4:50 PM
-
Barcode is not printing but it appears alright in preview
Hi Guys I am trying to print a barcode in sap script. Barcode is coming perfect in print preview but it is not appearing in Printing. It is displaying the value for of the variabke for which i m trying to print the barcode in printing. Do certain set
-
just recently mu computer will no longer play videos or display some pictures and it says blocke plug in. I have an old Mac Book, version 10.6.8 safari version 5.1.10