Send email in pdf format
i have a function which returns purchase orders list.
in my program i want my program sends the purchase order document through email in pdf format when i select an order from the list.
how can i do that.
This reference program might help:
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Similar Messages
-
BEx Broadcast - Not able to send email as PDF attachment
Hi All,
We have BI 7.0 and EP 7.0 of SP12.
From BEx broadcasting we couldnt able to send email in PDF format, but other format like HTML, Link, MHTML can able to send
It gives error like
<b>Error:java.lang.ArrayIndexOutOfBoundsException
Error occured during the processing of framework class CL_RSRC_PRODUCER_PRECALC, type, PROD</b>
Pls give me some input on this regard
Thanks
Karthik<b>Prerequisites -</b> You selected Broadcast to Printer as the distribution type when you created the broadcast setting.
http://help.sap.com/saphelp_nw2004s/helpdata/en/13/f76f422f91c153e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/bf/220c40ac368f5ce10000000a155106/content.htm
<b>Configuration - Broadcasting</b>
http://help.sap.com/saphelp_nw2004s/helpdata/en/84/30984076b84063e10000000a1550b0/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=4204837&messageID=2091321
https://forums.sdn.sap.com/click.jspa?searchID=4204809&messageID=2816847
Some Insights-
The PDF printing can be done from a BEx Web Application, BEx Web Analyzer, or BEx Report Designer. There are no current plans to make this available in the BEx Analyzer.
From the BEx Analyzer, you can use the "launch in web" functionality to then initiate print to PDF.
Hope it Helps
Chetan
@CP.. -
To send output as email in PDF format
I am using Function module <b>so_new_document_att_send_api1</b> to send my report output as Email.
Please tell me how to send it in PDF format.1) FIRST GENERATE SPOOL REQUEST for ur output THEN DOWNLOAD this spool request to a PDF file via REPORT PROGRAM - RSTXPDFT4 .
2) then use this program to send this PDf via mail (also see ur SCOT setttings) -
*& Report ZGILL_SENDMAIL_PDF *
REPORT ZGILL_SENDMAIL_PDF .
INCLUDE ZGILL_INCMAIL. "SEE BELOW FOR INCLUDE PROGRAM CODE.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case DEFAULT '[email protected]'.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY DEFAULT 'C:\TEMP\SALARY_SLIP1.PDF'.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
*********************iNCLUDE pROGRAM********************************************
*& Include ZGILL_INCMAIL *
Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
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 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
**********************INCLUDE END******************************** -
Send spool id output (sap script) via email in PDF format
Dear friends,
Looking for sample program to send spool id output of sapscript via email in PDF format.
Regards,
Praveen LoboHi,
Try this code..
* Parameters.
PARAMETERS: p_email(50) LOWER CASE.
PARAMETERS: p_spool LIKE tsp01-rqident.
* Data declarations.
DATA: plist LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: document_data LIKE sodocchgi1.
DATA: so_ali LIKE soli OCCURS 100 WITH HEADER LINE.
DATA: real_type LIKE soodk-objtp.
DATA: sp_lang LIKE tst01-dlang.
DATA: line_size TYPE i VALUE 255.
DATA: v_name LIKE soextreci1-receiver.
DATA rec_tab LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
* Get the spool data.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = p_spool
first_line = 1
last_line = 0
desired_type = ' '
IMPORTING
real_type = real_type
sp_lang = sp_lang
TABLES
buffer = so_ali
EXCEPTIONS
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
OTHERS = 8.
* Check the return code.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'Error'.
LEAVE LIST-PROCESSING.
ENDIF.
* Prepare the data.
plist-transf_bin = 'X'.
plist-head_start = 0.
plist-head_num = 0.
plist-body_start = 0.
plist-body_num = 0.
plist-doc_type = 'RAW'.
plist-obj_descr = 'Spool data'.
APPEND plist.
plist-transf_bin = 'X'.
plist-head_start = 0.
plist-head_num = 0.
plist-body_start = 1.
DESCRIBE TABLE so_ali LINES plist-body_num.
plist-doc_type = real_type.
* Get the size.
READ TABLE so_ali INDEX plist-body_num.
plist-doc_size = ( plist-body_num - 1 ) * line_size
+ STRLEN( so_ali ).
APPEND plist.
* Move the receiver address.
MOVE: p_email TO rec_tab-receiver,
'U' TO rec_tab-rec_type.
APPEND rec_tab.
IF NOT sp_lang IS INITIAL.
document_data-obj_langu = sp_lang.
ELSE.
document_data-obj_langu = sy-langu.
ENDIF.
v_name = sy-uname.
* Subject.
document_data-obj_descr = 'Spool attached'.
* Send the email.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = document_data
sender_address = v_name
sender_address_type = 'B'
TABLES
packing_list = plist
contents_bin = so_ali
receivers = rec_tab
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 e208(00) WITH 'Error in sending email'.
ENDIF.
COMMIT WORK.
* Send the email immediately.
SUBMIT rsconn01
WITH mode = 'INT'
AND RETURN.
* Success message.
MESSAGE s208(00) WITH 'Email sent'.
Thanks
Naren -
Send collective invoice via (Single mail)email in pdf format
Hi All,
Please suggest me the solution option for the below requirement.
The requirement is to send collective invoice to the customer via email in PDF format in a single email at the end of the day.ie they like to have a tool where they
can enter the output type,date and other relavant info and the program should collect all the invoice and convert it to PDF and send it in single mail to customer.
Please let me know i can use any Standard tool for this purpose.ALso is it possible to write a Zprogram reprocess the output type by using any FM?
Also suggest if you have any feasible solutions.
Regards
RajaHi All,
thanks for your comments. Sorry its my mistake that i have asked in general.
I am looking for the following options.
1. Any stanard program which can be used partially for my requirement?
2. If i have to go for a new tool, then i should write a code for reprocess the output types and then convert in to one single PDF and then send it to customer in one single email.
Here i am struck how to write an program to reprocess the ouput types? i hope the next steps can be easily implemented evenhough some watch outs are there like 'how to make a single PDF file' and some technical constraints like max size that can be send.
Thanks and let me know your inputs.
Regards,
Raja -
Sending emails in PDF & TXT format generated by SAP script/Smart forms
Hi
We have a requirement to configure SMTP node to send emails in PDF & TXT format. Currently, Output format for SAP Documents generated by SAP Script/Smart Forms configured in PDF. (Tx - SCOT - SMTP Node - Intetnet - Output Forms for SAP Documents). But, We also like to send emails in TXT format for other application in the same system. I see that you can send emails generated by SAP Script/Smart Forms either in PDF or TXT format not both.
Is it possible to send the emails in both the formats by configuring in Tx SCOT?
Your inputs will be appreciated.
Regards
ChanduHi chandu,
1. emails in both the formats by configuring in Tx SCOT ?
Scot will allow only ONE AT A TIME.
2. The other workaround is,
that using some FM
convert the OTF (sapscript/smartform)
data to TEXT,
and send it as RAW
3. Configure RAW = TEXT in scot.
regards,
amit m. -
I would like to build a drag n drop interface and have the results sent to my email in PDF format. Is this possible?
Captivate is not really designed to do what you want in this instance. It's more targeted at allowing a user to complete an assessment and then track whether or not they passed. So it's only really set up to send information in a format that the LMS will understand and interpret as Pass/Faill and what the score was.
You really need something more flexible than that. So I think you would need to get a programmer involved and have the solution custom made. In my experience, any time you try to diverge Captivate from what it was designed to do, and you need to get other IT professionals involved, you can kiss thousands of dollars goodbye before you have a workable solution. -
Customization of DAC to send emails in XML format
Hi,
We need to customize DAC to send emails in XML format to the support team whenever there is a failure of the ETL load.
We use the HPSC ticketing system.
Any help to achieve this functionality is much appreciated.
we have tried to customize the existing email template of DAC, but it is not serving the purpose to generate the ticket in HPSC.
To generate the HPSC ticket, we have a XML format. We need to customize DAC to use this format.
This is the version of Oracle BI application we are using:
Build: 10.1.3.2.1.070411.1900
Release Version: Oracle Business Intelligence 10.1.3.2.1
Package: 070411.1900
Build: 7.9.1.032307.0900
Release Version: Oracle Business Intelligence Applications 7.9.1
Package: 032307.0900
Regards,Hi,
We have raised a SR with Oracle support and are in touch with Engineering also today onwards. However, would like to try out options while waiting for a solution/workaround for this issue.
Regards, -
Send Email in HTML Format with Javamail.
GOD BE BLESSED!
Hello dudes,
i create a jsp page let me send emails from a database using the API Javamail.
But these emails when i send then, goes in text format only, and i want to send emails in HTML format too. Anyone can help me?
I think the Javamail API can send in HTML format.
thanks and sorry, my english is basic but i think you understand. ;)
Adler MedradoI was trying to do the same thing...I found this on the java.sun.com website somewhere. Hope it works out for you.
try {
String host = "";
String from = "";
String to = "";
String fileAttachment = fileName;
// Get system properties
Properties props = new Properties();
// Setup mail server
props.put("mail.smtp.host", host);
// Get session
Session session1 =
Session.getInstance(props, null);
// Define message
MimeMessage message =
new MimeMessage(session1);
message.setFrom(
new InternetAddress(from));
message.addRecipient(
Message.RecipientType.TO,
new InternetAddress(to));
message.setSubject("");
// create the message part
MimeBodyPart messageBodyPart =
new MimeBodyPart();
//fill message
messageBodyPart.setText("");
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
// Part two is attachment
messageBodyPart = new MimeBodyPart();
DataSource source =
new FileDataSource(fileAttachment);
messageBodyPart.setDataHandler(
new DataHandler(source));
messageBodyPart.setFileName(fileAttachment);
multipart.addBodyPart(messageBodyPart);
// Put parts in message
message.setContent(multipart);
// Send the message
Transport.send( message );
}catch (Exception e){
System.err.print("Mailing error:");
System.err.println(e); -
Send Email with HTML format in Outlook Macro
I can use the following to send email with HTML format in VBA. I also have created an HTML file. Is there a way to load the file into .HTMLBody to send it as HTML format message?
Set OutlookApp = CreateObject("Outlook.Application")
Set objMail = OutlookApp.CreateItem(olMailItem)
With objMail
.BodyFormat = olFormatHTML
.HTMLBody = "<HTML><BODY>Enter the message text here. </BODY></HTML>"
.Display
End WithTry:
Dim fso As Scripting.FileSystemObject
Dim htmlFile As Scripting.TextStream
Set fso = New Scripting.FileSystemObject
Set htmlFile = fso.OpenTextFile("C:\path\to\my-html-file.htm")
strInsert = htmlFile.ReadAll
then change:
.htmlbody = strInsert
oh, and you need to set a reference to the Scripting runtime in Tools, References.
Diane Poremsky [MVP - Outlook]
Outlook & Exchange Solutions Center
Outlook Tips
Subscribe to Exchange Messaging Outlook weekly newsletter -
Java.mail sending email in html format
I trying to send emails from my java program, I ve managd to send text mails, I want to send email in html format is there a way of doing that and how
thanks for your helpThanks a lot it is working now but I think that sending mails in text format is the best way since there isn't a way of knowing whether the recepient can handel html mails
-
Sending email in html format.
i am trying to send email in html format. the following is my sample code. it's just sending plain text. how should i send html file in email?
String message_body = "<a href=\"test.html\">click here</a>";
MimeMessage msg = new MimeMessage( session );
// From Address
msg.setFrom( new InternetAddress( fromAddress ) );
// TO Address
InternetAddress recipient_Address = new InternetAddress( toAddress );
msg.addRecipient(Message.RecipientType.TO, recipient_Address);
// Subject
msg.setSubject( subject );
// MimeBodyPart object for message body part
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setText( message_body );
// MimeBodyPart object for file to attach
MimeBodyPart mbp2 = new MimeBodyPart();
Multipart mp = new MimeMultipart();
// create the Multipart and add message body and file to attach.
mp.addBodyPart(mbp1);
// add the Multipart to the message
msg.setContent(mp);
msg.setSentDate(new Date());
// send the message
Transport.send(msg);
i'd appreciated it...msg.setContent(mp, "text/html");Have I put this in the right place? You need to apply it to your body text, at any rate.
-
FAQ About Adobe LiveCycle Designer (send email) as PDF
HI my name is saeed and i want ask about when i make application form on this program i want put button (send email) as PDF not XML or html i meaning he send me email after full the application as Attach fail PDF not xml or html is this possible.
have god day
saeedGoto command prompt and type ipconfig
You will get something like this:
Use the IP Address instead of the word hostname.
In my case, it would be http://10.13.34.155:8080/ReaderExtensions
The you will get something like this: -
Can´t send emails with pdf attachments - why?
Since i moved all my accounts to my new airbook (OS X 10.8.2) everything works fine BUT i am not able to send emails with pdf attachments.I have an exchange and a mac.account - but they both won`t work.
The emails stay put in the local ausgang? exit box and won`t move away unless i delete them.
i checked the accounts, the activity - all says it works fine - but it doesn`t!
Maybe in the *deep* of my mac is one thing that says no pdf - but where can i find it?
I appreciate every helpful hint :-)
greetingsit tries to send the email for about five minutes and than gives the message *server doesn't work* you want to try another? repeat? or later?
when i change the server e.g. from exchange to mac - tries again and without further notice i find the message in the outbox - even when i click that one and *send* again - nothing changes......
I already tried to name the attachments in.pdf - i also change the pdf to jpeg - nothing works - all emails i write after that go immediately to the outbox - so when i want to send messages at all i need to delete the ones with the attachment or send the other ones manually
Please notice in the activity window there is a lot of traffic :-) but it doesn`t help
i even closed all other programmes like excel,safari and stuff - but still
and i still have al lot of free GB on my airbook....
any idea???? -
Why can't I share documents via email in pdf format any longer?
Why can't I share documents via email in pdf format any longer?
I am guessing you are using an iPad, iPhone or iPod touch. This is the forum for MacBooks, the computer, so the mail works differently.
You will want to ask your question in the correct forum.
Using iPad
Using iPhone
iPod touch
Maybe you are looking for
-
2 app accounts, mobile me and icloud account
I had a .me account (paid) and downloaded apps via the app store. now with iCloud i had to create a new account and i do have 2 accounts, how can i switch my app downloaded from 1 account to the other ? because now i do have to fill in my 2 password
-
User-exits or BAdI for transaction VL10B
Hello everybody, I have to modify an outbound order during its creation from a purchase order in transaction VL10B. The modification is to update the serial numbers and the batch. As the process is in background it is quite difficult to debug the pro
-
I have a 4S and just tried updating to the latest iOS version and my phone went into recovery mode and iTunes says I need to restore to factory settings. Anyone know how I can fix my phone without losing all my content?
-
Save AS prompt window Confirmation
Hello, I would like to go through all the steps involved in the process of exporting one document to XHTML in Indesign CS3. I found a scripting block on this forum by Dave Saunders which illustrate how to interact with a menu action. The fact is that
-
Authentification with user and password
hello experts, Someone knows, what steps are necessary to carry out in XI for Authentification with user and pasword in SOAP adapter receiver?. It's necesary put something in visual administrator? thanks for all