Sending PDF file in presentation layer as a attachment to Email

Hi,
I have a PDF file in my Presentation layer, I want to send it as a attachment to Email. Is there any Function Module or sample code to it.
Regards,
Adithya M.

Hi Maha,
Go through this hope u can understand. also check this link
http://abapcode.blogspot.com/2007/05/convert-spool-request-to-pdf-and-send.html.
Here is the code to send the Smartform to mail as PDF attachment.
*& Report ZTEST_NREDDY_PDF_MAIL
REPORT ZTEST_NREDDY_PDF_MAIL.
Internal Table declarations
DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
Objects to send mail.
I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
Work Area declarations
WA_OBJHEAD TYPE SOLI_TAB,
W_CTRLOP TYPE SSFCTRLOP,
W_COMPOP TYPE SSFCOMPOP,
W_RETURN TYPE SSFCRESCL,
WA_DOC_CHNG TYPE SODOCCHGI1,
W_DATA TYPE SODOCCHGI1,
WA_BUFFER TYPE STRING, "To convert from 132 to 255
Variables declarations
V_FORM_NAME TYPE RS38L_FNAM,
V_LEN_IN LIKE SOOD-OBJLEN,
V_LEN_OUT LIKE SOOD-OBJLEN,
V_LEN_OUTN TYPE I,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZTEST'
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
I_OTF[] = W_RETURN-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = V_LEN_IN
TABLES
OTF = I_OTF
LINES = I_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
LOOP AT I_TLINE.
TRANSLATE I_TLINE USING '~'.
CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
I_RECORD = WA_BUFFER.
APPEND I_RECORD.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Attachment
REFRESH: I_RECLIST,
I_OBJTXT,
I_OBJBIN,
I_OBJPACK.
CLEAR WA_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
Create Message Body Title and Description
I_OBJTXT = 'test with pdf-Attachment!'.
APPEND I_OBJTXT.
DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
READ TABLE I_OBJTXT INDEX V_LINES_TXT.
WA_DOC_CHNG-OBJ_NAME = 'smartform'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
Main Text
CLEAR I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'RAW'.
APPEND I_OBJPACK.
Attachment (pdf-Attachment)
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
READ TABLE I_OBJBIN INDEX V_LINES_BIN.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'smart'.
I_OBJPACK-OBJ_DESCR = 'test'.
APPEND I_OBJPACK.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = '[email protected]'.
I_RECLIST-REC_TYPE = 'U'.
APPEND I_RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_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.
WRITE:/ 'Error When Sending the File', SY-SUBRC.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
If you want to send some text as Body of the Mail then follow this once
when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
I_OBJPACK-TRANSF_BIN = ' '.
I_OBJPACK-HEAD_START = 000000000000001.
I_OBJPACK-HEAD_NUM = 000000000000001.
I_OBJPACK-BODY_START = 000000000000002
I_OBJPACK-BODY_NUM = 000000000000010.
I_OBJPACK-DOC_TYPE = 'RAW'.
append I_OBJPACK-.
by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_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.
*& Report ZSPOOLTOPDF *
*& Converts spool request into PDF document and emails it to *
*& recipicant. *
*& Execution *
*& This program can be run in background or online and a spool request *
*& will still be created *
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT ‘[email protected]’,
p_sender LIKE somlreci1-receiver
DEFAULT ‘[email protected]’,
p_delspl AS CHECKBOX,
p_online no-display.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i,
w_spool_nr like sy-spono.
%_print LIKE pri_params.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE ‘DEV’,
c_no(1) TYPE c VALUE ‘ ‘,
c_device(4) TYPE c VALUE ‘LOCL’.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE ‘Hello World’.
new-page.
commit work.
new-page print off.
If p_online = ‘X’.
Processing performed when program calls itself when run online
gd_spool_nr = sy-spono.
EXPORT gd_spool_nr TO MEMORY ID ‘SPOOLTOPDF’.
EXIT.
endif.
IF sy-batch EQ ‘X’.
PERFORM get_job_details.
PERFORM obtain_spool_id.
ELSE.
gd_spool_nr = sy-spono.
If executed online, it submits a program to perform the write
statements
instructing it to create a spool request, this could be another
program
which just performs the write statements and then exports sy-spono
to memory. But in this example it calls itself passing X to parameter
p_online, which takes it down an alternative procesing path.
submit ZSPOOLTOPDF
with p_online = ‘X’
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
ENDIF.
Get spool id from program called above
IMPORT gd_spool_nr FROM MEMORY ID ‘SPOOLTOPDF’.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ ‘X’.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = ‘INT’
WITH output = ‘X’
AND RETURN.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident ‘0000000000&#8242;
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION ‘GET_JOB_RUNTIME_INFO’
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION ‘CONVERT_ABAPSPOOLJOB_2_PDF’
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 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
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ‘ ~’.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING ‘~ ‘.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
–> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = ‘Subject’.
gd_attachment_desc = ‘Attachname’.
CONCATENATE ‘attach_name’ ‘ ‘ INTO gd_attachment_name.
it_mess_bod = ‘Message Body text, line 1&#8242;.
APPEND it_mess_bod.
it_mess_bod = ‘Message Body text, line 2…’.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = ‘INT’.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
‘Example .xls documnet attachment’
‘PDF’
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl c_no.
CALL FUNCTION ‘RSPO_R_RDELETE_SPOOLREQ’
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
data: t_packing_list like sopcklsti1 occurs 0 with header line,
t_contents like solisti1 occurs 0 with header line,
t_receivers like somlreci1 occurs 0 with header line,
t_attachment like solisti1 occurs 0 with header line,
t_object_header like solisti1 occurs 0 with header line,
w_cnt type i,
w_sent_all(1) type c,
w_doc_data like sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = ‘SAPRPT’.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = ‘F’.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = ‘SAPRPT’.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = ‘F’.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = ‘RAW’.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = ‘X’.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = ‘U’.
t_receivers-com_type = ‘INT’.
t_receivers-notif_del = ‘X’.
t_receivers-notif_ndel = ‘X’.
APPEND t_receivers.
CALL FUNCTION ‘SO_DOCUMENT_SEND_API1&#8242;
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 = t_receivers
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.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
Reward points if helpful
Thanks
Naveen khan

