Sending PDF as attachment with SO_NEW_DOCUMENT_ATT_API1
Hi,I want to send as attachment the content that gives back function to me ARCHIVEOBJECT_GET_TABLE. This function gives back a Binary table of 1024 RAW.
The table that goes to him to function SO_NEW_DOCUMENT_ATT_API1 is of type solist, 255 RAW.
I have used function TABLE_COMPRESS to turn the data, but the attachment is not generated correctly.
If I write the file with GUI_DOWNLOAD and I recover it with GUI_UPLOAD, then the table that I recover if it is sent correctly.
This process I want to make it in background, so I need turn table 1024 to 255 so and as it does upload function.
Thanks
I have already solved the problem.
The functions to which I call are :
ARCHIVOBJECT_GET_TABLE, I turn the object archivelink pdf in binary
QCE1_CONVERT converts the binary table of 1024 to binary one 255
SO_NEW_DOCUMENT_ATT_API1 receives Binary table 255 and sends the annex correctly
This way, is not needed respository data, being solved the problem in run time
thank you very much and a greeting.
Similar Messages
-
Sap adobeform sending pdf as attachment with specific name
Hi Experts,
Need your help in solving my problem !!
My requirement is to send adobe form as mail attachment in PDF format, Which I am able to do.
My Problem is PDF attachment should be generated with specific name.
For example my scenario (below given screen shot),
When i click on submit by email button, PDF will be attached to my mail,
with some random name such as "d4811f8_45171.pdf" Instead it should be generated with
fixed name such as "new_attach.pdf" or dynamic name using user name such as
"Vishwa_attachment.pdf".
Kindly help to achieve my needs.
Any help will be greatly appreciated and rewarded.
Thanks in advance,
Regards,
VishwaHi Naveen,
please read through my query again, I should generate pdf when I click on "submit by email button".
I am not using any function for conversion it will happen automatically.
thanks,
Vishwa -
Sending PDF thru email with password protection in our SAP system
Need solution for sending PDF thru email with password protection in our SAP ecc 6
Or maybe you have found any other way? You can check here:
Password protect PDF file:
Re: Password protected PDF file
pdf with password encryption
Regards Otto -
Want to send PDF as attachement using Java Mail
HI,
I am using Java mail API for sending PDF as attachment. Here is my sample code
messageBodyPart = new MimeBodyPart();
messageBodyPart.setDataHandler(new DataHandler("String data for PDF using iText", "text/plain" ));
I am generating String for PDF file using iTEXT but I am unable to find out mimetype for passing into DataHandler as second paramete.
Any idea?
Thanks
ShaileshDon't convert the data to String. It isn't text so
you'll damage the binary content by doing that. In
the "demos" directory of your JavaMail download
you'll find a ByteArrayDataSource class you can use
instead of a FileDataSource. Yes, this worked for me. I create the pdf in memory as as StringBuffer and I just changed the code from
messageBodyPart.setDataHandler(new DataHandler(pdf.toString(), "application/pdf"));
to
messageBodyPart.setDataHandler(new DataHandler(new ByteArrayDataSource(pdf.toString(), "application/pdf")));
and it worked.
Thanks a lot for your help,
Dennis -
URGENT -java MAil sending pdf as attachment
I have a small java program that sends the pdf as an attachment without using phisical pdf file.
but the problem is i am unable to open the pdf that comes as as attachment in mail.
error while opening pdf : " acrobat cannot open file bcos the file type is not supported or the file is curropted(for example it was sent as email attachment and was not properly decoded)"
here is the code :
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.io.*;
import java.util.*;
public class Mailer {
public static void main (String args[]) {
String host = "abc";
String from ="[email protected]";
String to = "[email protected]";
//String fileAttachment = args[0];
// Get system properties
Properties props = System.getProperties();
// Setup mail server
props.put("mail.smtp.host", host);
// Get session
Session session =
Session.getInstance(props, null);
// Define message
MimeMessage message = new MimeMessage(session);
message.setFrom( new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
message.setSubject("Hello JavaMail Attachment subject");
// create the message part
MimeBodyPart messageBodyPart = new MimeBodyPart();
//fill message
messageBodyPart.setText("Hi hello this is the msg in mail");
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
// Part two is attachment
messageBodyPart = new MimeBodyPart();
String data_to_send = "This msg is sent as an attachment with out using physical file";
String att_type = "application/pdf";
messageBodyPart.setText(data_to_send);
messageBodyPart.setHeader("Content-Type", att_type);
messageBodyPart.setHeader("Content-Transfer-Encoding", "BASE64");
messageBodyPart.setFileName("attachment.pdf");
/* ByteArrayOutputStream byteStream=new ByteArrayOutputStream();
ObjectOutputStream objectStream=new ObjectOutputStream(byteStream);
objectStream.writeObject(data_to_send);
messageBodyPart.setDataHandler(new DataHandler( new ByteArrayDataSource( byteStream.toByteArray(), "application/pdf" )));
messageBodyPart.setFileName("attachment.pdf");
multipart.addBodyPart(messageBodyPart);
// Put parts in message
message.setContent(multipart);
// Send the message
Transport.send( message );
System.out.println("sent msg");
Thanks
SmiIt's "corrupted" because you are sending a text string and not a PDF document.
And that commented-out code that uses an ObjectOutputStream would have corrupted a PDF document anyway, if you had one.
I suggest if this problem is urgent then you hire professional programming help to get it done. You are a long way from a solution. -
Sending PDF output attachment in e-mail to external users from BSP
Hi All,
Please gothrough the below requirement details :
Requirement Details:
Need to achieve the functionality of sending a PDF attachment of invoice to an external
e-mail address from the BSP Application.
Implementation Details:
The Print out Output determination is already done in the system. We are using SAP R/3 4.7 (620)
In the Transaction VF03 in the initial screen there is a menubar "Billing document" and underneath that menu there is a menu item called "Issue". If we click the "Issue" menu item all the output that are already proposed will be visible and we can select the printout Output determination and can issue a printout.
I had created a FM to call from BSP and that function module will take the Invoice number as input and will call the "VF03" transaction using BDC and will trigger the Sapscript Printout . I see the the sapscript in the spool after I call the Function module .
But I don't know how I can get the Spool request number for that Function module call from BSP page ????
I got struck in this approach...
If I know the Spool number after calling the function module the it's very easy to call the following FM's for sending a e-mail with the Invoice PDF attachment.
CONVERT_OTFSPOOLJOB_2_PDF
QCE1_CONVERT
SO_NEW_DOCUMENT_ATT_SEND_API1
Please let me know if anyone can help me in this ...
Please reply ASAP.
Thanks,
GreetsonCheck out these weblogs.
/people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
Regards
Raja -
Not Able to send pdf as attachment through email
Hi,
I am trying to send the generated pdf as attachment throught email and for the same i am referring to this blog
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID1409662650DB01562818410448928630End?blog=/pub/wlg/8551
but when i am trying to send the mail using the method given in this blog , i am getting this error
com.sap.tc.adobe.pdfobject.core.PDFObjectRuntimeException: Processing exception during a "MergeData" operation. Request start time: Fri Dec 11 18:05:24 IST 2009 com.adobe.ProcessingException: PDF is not interactive. Data can only be imported into interactive forms. Exception Stack Trace: com.adobe.ProcessingException: PDF is not interactive
and at the backend i am getting the error as
#com.sun.mail.smtp.SMTPSendFailedException: 501 Bad address syntax
Can any one please help me out with a solution ?? Any suggestions are welcomed
Thanks a lot in advanceHi,
Thanks for your reply , but i cannot set the enabled property of the form as true as we are not using the licensed version of the live cycle designer . But if i try the example step by step then even by setting the enabled property as false , the pdf is generated and sent through the email and when i am trying to do the same thing in one of my applications its not working . The pdf is generated but as soon as i click on the button send mail the above told error is displayed .
There needs to be some other explaination for the error -
Service command in Preview.app - Send PDF as attachment doesn't work
I have used the following workflow for month on all my three macs.
I open up a PDF file in Preview and select "eMail PDF as attachment" from the Edit menu at the top of the screen. This will attach the current viewed PDF file to a new mail message.
I guess after updating to 10.7.2 somehow it stopped working on MacBook Pro and iMac. My Mac mini is fine.
When I do use this command I get two error messages. Service not available. Can't attach PDF to mail. Import failed. Something like that.
Does anyone know how to fix that? I repaired permissions and did all that kind of stuff.
Thanks in advance!Would it be possible, please, for someone who has/had this issue to send me the com.apple.ServicesMenu.Services.plist files from ~/Library/Containers/com.apple.Preview/Data/Library/Preferences and from ~/Library/Preferences?
Thank you. -
Send files as attachment with BCS-methods
Hi,
I want to load file(s) from application server
and send it as attachment per mail.
In 4.6c I had a program with fm 'SO_DOCUMENT_SEND_API1'
that worked fine. But not any longer in 7.01.
So i tried it with the new method of BCS*
But it worked not fully correct.
German mutations are not correct.
and e.g. in excel ther is a message "too many columns" although there're only 130 col.
In 4.6 I opend the data file(s) in binary mode and saved it to solix
Which addition I must choose to the open-command?
And what I have to note by the converting method cl_bcs_convert=>string_to_solix?
Do you know a sample program to my problem ?
In BCS_EXAMPLE* I did not found anyone
thanks
Andreas
Edited by: Andreas Mann on Oct 25, 2011 4:22 PMI do have sample code
sending email with attachment using BCS,
i can only post it by thursday,
currently refer this.. i will post sample code later
DATA lt_message TYPE bcsy_text.
DATA lv_mail_title TYPE so_obj_des.
DATA document TYPE REF TO cl_document_bcs.
DATA recipient TYPE REF TO if_recipient_bcs.
DATA send_request TYPE REF TO cl_bcs.
DATA sent_to_all TYPE os_boolean.
DATA bcs_execption TYPE REF TO cx_bcs.
DATA email_id TYPE ADR6-SMTP_ADDR
send_request = cl_bcs=>create_persistent( ).
*Create Title
CONCATENATE 'Mail Subject' '-' 'xxx'
INTO lv_mail_title RESPECTING BLANKS.
*Create Message(EMAIL Body)
APPEND '<p>Dear Sir/Madam</p>' TO lt_message.
APPEND '<p>The Message body.......</p>' TO lt_message.
APPEND '<br>' TO lt_message.
*Create Document
document = cl_document_bcs=>create_document(
i_type = 'HTM'
i_text = message_body
i_subject = subject ).
*Add Attachement
document->add_attachment(..
...). "Check this method
*Add document to email
send_request->set_document( document ).
recipient = cl_cam_address_bcs=>create_internet_address(
i_address_string = email_id ).
*add recipients to send request
send_request->add_recipient( i_recipient = recipient ).
sent_to_all = send_request->send(
i_with_error_screen = 'X' ).
COMMIT WORK.
IF sent_to_all = 'X'.
MESSAGE s398(00) WITH 'Message Sent Succesfully'.
RETURN.
ENDIF.
thanks & regards,
suji -
Send Excel as attachment with colors in coloums
Hi,
I need to send Excel as attachment and some particular columns should be coloured.
I am sending Excel attachment using FM SO_DOCUMENT_SEND_API1 when report executed in foreground.
Please help how to make columns coloured.
Thanks,
Phanihi,
This report demonstrates how to send some ABAP data to an EXCEL sheet using OLE automation by this it makes EXCEL columns colorful.
TYPE-POOLS OLE2 .
* handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_MAPL TYPE OLE2_OBJECT, " list of workbooks
H_MAP TYPE OLE2_OBJECT, " workbook
H_ZL TYPE OLE2_OBJECT, " cell
H_F TYPE OLE2_OBJECT, " font
H_C TYPE OLE2_OBJECT. " color
DATA: FILENAME LIKE RLGRAP-FILENAME.
TABLES: SPFLI.
DATA H TYPE I.
* table of flights
DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
*& Event START-OF-SELECTION
START-OF-SELECTION.
* read flights
SELECT * FROM SPFLI INTO TABLE IT_SPFLI.
* display header
ULINE (61).
WRITE: / SY-VLINE NO-GAP,
(3) 'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(4) 'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(8) 'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
ULINE /(61).
* display flights
LOOP AT IT_SPFLI.
WRITE: / SY-VLINE NO-GAP,
IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
ENDLOOP.
ULINE /(61).
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = TEXT-007
EXCEPTIONS
OTHERS = 1.
* start Excel
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
* PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
* CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls' .
* PERFORM ERR_HDL.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = TEXT-008
EXCEPTIONS
OTHERS = 1.
* get list of workbooks, initially empty
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
PERFORM ERR_HDL.
* add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP.
PERFORM ERR_HDL.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
* output column headings to active Excel sheet
PERFORM FILL_CELL USING 1 1 1 200 'Carrier id'(001).
PERFORM FILL_CELL USING 1 2 1 200 'Connection id'(002).
PERFORM FILL_CELL USING 1 3 1 200 'City from'(003).
PERFORM FILL_CELL USING 1 4 1 200 'City to'(004).
PERFORM FILL_CELL USING 1 5 1 200 'Dep. Time'(005).
LOOP AT IT_SPFLI.
* copy flights to active EXCEL sheet
H = SY-TABIX + 1.
IF IT_SPFLI-CARRID CS 'AA'.
PERFORM FILL_CELL USING H 1 0 000255000 IT_SPFLI-CARRID.
ELSEIF IT_SPFLI-CARRID CS 'AZ'.
PERFORM FILL_CELL USING H 1 0 168000000 IT_SPFLI-CARRID.
ELSEIF IT_SPFLI-CARRID CS 'JL'.
PERFORM FILL_CELL USING H 1 0 168168000 IT_SPFLI-CARRID.
ELSEIF IT_SPFLI-CARRID CS 'LH'.
PERFORM FILL_CELL USING H 1 0 111111111 IT_SPFLI-CARRID.
ELSEIF IT_SPFLI-CARRID CS 'SQ'.
PERFORM FILL_CELL USING H 1 0 100100100 IT_SPFLI-CARRID.
ELSE.
PERFORM FILL_CELL USING H 1 0 000145000 IT_SPFLI-CARRID.
ENDIF.
IF IT_SPFLI-CONNID LT 400.
PERFORM FILL_CELL USING H 2 0 255000255 IT_SPFLI-CONNID.
ELSEIF IT_SPFLI-CONNID LT 800.
PERFORM FILL_CELL USING H 2 0 077099088 IT_SPFLI-CONNID.
ELSE.
PERFORM FILL_CELL USING H 2 0 246156138 IT_SPFLI-CONNID.
ENDIF.
IF IT_SPFLI-CITYFROM CP 'S*'.
PERFORM FILL_CELL USING H 3 0 155155155 IT_SPFLI-CITYFROM.
ELSEIF IT_SPFLI-CITYFROM CP 'N*'.
PERFORM FILL_CELL USING H 3 0 189111222 IT_SPFLI-CITYFROM.
ELSE.
PERFORM FILL_CELL USING H 3 0 111230222 IT_SPFLI-CITYFROM.
ENDIF.
IF IT_SPFLI-CITYTO CP 'S*'.
PERFORM FILL_CELL USING H 4 0 200200200 IT_SPFLI-CITYTO.
ELSEIF IT_SPFLI-CITYTO CP 'N*'.
PERFORM FILL_CELL USING H 4 0 000111222 IT_SPFLI-CITYTO.
ELSE.
PERFORM FILL_CELL USING H 4 0 130230230 IT_SPFLI-CITYTO.
ENDIF.
IF IT_SPFLI-DEPTIME LT '020000'.
PERFORM FILL_CELL USING H 5 0 145145145 IT_SPFLI-DEPTIME.
ELSEIF IT_SPFLI-DEPTIME LT '120000' .
PERFORM FILL_CELL USING H 5 0 015215205 IT_SPFLI-DEPTIME.
ELSEIF IT_SPFLI-DEPTIME LT '180000' .
PERFORM FILL_CELL USING H 5 0 000215205 IT_SPFLI-DEPTIME.
ELSE.
PERFORM FILL_CELL USING H 5 0 115115105 IT_SPFLI-DEPTIME.
ENDIF.
ENDLOOP.
* EXCEL FILENAME
CONCATENATE SY-REPID '_' SY-DATUM+6(2) '_' SY-DATUM+4(2) '_'
SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
* FORM FILL_CELL *
* sets cell at coordinates i,j to value val boldtype bold *
FORM FILL_CELL USING I J BOLD COL VAL. -
Problem in sending PDF as attachment in E-Mail
Hi All,
I have developed a program to convert the spool request as PDF file and sending it to an E-Mail address.
But when i'm opening the file, I'm getting an error in Adobe Reader.
I'm attaching the code here.
Please give me the suggestions along with example Program.
Sorry, I could not attach the program here.
Thanks and regards,
Jagan Mohan.DATA:ig_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
ig_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : ig_pdf1 TYPE TABLE OF solisti1.
DATA: g_tab_lines LIKE sy-tabix.
DATA: ig_objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE,
ig_objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
ig_objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
ig_reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE,
ig_objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: wg_doc_chng LIKE sodocchgi1.
PERFORM convert_pdf.
PERFORM sendmail.
FORM convert_pdf .
REFRESH : ig_otf , ig_pdf_tab.
ig_otf[] = wg_otf_from_fm-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = wg_bin_fsize
TABLES
otf = ig_otf
lines = ig_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " convert_pdf
FORM sendmail .
REFRESH : ig_pdf1.
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
line_width_dst = '255'
TABLES
content_in = ig_pdf_tab[]
content_out = ig_pdf1[]
EXCEPTIONS
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MOVE : 'U' TO ig_reclist-rec_type,
'.....' TO ig_reclist-receiver, " move email id here
'X' TO ig_reclist-express,
'INT' TO ig_reclist-com_type.
APPEND ig_reclist.
REFRESH ig_objtxt.
CONCATENATE 'Payslip of employee -' wg_vbak-vbeln INTO ig_objtxt SEPARATED BY ' '.
APPEND ig_objtxt.
Creating the document to be sent
wg_doc_chng-obj_descr = 'Pay Slip'.
wg_doc_chng-obj_name = 'PAYSLIP'.
wg_doc_chng-obj_langu = sy-langu.
Get length of objtxt.
DESCRIBE TABLE ig_objtxt LINES g_tab_lines.
READ TABLE ig_objtxt INDEX g_tab_lines.
wg_doc_chng-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( ig_objtxt ).
Creating the entry for the compressed document
CLEAR ig_objpack-transf_bin.
ig_objpack-head_start = 1.
ig_objpack-head_num = 0.
ig_objpack-body_start = 1.
ig_objpack-body_num = g_tab_lines.
ig_objpack-doc_type = 'RAW'.
APPEND ig_objpack.
DESCRIBE TABLE ig_pdf1 LINES g_tab_lines.
g_tab_lines = g_tab_lines + 1.
ig_objhead-line = 'PAYSLIP'.
APPEND ig_objhead.
Creating the entry for the compressed attachment
ig_objpack-transf_bin = 'X'.
ig_objpack-head_start = 1.
ig_objpack-head_num = 1.
ig_objpack-body_start = 1.
ig_objpack-body_num = g_tab_lines.
ig_objpack-doc_type = 'PDF'.
ig_objpack-obj_name = 'PAYSLIP'.
ig_objpack-obj_descr = 'Pay Slip'.
ig_objpack-doc_size = g_tab_lines * 255.
APPEND ig_objpack.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = wg_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = ig_objpack
object_header = ig_objhead
contents_bin = ig_pdf1
contents_txt = ig_objtxt
receivers = ig_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 SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. -
Hi,
I m running the custom concurrent program through pl-sql code and sending the output of the same conc program on to the email id of vendor.
When i was tryng to send the output in text file it was allowing me to send the text message as well as attachment.
But with the same code I want to send the pdf output.
so earlier I was using the UTL_MAIL.send_attach_varchar2 .
And for pdf attachment I am using the UTL_MAIL.send_attach_raw.
So custom program is generating the output but
while sending an email, it is not attaching the output into the email.
What could be the problem.
Please help as I needed it urgently.
revert me if anyone has any query.
Thanks,
Bluetooth_25No it's not generating the .pdf file.
It's only generating the .out file.
so is that the possibility that it is not attaching the pdf in email.
Here is my code:
/*Variable declaration*/
fhandle UTL_FILE.file_type;
flen NUMBER;
bsize NUMBER;
ex BOOLEAN;
vtextout RAW (32767);
UTL_FILE.fgetattr ('EMAIL_OUTPUT','o'||v_request_id ||'.out',ex,flen,bsize);
fhandle := UTL_FILE.fopen('EMAIL_OUTPUT','o'||v_request_id ||'.out', 'r');
LOOP
BEGIN
UTL_FILE.get_raw (fhandle,vtextout,flen);
EXCEPTION
WHEN NO_DATA_FOUND
THEN
EXIT;
END;
END LOOP;
UTL_FILE.fCLOSE(fhandle);
FOR email_rec in c2_vendor_email_add(po_rec.po_header_id)
LOOP
UTL_MAIL.send_attach_raw
sender => '[email protected]',
recipients => email_rec.email_address,
subject => 'Testmail',
MESSAGE => 'This is test mail',
attachment => vtextout,
att_mime_type =>'application/pdf',
att_filename =>'o'||v_request_id ||'.out'
and i have one more question how to send an email to multiple recipients using utl_mail.send_attach_raw -
Sending PDF as attachment using Business workflow from Java WD
Hi,
It seems it is famous and known may be solved issue. But i am not able to conceptualize the information available. Thats why i am posting this. pls suggest me how to proceed.
My scenario: I have an online intercative form in java webdynpro application where as once user completes data entry on send button click, i am triggereing an workflow of ECC6.0 which sends mail to MS exchange mail ID. Once user gets the form and complete comments section i have another application which allows user to upload the file which is similar to offline case. But when i send the attachment i am getting mail with pdf attachment but when i open PDF i am getting error. And it seems PDF doesn't contain data(as size of pdf is 1 KB). and i tried to use xstring as input type.
Can anyone pls guide me how to proceed.
Regards
Ravindra.A pdf file is definitely not a text file. Storing it in a Java String is a mistake.
Is the "body" variable in your code a String? How does the data get into
the String? -
Can i send pdf 15mb file with adobe send?
Can i send a 15mb PDF file with adobe send please? At the moment i'm having to send my PDF file as an attachment to email and it takes ages to send. i'm looking for a quicker and cheap way to send my PDF files please can you help?
Hi there,
Thanks for posting! A 15 MB file should be easy to send with Adobe Send. Here's a little information on how to get started: https://forums.adobe.com/docs/DOC-4474
If you need any more specific instructions, just let me know and I'll be happy to help.
Best,
Rebecca -
How to email a pdf file (attachment with password) using ABAP?
Hi Colleagues,
I
n abap, how do you email a pdf file that contains password?
(pdf with password, not the whole email).
A custom program is created. Inside this program, it
retrieves the spool number and converts it to a pdf file
(using function module '....abapspool...'). No parameter to put password.
I was able to do the above. The problem is how to put password on
the pdf file.
Once the user receives the email (say from hotmail or outlook) with pdf attachment, clicks on the pdf, it will as ask for an attachment.
sap version 4.7.
Questions:
- how to code in ABAP to include the pdf with password in an email
received from hotmail or outlook?
- any function modules or classes that can do the pdf password?
- do we need to install another technology or add-on application or
???? to do it? If yes, do we code in abap?
- any other ideas?
Thanks in advance.
RaymundHi Colleagues,
I
n abap, how do you email a pdf file that contains password?
(pdf with password, not the whole email).
A custom program is created. Inside this program, it
retrieves the spool number and converts it to a pdf file
(using function module '....abapspool...'). No parameter to put password.
I was able to do the above. The problem is how to put password on
the pdf file.
Once the user receives the email (say from hotmail or outlook) with pdf attachment, clicks on the pdf, it will as ask for an attachment.
sap version 4.7.
Questions:
- how to code in ABAP to include the pdf with password in an email
received from hotmail or outlook?
- any function modules or classes that can do the pdf password?
- do we need to install another technology or add-on application or
???? to do it? If yes, do we code in abap?
- any other ideas?
Thanks in advance.
Raymund
Maybe you are looking for
-
For no apparent reason, my iphone 4 stopped using my WiFi connection.
The only data connection it will use is cellular. Never had a problem in the past. Did not drop phone or get it wet. Other iphones in family are still using our wifi. I am the only one with the 4. Anyone know what can be done to get me back on m
-
Hi We are using interaction center(inin) for the fax service , there is no trunk created for fax numbers in cucm , users use their DN for faxes also , There are two problems facing now remote users are not hearing fax tone , i don't know the tone
-
SAP Enterprise Connector and service....
Hi everyone, After creating, via the plugin "SAP Enterprise Connector", a proxy pointing on a BAPI, how can I create a service for this (and a web service). I know that you can create a web service directly using ABAP transaction se37. But our SAP ve
-
When instructed "the java binary in your path"
please help when Im instructed with the following: a JDK or JRE 1.0+ (see www.javasoft.com) installed and the java binary in your PATH my operating system is windows server 2000 how do i set the path to to the java binary, Is the java binary. Is the
-
Photoshop Touch- Update?
Auf meinem Samsung Galaxy 10.1 war Photoshop Touch in der Version 1.4.2 vorinstalliert. Im Google Play Shop ist derzeit die Version 1.7.5 verfügbar. Muss ich das kaufen oder gibt es eine andere Möglichkeit zum Update? Falls ich das kaufen muß, lohnt