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.
Similar Messages
-
Acrobat can not open pdf email attachment
Acrobat 8 Professional.<br /><br />A user gets this error message when he tries to open up a pdf email attachment:<br /><br />"Acrobat could not open <File Name> because it is either not a supported file type or because the file has been corrupted (for example, it was sent as an email attachment and wasn't correctly decoded)."<br /><br />I can open up the attachment without any issues.<br /><br />Anybody else have this issue?
Yes, Ron Green here at the NYS Insurance Department. I now have two clients and counting that have somewhat of an identical problem.
Client #1 has Adobe 8 Professional installed on his pc which is running Widnows XP Professsional. Files are scanned using a XEROX MFP network scanner and client is able to open those scanned documents within adobe and then saves them to a network share. Problem arises whenever he attempts to attach the saved document to another application. Once he attempts viewing the scanned document at that point Adobe blows up with the same error message stating the file is corrupt.
Client #2 has Adobe 9 Reader but is still able to follow the same network scanning scenario aforementioned but encounters the exact same problem when attempting to attach the scanned PDF documents.
Is there any type of fix out there for this??? -
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 - -
New document: How to avoid known PDF email attachment problems
Have you ever had problems with PDF attachments sent from Adobe Reader for iOS using Share > E-mail Document?
You may find this document useful to avoid the problems.
How to avoid known PDF email attachment problems
Please let us know if you have encountered different types of problems with PDF attachments. We can look for solutions or workarounds for you.Unfortunately, we (Adobe Reader mobile team) do not know if/when Apple will fix the attachment problems (software defects) in Apple Mail.
In particular, the attachment problem with Microsoft Outlook (See Problem #2 in How to avoid known PDF email attachment problems) appears to be a long-standing defect that has been known for years. However, Apple has not provided any fix for Apple Mail yet.
Adobe Reader for iOS merely launches Apple Mail (the default mail app on iOS) to send a PDF document as an attachment. Adobe Reader has no control over whether or not to embed a preview image of an attachment in the body of an email message, which is known to cause the problem with Microsoft Outlook (on the receiving side). The same problem happens when you send a single-page PDF document as an attachment along with an email signature from Apple iBooks on iOS.
For now, all iPad/iPhone users can do is to avoid the problems by using the workarounds that are described in How to avoid known PDF email attachment problems.
When new and different problems with PDF attachments are reported by Adobe Reader for iOS users, we will update the document above.
Sorry for the inconvenience. -
Canu2019t view Chinese characters in a PDF email attachment sent via SAP.
Canu2019t view Chinese characters in a PDF email attachment sent via SAP.
When open the Chinese characters come out funny.
Note: The document looks okay when previewed in SAP.
Tried the following:
FM CONVERT_OTF_2_PDF
CNSONG is one of our u201CSystem fontsu201D
Attempted with both ZH(Chinese simplified) and ZF(Chinese traditional) languages
Tried using a printer that is set up as u201CDevice Typeu201D PDF1
Tried using a printer that is set up as u201CDevice Typeu201D ZHKPDF
Tried passing device type as u201CCNSAPWINu201D
The following ADODE software was loaded: Chinese simplified, Chinese traditional,
Korean and JapaneseHi,
As a try, can you check this.
SET COUNTRY 'CN'. China country code.
SET LOCALE LANGUAGE 'CN'.
Thanks,
Vinod. -
Acrobat error when opening pdf email attachments
I have a user who has the latest version of Adobe Acrobat and Reader installed on his PC running Windows 7 Pro SP1 which is up to date on patches.
He was unable to open any pdf documents attached to email and was getting an error from Acrobat saying it couldn't open them. I changed the default file association for .pdf file from Acrobat to Reader and now he can open most pdf attachments. The only ones he is having a problem with are ones that come from his bank in what he was told by his banker are secure emails.
What happens when he clicks on the pdf attachment in the emails from his bank is that he gets a popup with Adobe Acrobat in the title bar of the popup and the message that says "Cannot use Adobe Reader to view PDF in your web browser. Reader will now exit. Please exit your browser and try again." The buttons to click on are OK and Cancel. If he clicks OK, the popup goes away and the pdf then opens in Reader.
So while he can view the pdf, he gets the annoying popup that he has to click through. Is there any way to get rid of that error message popup so when he clicks on the pdf in the secure emails, that it just opens without error like the pdf's do from non-secure emails?
JonathanPost your question in the forum for Adobe Reader.
-
PDF email attachment logo problem
Hi All,
Can any one tell me how to solve the problem with Email attachment in PDF. If i remove the logo of the client in the Smartform i am getting the Email attachment fine but when i put back the image in the smartform the PDF is giving error and not opening the attachment.
The image is working fine in 4.6 system but the problem with ECC6.
Regards,
Lakshmikanth.Hi All,
Can any one tell me how to solve the problem with Email attachment in PDF. If i remove the logo of the client in the Smartform i am getting the Email attachment fine but when i put back the image in the smartform the PDF is giving error and not opening the attachment.
The image is working fine in 4.6 system but the problem with ECC6.
Regards,
Lakshmikanth. -
Web OS 1.4, PDF email attachment problem
Since 1.4 I can no longer expand/zoom in on a PDF page email attachment. I get a lot of my purchase orders by email this way and now I can no longer read them when on the road. Gee thanks PALM, you just set me back to the dark ages.
Anyone else having this problem?
This question was solved.
View Solution.Thanks for such a speedy solution - I will scamper back into my cave now........
Kevin -
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 -
Smartform PDF email attachment problem
I am not able to see the attachment of email which is PDF format of smartform. It showing me the blank PDF page. Please check the following code and let me know where is the problem.
Thanks in stack.
CONVERT PDF FORMAT
I_OTF[] = WA_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,
WA_DOC_CHNG.
I_OBJBIN[] = I_RECORD[].
Create Message Body**** Title and Description
I_OBJTXT = 'PDF ATTACHMENT 2 !'.
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.
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 = 'HELLO NILESH'.
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'
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.Hai
go through the following code
REPORT ZRICH_0003.
DATA: ITCPO LIKE ITCPO,
TAB_LINES LIKE SY-TABIX.
Variables for EMAIL functionality
DATA: MAILDATA LIKE SODOCCHGI1.
DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
PERFORM SEND_FORM_VIA_EMAIL.
FORM SEND_FORM_VIA_EMAIL *
FORM SEND_FORM_VIA_EMAIL.
CLEAR: MAILDATA, MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
REFRESH: MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
Creation of the document to be sent File Name
MAILDATA-OBJ_NAME = 'TEST'.
Mail Subject
MAILDATA-OBJ_DESCR = 'Subject'.
Mail Contents
MAILTXT-LINE = 'Here is your file'.
APPEND MAILTXT.
Prepare Packing List
PERFORM PREPARE_PACKING_LIST.
Set recipient - email address here!!!
MAILREC-RECEIVER = '[email protected]'.
MAILREC-REC_TYPE = 'U'.
APPEND MAILREC.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = MAILDATA
PUT_IN_OUTBOX = ' '
TABLES
PACKING_LIST = MAILPACK
OBJECT_HEADER = MAILHEAD
CONTENTS_BIN = MAILBIN
CONTENTS_TXT = MAILTXT
RECEIVERS = MAILREC
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
ENDFORM.
Form PREPARE_PACKING_LIST
FORM PREPARE_PACKING_LIST.
CLEAR: MAILPACK, MAILBIN, MAILHEAD.
REFRESH: MAILPACK, MAILBIN, MAILHEAD.
DESCRIBE TABLE MAILTXT LINES TAB_LINES.
READ TABLE MAILTXT INDEX TAB_LINES.
MAILDATA-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( MAILTXT ).
Creation of the entry for the compressed document
CLEAR MAILPACK-TRANSF_BIN.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 0.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'RAW'.
APPEND MAILPACK.
Creation of the document attachment
This form gets the OTF code from the SAPscript form.
If you already have your OTF code, I believe that you may
be able to skip this form. just do the following code, looping thru
your SOLISTI1 and updating MAILBIN.
PERFORM GET_OTF_CODE.
LOOP AT SOLISTI1.
MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
APPEND MAILBIN.
ENDLOOP.
DESCRIBE TABLE MAILBIN LINES TAB_LINES.
MAILHEAD = 'TEST.OTF'.
APPEND MAILHEAD.
Creation of the entry for the compressed attachment
MAILPACK-TRANSF_BIN = 'X'.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 1.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'OTF'.
MAILPACK-OBJ_NAME = 'TEST'.
MAILPACK-OBJ_DESCR = 'Subject'.
MAILPACK-DOC_SIZE = TAB_LINES * 255.
APPEND MAILPACK.
ENDFORM.
Form GET_OTF_CODE
FORM GET_OTF_CODE.
DATA: BEGIN OF OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF OTF.
DATA: ITCPO LIKE ITCPO.
DATA: ITCPP LIKE ITCPP.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
Start writing OTF code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZTEST_FORM'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'START_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
WINDOW = 'MAIN'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
MOVE-CORRESPONDING ITCPO TO ITCPP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
TABLES
OTFDATA = OTF
EXCEPTIONS
OTHERS = 1.
Move OTF code to structure SOLI form email
CLEAR SOLISTI1. REFRESH SOLISTI1.
LOOP AT OTF.
SOLISTI1-LINE = OTF.
APPEND SOLISTI1.
ENDLOOP.
ENDFORM.
Thanks & Regards
Sreenivasulu P -
Excluding/hiding fields in PDF email attachment
Hi all,
We have created an online interactive form that has several elements, a dropdownbox, a subform and input textfields, that are hidden for the user in "Preview"/"Display"-mode.
We are using the following code to hide the elements (using FormCalc):
if($record.CONTROL_PARAM.ISR_MODE == "DISPLAY" |
$record.CONTROL_PARAM.ISR_FORM_VIEW =="ISR_APPROVE" |
$record.CONTROL_PARAM.ISR_REVIEW == "true")
then
this.presence = "invisible"
else
this.presence = "visible"
endif
The requirement is to send this form as a PDF attachment to an email without the hidden fields. Currently the PDF attachment includes all the fields.
We are using LifeCycle Designer 7.1, and are on Netweaver 04.
Hope someone can help!
Regards,
EllenHi Ellen,
How do you send the form by mail ?
Try to not pass value for the field you want to exclude .
hope this help you
Regards -
Scanned pdf email attachment - converted to text pdf - file then renamed to specific contents
Hi All,
Im new to the world of programming, So forgive me if this is a stupid request.
I'm wanting to use a mail rule in outlook to call a vba script, to save all attachments from a certain email address. I have successfully done this part. Using the below code:
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "c:\temp\"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
Now my problem is the saved attachment is a scanned pdf (non readable). I'm wanting to convert this into a readable text pdf, then extract certain data from the now readable PDF and use this data to rename the pdf.
Now i've done some reasearch on the subject and I believe adobe SDK has a function to allow this, I was wondering if anyone could give me any pointers or code to achieve what im trying to do here.
Im using windows xp
Adobe Acrobat 6.0 ( I know it's old but its the only licence we own)
Microsoft Outlook 2007
Any help would be GREATLY appreciated.
NickHi Thanks for your reply, please can you confirm which version of adobe acrobat I would need that will work with outlook 2007? Also could you please supply me with pointers and/or the code to make this work with the correct version.
Many Thanks -
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 -
Hi All,
I have a created a custom workflow which sends pdf files to the user.I created a document attribute and attached to the message.Im able to see the pdf file in the application notofiaction but not in the email as attachment.any clue why Im not seeing the attachment in my email?
Please help!
Thanks
ThomasREPORT ysam_im_test_wf.
INCLUDE <cntn01>.
TYPE-POOLS: swlc.
INCLUDE <symbol>.
DATA :
lv_header TYPE swr_att_header,
lv_objsofm TYPE swotobjid-objtype,
lv_objtkey TYPE swotobjid-objkey.
* ls_fitment TYPE r_fitment_mstr,
DATA : lv_xstring TYPE xstring,
att_id TYPE swr_att_id,
lv_return TYPE sy-subrc.
DATA : bo_sofm TYPE swc_object .
DATA: l_docwrapper1 TYPE xstring,
l_existence(1) TYPE c.
DATA: t_message_lines TYPE swr_messag OCCURS 0 WITH HEADER LINE.
PARAMETERS: p_wid TYPE swr_struct-workitemid.
START-OF-SELECTION .
CALL FUNCTION 'ZGEN_IMAGE_DATA_GET'
EXPORTING
i_zuonr = '100028'
IMPORTING
l_docwrapper1 = l_docwrapper1
existence = l_existence
EXCEPTIONS
service_call_error = 1
file_download_error = 2
browser_invoke_error = 3
OTHERS = 4.
lv_xstring = l_docwrapper1.
IF lv_xstring IS NOT INITIAL.
UPDATE tvarv SET low = 'XSTRING'
WHERE name = 'ZSAMTEST1'.
lv_header-file_type = 'B'.
lv_header-file_name = 'Invoice Attachment'.
lv_header-file_extension = 'PDF'.
lv_header-language = 'EN'.
CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
EXPORTING
workitem_id = p_wid
att_header = lv_header
att_bin = lv_xstring
IMPORTING
return_code = lv_return
att_id = att_id
TABLES
message_lines = t_message_lines.
IF lv_return = 0.
lv_objtkey = att_id-doc_id.
lv_objsofm = 'SOFM'.
swc_create_object bo_sofm lv_objsofm lv_objtkey.
ENDIF. " IF lv_return = 0
ELSE.
att_id = 0.
lv_objtkey = att_id-doc_id.
swc_create_object bo_sofm lv_objsofm lv_objtkey.
ENDIF. -
PDF email attachment decoded properly
When I save an attachment that is sent to me though email and later try to open the attachment I get a window that states the attachment was improperly decoded. How do I fix it.
If the attachment was damaged during the email transfer, then there is nothing you can do after the message has arrived.
However: what is the exact message you are getting? What is your Reader version?
Can you save the PDF to your local disk, then open it with a text editor (like Notepad); copy and post the first few lines here in the forum.
Maybe you are looking for
-
My 3000H will no longer connect to the internet via my cable modem - help please.
I have 3 computers and a media server on a Linksys router with a Comcast cable modem. Everything AOK. 3 weeks ago my Lenovo 3000H shut down and rebooted for no reason. Then I began getting popups while I was on the internet saying that I needed to cl
-
Manipulating XML file using flex 2.0
Hi, how to add contents in to xml file using flex 2.0, ie i actually wants to write data in to a xml file, so that data to be appended at the end of the file. Kumar
-
How do i edit a video on my iphone 6
I have to submit a music video to a competition and I can't figure out how to edit it to make it shorter. Help? THANKS!
-
Desktop Manager Hanging Up During Execution
I installed Blackberry Desktop Manager version 6.034 on to a Dell Latitude E6520. The operating system is Windows 7 64-bit. The user has a Bold 9650. Several attempts to connect the phone to synchronize failed. Either with the phone connected or disc
-
Dear Experts, I have a requirement where I need to get the financial statement in 3 currencies. Now I have gone to T code OB22 but the problem is in OB22 T code first i need to define group currency and assign. Could you please help on how to define