Similar Messages

  • I have an iPad 2, and I am sending PDF file to my iPad, via a Hotmail email. But, the PDF arrives to the iPad in Mail already opended, as a picture on the bottom of the email. Is there a way to prevent it from auto open, so I can open with iBooks instead?

    I have an iPad 2, and I am sending PDF files to my iPad, via a Hotmail account. But, the PDF arrives to the iPad Mail account already opened at the bottom of the email. Is there a way to prevent this auto-opening of the PDF. I've seen screen shots with the box, and PDF listed inside the box, but mine open automatically. I want to get them into iBooks...?

    I am having the same problem and it is even bigger.
    When opening a 1-page PDF in iBooks and sending it via mail it is sent inline as preview, but the recipient cannot open the file anymore. Also on iPad and iPhone there is no "open in" possible.
    Somehow the mail app does destroy the file. What is going wrong?

  • Not able to send pdf file as attachment in my apple mail.

    Hi, I was easily able to attach pdf files to my apple mail.  infact I could just open a pdf file and then send it as attachment in the email earlier. but after downloading and upgrading to os X Mountain lion, I am neither being able to attach and send pdf files in my apple mail, nor can I send PDF file as an attachment.
    Is there any issue with OS X Mountain Lion.
    Issue 1.  I compose Email , then click attach > Browse > select pdf file > click attach > it shows in my Email body either as an icon or as first page of the pdf document > I send it. >>> But when the receipient opens the Email, that pdf attachment is missing. In fact When I put a cc to my self and I open the Email, the attachment is mssing in the incoming E amil.
    Issue 2. I open the PDF document > Click on File > send as attachment in E-Mail > on right, a menu appears where I select the File and click attach> I get a message
    The SendMail doesnot know how to talk to your default mail client. Please select a different mail application to use. Attaching a screen shot.
    I never had these issues earlier with my Lion OS . but since the time I have upgraded to mountain Lion OS, I am having these issues.
    Are these the Mountain Lion issues, how to fix these please.

    I believe, the software team forgot to put a button for send or share as an attachment to preview.

  • How to Sender PDF file as attachment in Payload?

    Hi Experts,
         After I done some of PI scenarios, I'm stuck with one of my requirement... In requirement, "Web service" will send request to "SAP ECC 6" in order to get PO document print out in PDF file by call smartform or any form printing as usual.
         In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in  RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
         I try to search and read some of document and blog, some said I can attach file as Payload attachment, but no clear solution or guide to do so.
        Here is example blog that I found, I really useful
           /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
        Please suggest me in my case,
    Thanks in advance...
    Cheers,
    Terry

    Hi,
    >>In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
    as per my blog you can attach PDF to a message only if you use abap proxy on ECC and not RFC
    the code is just copy and paste from my blog:
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    so there is nothing spectacular there
    Regards,
    Michal Krawczyk

  • .pdf file changed into .tmp when trying to send pdf file as attachment

    Dears,
    A few days now, .pdf files are exported as .tmp files if we try to send them as attachment directly from the adobe reader plug-in in internet explorer 8.
    Unfortunatly Outlook interprets .tmp files as harmfull, so we are no longer able to send pdf files directly.
    (screenshot in attachment)
    Is there any chance we can configure this so, pdf files are exported as .pdf instead of .tmp
    More details:
    OS               : Win XP SP3
    browser        : ie 8
    plug in          : Adobe PDF Link Helper (not sure this is the one that provides us the pdf reader functionallity dough)

    I cannot reproduce that (Adobe Reader 11.0.3, IE8, Win XP-SP3).  In fact, I cannot even see the Attach to Email option, but the file name is correct.

  • Problem to send PDF file

    Hello,
    I try to send pdf file as attachments file to mail with XI.
    I use with this blog
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
    My problems is:
    1. to all mails that I send have another e file Untiteld.doc, how I can avoid this file?
    2. When I received the pdf file I not succeed to open it I received the message:
    Adobe reader could not open 'elad.pdf' because it is either not supported
    File type or because the file has been damaged (for example, it was sent as an
    Email attachment and wasn't correctly decoded)
    Regards
    Elad Peleg

    hi
    ref this
    Receiver Mail Adapter message with PDF attachment
    PDF attachment in mail adapter
    File adapter with attachment to mail
    File with attachment to mail scenario
    File To Mail Scenario With An Attachment

  • Unable to send or create a link to send pdf file since update to Yosemite.

    Unable to send or create a link to send pdf file since update to Yosemite.

    Hi Donald S Matheson,
    Are you still facing this issue?
    May i know which application or service you are using. Can be more precise and provide me the steps to check the behavior at my end.
    Regards,
    Ajlan Huda.

  • TS3276 Can't send PDF files by email

    I can't send PDF files of photo from my email. ??

    Dropbox
    A simple and popular way to copy files and share files amoung your devices.
    https://www.dropbox.com/
    copy to Share folder & email them that they have access
    copy to Public folder & email them the link.
    Robert

  • Trouble send PDF file by email

    Hi I down loaded the new ios7 app and since then I have had trouble sending PDF files via email can any 1put any light in it?

    Just like any other file...
    On Sat, Mar 7, 2015 at 12:16 AM, larrys19338374 <[email protected]>

  • When I send pdf files to my iPhone 6 , I am only able to see the first page of the pdf file.

    When I send pdf files to my iPhone 6 plus (IOS 8.1.2), I am only able to see the first page of the pdf when I open the attachment on the phone.

    Quit Safari.
    Open the Library folder in your home folder as follows:
    ☞ If running OS X 10.7 or later, hold down the option key and select Go ▹ Library from the Finder menu bar.
    ☞ If running an older version of OS X, select Go ▹ Go to Folder… from the Finder menu bar and copy the line below into the text box that opens:
    ~/Library
    Delete the following items from the Library folder:
    Caches/com.apple.Safari/Cache.db
    Preferences/com.apple.quicktime.plugin.preferences.plist
    Preferences/QuickTime Preferences
    Relaunch Safari and test.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running OS X 10.7 or later, open LaunchPad. Click Utilities, then Console in the page that opens.
    Select "/var/log/cups/error_log" from the file list. Post the messages from the time of the last printing attempt.
    Post the log text, please, not a screenshot. If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.

  • How do i edit a PDF file that was sent to me in an email?

    How do i edit a PDF file that was sent to me in an email?

    Depends on the extent of the edits. You will need Acrobat in any case. If the edits or minor, you can use the text edit tool. For major edits, you need to request the original file be sent or see if you can Save As a DOC or related file type. PDFs are not really structured for editing and you are asking for a lot of grief if you want to do much. Exporting is the best way, or even better simply asking the author for the original (non-PDF type).

  • How to send a local PDF file(on presentation Serv) as attachment in a mail.

    Hi,
    This is urgent requirement..
    Please help.. Some scanned document is saved as PDF  file locally (on Presentation Server) that i want to send as attachment in mail.
    I tried with SO_NEW_DOCUMENT_ATT_SEND_API1 Function Module but
    It is just sending the file as attachement, but when i open that file into mail..it is not opening. Is there anythign so that i can just give filepath and that file can go to mail.
    I am selecting the filepath in selection screen but in FM SO_NEW_DOCUMENT_ATT_SEND_API1  there is no option of giving the file path. So it is not taking right file.
    Is there any other function module ?

    http://www.sap-img.com/abap/sending-email-with-attachment.htm

  • In Adobe froms - Sending PDF file as Attachment  via email

    I have to develop a <b>PDF form</b> and one more requirement; I have to change the mail Content (body) and the Subject line which should have attached PDF file.The (Transaction Code VA21) Has the sending the Email part. My  Requirement is to <b>Change the Content (body) and the Subject</b>. 
    Requirement;
    When customer request for the quote, quote document is created in SAP (Transaction Code VA21). Promised Price, quantity, date is communicated to customer via quote output. Customer may decide to place firm order with reference to quote.
    So this form (PDF file and send via email) is used to communicate the AMAT quote to customer. The PDF file will be as a attachment in the mail. With change subject line, and content of the mail (Thanks for the Quote, Please don’t reply to this mail). It also consists of applicable terms & condition of the quote.
    Is it possible to handle the Content and the Subject of the mail in Program or Form layout (SFP). or it's Enhancement?
    How to go about it? I tried a lot. At last am contacting you. Please.............. Let me know. Very urgent.Point will be given sooon. Tnx a lot.....
    #Sinivas

    Hi,
    Yes But you can use ADOBE FORMS for that... Check this link for presentation...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0c139d3-3eae-2910-01a1-d253f2587b0e?prtmode=navigate
    Check this BLOG for sending Email through ABAP..
    Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
    One more thing... You can download your data to a PDF file and send that PDF file via program...
    Search this Forum for more answers.. you would get plenty out of it...
    Check this thread for further information..
    Sending mail with 2 attachments
    Hope this would help you.
    Any queries plz revert back
    Good luck
    Narin

  • Sending PDF file as Attachment

    Hello Guys,
    My requirement is to send an PDF attachment which could have content in any of four languages( English,spanish,German or french).
    I am planning to use Function Module SO_NEW_DOCUMENT_SEND_API1 to send Email.
    Please let me know if it is possible to achieve this without using smartforms.
    If yes, how ?
    if no, how to achieve this using smartform.
    Appreciate your help in advance.
    Regards,
    Hema

    Hi,
    Yes But you can use ADOBE FORMS for that... Check this link for presentation...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0c139d3-3eae-2910-01a1-d253f2587b0e?prtmode=navigate
    Check this BLOG for sending Email through ABAP..
    Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
    One more thing... You can download your data to a PDF file and send that PDF file via program...
    Search this Forum for more answers.. you would get plenty out of it...
    Check this thread for further information..
    Sending mail with 2 attachments
    Hope this would help you.
    Any queries plz revert back
    Good luck
    Narin

  • How to send PDF file as an attachment in email?

    Hi Folks,
    I have successfully configured SMTP and by now I can successfully send normal text messages along with .TXT files. However, when I am trying to send an email along with .pdf file as an attachment, I am getting the mail in my inbox, but I cannot open the .pdf file! I am getting the following Acrobat error:
    Acrobat could not open 'abc.pdf' because it is either not a supported file type or because the file has been corrupted
    Can any help me in solving this problem?
    Thanks in advance
    Regards,
    Faisal

    Hi Vajha,
    Thanks alot for your kind reply. I also express my apologies for responding to your reply lately.
    I beleive all the links you have sent me are talking about ABAP coding. what I am interested in is,
    is there any configuration that I am missing in SCOT (Basis side)?
    Since I am not an ABAPER, so I carry out these activities.
    Can anyone please answer the following queries of mine:
    1. Can't we send any PDF attachment in a mail from R/3?
    2. Do we have to do it through coding only?
    3. In scot we have option "All formats except fllw". But it does not work for me. Any inputs?
    Thanks in advance.
    Regards,
    Faisal

Maybe you are looking for