Rundll32 error when opening a PDF attachment from Outlook 2010
The computer is a 32 bit Win7. Outlook is 2010 for business. Everything was working fine until 4 days ago. Now have to save the pdf to the desktop and open it from there.
Any ideas?
Thanks
The rundll32 error seems to have disappeared. Until this morning I had both this error and the rundll32. All other types of docs open fine. This one will open if saved to the desktop first, but not from Outlook.
Similar Messages
-
Error when opening the PDF attachment
Hi,
We are able to successfully send the PDF attachment to external email id from SAP SCRIPT:
but when we are opening the PDF attachment we are getting the following error:
"Adobe Reader could not open because it is not either a supported file type or the file has been damaged ..etc.."
Is any logic need to write for the above or any parameters are missing .
Can any one help...
Thanks in advance.Hi Ramana,
Just try below given example code.....In which I have just different function Module to convert from OFT to PDF....
AT END OF VSTEL.
IF R_EMAIL = 'X'.
*--Opening Layout set for Printing
PERFORM CLOSE_FORM.
SELECT SINGLE SMTP_ADDR INTO V_EMAIL
FROM ADR6
WHERE ADDRNUMBER = T_ADRC-ADDRNUMBER.
CLEAR T_LIPS.
READ TABLE T_LIPS WITH KEY VBELN = T_LIKP-VBELN.
CLEAR T_VBAK.
READ TABLE T_VBAK WITH KEY VBELN = T_LIPS-VGBEL.
CLEAR V_ADRNR.
SELECT SINGLE ADRNR
INTO V_ADRNR
FROM T001
WHERE BUKRS = T_VBAK-BUKRS_VF.
REFRESH T_CC_EMAIL.
CLEAR T_CC_EMAIL.
SELECT SMTP_ADDR INTO TABLE T_CC_EMAIL
FROM ADR6
WHERE ADDRNUMBER = V_ADRNR.
SELECT SINGLE smtp_addr
INTO cc_email
FROM adr6
WHERE addrnumber = v_adrnr.
IF T_TO_EMAIL[] IS INITIAL.
CLEAR T_CC_EMAIL.
REFRESH T_CC_EMAIL.
ENDIF.
PERFORM BUILD_PDF_DATA_TABLE.
Populate message body text
PERFORM POPULATE_EMAIL_MESSAGE_BODY.
CONCATENATE T_LIKP-VSTEL '-' 'Warehouse Release' INTO V_SUBJECT SEPARATED BY SPACE.
Send file by email as .xls speadsheet
PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
TABLES IT_MESSAGE
PT_CONTENTS_BIN "LINES "it_attach
USING V_EMAIL
V_SUBJECT
'PDF'
'Delivery'
'Deliveries'
CHANGING GD_ERROR
GD_RECIEVER.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
ENDIF.
ENDAT.
***---/End by sagun
ENDLOOP. "loop at t_likp.
***---/added by sagun 25.05.2007
IF R_EMAIL = 'X'.
WRITE /01 SY-ULINE(180).
WRITE :/55 'End of Report'.
ENDIF.
***---/end by sagun
ENDFORM. " PRINT_DELIVERY
*& Form close_form
text
--> p1 text
<-- p2 text
FORM CLOSE_FORM .
IF R_PRINT = 'X'. " added by sagun 24.05.2007
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF. " added by sagun 24.05.2007
IF R_EMAIL = 'X'.
*otf_table like itcoo occurs 0 with header line
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = .
TABLES
OTFDATA = HOTFDATA
EXCEPTIONS
UNOPENED = 3.
ENDIF.
ENDFORM. " close_form
*& Form BUILD_PDF_DATA_TABLE
text
--> p1 text
<-- p2 text
FORM BUILD_PDF_DATA_TABLE .
DATA : LC_FORMAT(3) TYPE C VALUE 'PDF'.
DATA: lt_tline TYPE tp_tline_standard_table,
DATA : L_BIN_FILESIZE TYPE I,
PC_CONTENTS_BIN_LINES TYPE I.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = LC_FORMAT
IMPORTING
BIN_FILESIZE = L_BIN_FILESIZE
TABLES
OTF = HOTFDATA
LINES = LINES
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC = 0.
CALL FUNCTION 'QCE1_CONVERT'
TABLES
T_SOURCE_TAB = LINES
T_TARGET_TAB = PT_CONTENTS_BIN
EXCEPTIONS
CONVERT_NOT_POSSIBLE = 1
OTHERS = 2.
IF SY-SUBRC = 0.
DESCRIBE TABLE PT_CONTENTS_BIN LINES PC_CONTENTS_BIN_LINES.
ELSE.
... -->
ENDIF.
ELSE.
An OTF conversion error occured
-->
ENDIF.
ENDFORM. " BUILD_PDF_DATA_TABLE
*& Form POPULATE_EMAIL_MESSAGE_BODY
text
--> p1 text
<-- p2 text
FORM POPULATE_EMAIL_MESSAGE_BODY .
REFRESH IT_MESSAGE.
IT_MESSAGE = 'Please find enclosed here with our Warehouse Release Document(s)'.
APPEND IT_MESSAGE.
CLEAR IT_MESSAGE.
APPEND IT_MESSAGE.
APPEND IT_MESSAGE.
APPEND IT_MESSAGE.
APPEND IT_MESSAGE.
IT_MESSAGE = 'For United Phosphorous Inc.'.
APPEND IT_MESSAGE.
CLEAR IT_MESSAGE.
APPEND it_message.
APPEND it_message.
APPEND it_message.
IT_MESSAGE = 'TEST EMAIL from 520 clinet please ignore it'.
APPEND IT_MESSAGE.
ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
text
-->PIT_MESSAGE text
-->PIT_ATTACH text
-->P_EMAIL text
-->P_MTITLE text
-->P_FORMAT text
-->P_FILENAME text
-->P_ATTDESCRIPTION text
-->P_SENDER_ADDRESS text
-->P_SENDER_ADDRES_TYPE text
<--P_ERROR text
<--P_RECIEVER text
FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES PIT_MESSAGE
PIT_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.
p_filename = 'INVOICE'.
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 PIT_ATTACH INDEX W_CNT.
W_DOC_DATA-DOC_SIZE =
( W_CNT - 1 ) * 255 + STRLEN( PIT_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[] = PIT_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.
LOOP AT T_TO_EMAIL WHERE EMAIL <> SPACE.
CLEAR T_RECEIVERS.
T_RECEIVERS-RECEIVER = T_TO_EMAIL-EMAIL.
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COM_TYPE = 'INT'.
T_RECEIVERS-NOTIF_DEL = 'X'.
T_RECEIVERS-NOTIF_NDEL = 'X'.
APPEND T_RECEIVERS.
CLEAR T_RECEIVERS.
ENDLOOP.
copy email address
CLEAR T_RECEIVERS.
IF NOT T_RECEIVERS[] IS INITIAL.
LOOP AT T_CC_EMAIL.
T_RECEIVERS-RECEIVER = T_CC_EMAIL-EMAIL.
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COM_TYPE = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
T_RECEIVERS-COPY = 'X'.
APPEND T_RECEIVERS.
CLEAR T_RECEIVERS.
ENDLOOP.
ENDIF.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
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.
IF SY-SUBRC = 0.
FORMAT COLOR COL_NORMAL ON.
LOOP AT T_LOG.
WRITE :/03 T_LOG-VBELN,
19 SY-VLINE,
20 T_LOG-KUNNR,
34 SY-VLINE,
35 T_LOG-NAME1,
76 SY-VLINE,
77 T_LOG-EMAIL,
110 SY-VLINE,
111 'Email Sent Successfuly',
180 SY-VLINE.
ENDLOOP . "t_log
FORMAT COLOR COL_NORMAL OFF.
CLEAR T_LOG.
REFRESH T_LOG.
ENDIF.
IF SY-SUBRC NE 0.
CASE LD_ERROR.
WHEN 1.
V_ERROR = 'too_many_receivers' .
WHEN 2.
V_ERROR = 'Email address not found in Customer Master' .
WHEN 3.
V_ERROR = 'document_type_not_exist'.
WHEN 4.
V_ERROR = 'operation_no_authorization'.
WHEN 5.
V_ERROR = 'Email address not found in Customer Master'.
WHEN 6.
V_ERROR = 'x_error'.
WHEN 7.
V_ERROR = 'enqueue_error'.
WHEN 8.
V_ERROR = 'Error in sending email' .
ENDCASE.
FORMAT COLOR COL_NEGATIVE ON.
LOOP AT T_LOG.
WRITE :/03 T_LOG-VBELN,
19 SY-VLINE,
20 T_LOG-KUNNR,
34 SY-VLINE,
35 T_LOG-NAME1,
76 SY-VLINE,
77 T_LOG-EMAIL,
110 SY-VLINE,
111 V_ERROR,
180 SY-VLINE.
ENDLOOP . "t_log
FORMAT COLOR COL_NEGATIVE OFF.
CLEAR T_LOG.
REFRESH T_LOG.
ENDIF.
ENDFORM. " SEND_FILE_AS_EMAIL_ATTACHMENT
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
text
--> p1 text
<-- p2 text
FORM INITIATE_MAIL_EXECUTE_PROGRAM .
WAIT UP TO 2 SECONDS.
SUBMIT RSCONN01 WITH MODE = 'INT'
WITH OUTPUT = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
Reward Point If it usefull....
Cheers,
Sagun Desai.... -
Can´t open pdf attachment in Outlook 2010 after inst. Reader X
Hi!
Today I updated Reader from 9 to 10.1.2 - I did not face any problems with the installation.
But now I can not open any pdf attachment in Outlook 2010 (Reader opens and closes immediately) if Reader X is not running.
When the Reader is allready running I can open the files without problems.
When I save the file on my desctop I can also open it - also if reader is not allready running.
I un- and reinstalled the reader fiew times, also tried the repair tool - nothing helped.
I receive a lot of pdf Files - any help would be great.Did you try this? It worked for me.
http://www.darrenstraight.com/blog/2010/12/16/adobe-reader-x-there-was-an-error-opening-th is-document-access-denied/
Open up Adobe Reader X
On the Toolbar Menu go to Edit > Preferences
Go to the general tab under Categories.
Untick “Enable Protected Mode at Startup”
If asked if sure, click Yes and then Ok.
Now close Adobe Reader X and try opening the PDF again. -
Outlook 2010 gives error when opening a PowerPoint attachment.
Outlook 2010 gives error when opening a PowerPoint attachment.
Hi All,
We have several VIP employees that are getting the following error on all PowerPoint documents that come as attachments from Outlook.
I have researched and tried the following steps and verified these settings are already applied.
I did find a work around but not a fix and our security team will NOT allow me to change this setting however if I uncheck the setting all employees can open the outlook attachment.
Any other ideas on a fix for this if I am unable to uncheck Enable Protected View.Hi Matthew,
This is a perennial problem, here is a thread which has a deep discussion about this issue:
http://social.technet.microsoft.com/Forums/office/en-US/07f710a5-a6ca-4256-8f27-6aac41a6b37e/outlook-2010-unable-to-open-word-excel-and-power-point-attachments-from-an-email?forum=outlook
It looks like nobady really find a solution there, the only workaround is what you have found - change the protected view setting in Trust Center. You will lose some security by doing this but it seems to be the only solid solution currently. -
3138 SQL error opening sqlite db file from Outlook 2010 as attachment
Has anyone of you tried sending the sqlite db file thru e-mail and then open the file from Outlook 2010?
I have an air app that can be opened by doubleclicking the sqlite database file (invoke event). The file is sent via e-mail from the app itself, so another user can run the app directly from their e-mail client once he receives the db. Now everything works fine unless you use Outlook 2010 - when I open it I get an sql error 3138 - do you know what can be the problem? Everything is fine when I'm using different e-mail client (the same e-mail account, just other client) like Outlook 2003 or Thunderbird or Opera. I'm guessing Outlook 2010 is using some kind of protection to attachments that is making the file not understandable by the app, but Microsoft seems to ignore my e-mails sent to them with the same question. The db file is not encrypted if that changes anything and saving the file from outlook to desktop and then running does not help. When I do the same using Outlook 2003 everything works as it should, but unfortunatelly my customer upgraded to 2010 :/ Any ideas would be much appreciated.This looks like a new behavior of Outlook 2010 and isn't specific to PDFs. You will need to "save as" the document. There is a thread at Microsoft forums about this with some possible workarounds:
http://social.technet.microsoft.com/Forums/en-US/outlook/thread/927d678d-b55b-4732-93cb-f1 3ed1dacf96/ -
[N95 8GB]Out of Memory error when opening 15MB pdf...
What is the file size limit when opening a pdf file? I have a 15MB pdf file that cause 'Out of memory' error when I opened it with the PDF Reader that comes with the phone.
Thanks.Hi,
It seems that problem is file specific, so could you please share a file with me. I sending you a private message.
Regards,
Anoop -
How do I open a PDF attachment from an email so I can edit it for reply on an iPad?
I need to open a PDF attachment on an email, edit it and resend it back to the originator on an iPad. Help?
A PDF is a graphics document, so you can't edit it without access to an expensive program like Adobe Acrobat.
-
Errors when opening any PDF file
Can't find a bytecode file to load.
InitializeFormsTrackerJS is not defined
1:App:Init
ReferenceError: InitializeFormsTrackerJS is not defined
1:App:Init
From the Javascript console I get the above whenever I open any PDF file from Acrobat XI Pro.
I'm at version 11.0.7.
Where is the source of this problem ?
A search for InitializeFormsTrackerJS shows no hits in the Javascript folder.The folder is Acrobat\Javascripts
Repair your Acrobat installation. -
Error when printing a PDF direct from SAP archive
Hi together,
I try to print a PDF direct from SAP archive and I got the error ""C:\Program files\Adobe\Acrobat 7.0\reader\AcroRd.exe" /p /h" not found. In the internet I found several topics which describe this way to print a PDF without open the Acrobat Reader.
The customizing for document management (Local application) seems o.k. If I remove in the registry the parameters /h /p for print, Acrobat Reader will open and show the document if I use the print button in SAP.
Have anybody an idea what the reason is?
Thank you.
Regards
ThomasThe rundll32 error seems to have disappeared. Until this morning I had both this error and the rundll32. All other types of docs open fine. This one will open if saved to the desktop first, but not from Outlook.
-
Error when opening a pdf file in chinese
Hello,
I have created a specific PO form by copying the standard one BBP_PO in SRM.
After generating a pdf file with my specific form, I get the error "There was a problem reading this document (15)" when I try to open it.
I can see some characters, and then everything disappears. I have both english and chinese characters.
The chinese language is installed.
If I use the standard form, I don't get the error !
In the form, I use some standard text, which are created in english and chinese.
Thanks for your help.
MarcJust so you know, my default PDF can opener remains set to Preview, though I will use Acrobat Reader when and if it serves my need.
The upside of the Show scroll bars set to always is intuitive with applications. The downside is that any web content that has the CSS overflow:scroll configured will permanently have scrollbars attached to that content. At least, that is the behavior with Safari on Mavericks. Since I do web work too, I have left my scrollbar setting to when scrolling.
I believe the OP issues about resizing PDFs has to do with the default nature of Preview to open PDFs in continuous, rather than single page mode. In the former state, one must always fuss with resizing the Preview window, and in the latter, Preview does what it should do — a single, tightly cropped PDF page. Setting the Single Page preference setting in one document does not make this behavior permanent for subsequent documents.
I made two changes to Preview that open any PDF in Single Page mode, and tightly cropped to that page:
Preview PreferencesPDF: Define 100% scale as: Size on screen equals size on printout
Defaults write
Change to ~/Library/Containers/com.apple.Preview/Data/Library/Preferences
defaults write com.apple.Preview kPVPDFDefaultPageViewModeOption 1
Continuous view mode is (0) zero
PDF documents will now default to Single Page mode -
Error while opening the Pdf Attachment at the time sending mail ..
Hi Frn's ,
i am sending a mail with pdf attachment ... but the pdf is not opening ...it is giving error "There was and error opening this document . This file can not be open because it has no page ."
Please resolve the problem ...below is the code pasted ..
REPORT ZPRI_TEST_LDB.
DATA: it_pdf LIKE tline OCCURS 0 WITH HEADER LINE .
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.
DATA: w_recsize TYPE i.
DATA: gd_recsize TYPE i.
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.
data: gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT 'abc,
p_sender LIKE somlreci1-receiver
DEFAULT 'abc'.
perform write_output .
perform create_pdf .
PERFORM process_email .
FORM WRITE_OUTPUT .
write:'Listed below are the employees in your area who are due a Performance Appraisal'.
write:'during the month of May 2009 .A performance appraisal form can be found on-line'.
write: 'in the MUD template section .The Performance Appraisal is to be completed and' .
write:'discussed with the employee by the immediate supervisor .Signed forms should be '.
write: 'returned to the Human Resource Department by May 31,2009 .'.
skip 2 .
write: 'employee name' .
write: 'Job Date' .
write: 'Date of last appraisal' .
ENDFORM. " WRITE_OUTPUT
FORM CREATE_PDF .
DATA: spoolno LIKE tsp01-rqident.
DATA : p_repid LIKE sy-repid .
DATA: v_len TYPE i , v_len1 TYPE i .
DATA: v_temp(8) TYPE c .
DATA: p_uname LIKE sy-uname .
DATA: it_tsp01 TYPE STANDARD TABLE OF tsp01 WITH HEADER LINE .
DATA: it_pdf LIKE tline OCCURS 0 WITH HEADER LINE .
TABLES: tsp01.
data: var type c .
*-- STRUCTURES
DATA:
lc_rq2name LIKE tsp01-rq2name.
DATA:
mstr_print_parms LIKE pri_params,
mc_valid(1) TYPE c,
mi_bytecount TYPE i,
mi_length TYPE i,
mi_rqident LIKE tsp01-rqident.
*-- INTERNAL TABLES
DATA:
mtab_pdf LIKE tline OCCURS 0 WITH HEADER LINE,
mc_filename LIKE rlgrap-filename.
*-- SELECTION SCREEN
DATA:
p_linsz LIKE sy-linsz VALUE 132, " Line size
p_paart LIKE sy-paart VALUE 'X_65_132'. " Paper Format
*-- Setup the Print Parmaters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
authority = space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
IMPORTING
out_parameters = mstr_print_parms
valid = mc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
importing variable value set at first time to restrict the infinite loop .
IMPORT var FROM MEMORY ID 'abc' .
var = var + 1 .
p_uname = sy-uname .
p_repid = sy-repid .
*checking variable to restricted scecond time exction of this block of code
IF var = 1 .
v_memid = 1 .
EXPORT var TO MEMORY ID 'abc' .
start ----p3d(02/13/2009)
EXPORT it_pernr it_pernr_quali v_memid it_pernr_status
p_file p_file1 rb_pres rb_app rb2 TO MEMORY ID 'bcd' .
EXPORT it_pernr it_pernr_quali v_memid it_pernr_status it_notqualified
p_file p_file1 rb_pres rb_app rb1 rb2 rb3 rb4 TO MEMORY ID 'bcd' .
EXPORT it_pernr it_pernr_quali v_memid it_pernr_status it_notqualified
p_file p_file1 rb_pres rb_app rb3 rb4 TO MEMORY ID 'bcd' .
end ----p3d(02/13/2009)
submitting the spool request
SUBMIT (p_repid) TO SAP-SPOOL
SPOOL PARAMETERS mstr_print_parms
WITHOUT SPOOL DYNPRO
AND RETURN.
ENDIF.
FREE MEMORY ID 'abc'.
FREE MEMORY ID 'bcd'.
*Calculating the lenth of report name
v_len = STRLEN( p_repid ) .
*consutrucing the database variable rq2name to search the spool request
IF v_len >= 9 .
CONCATENATE p_repid+0(9)
p_uname+0(3) INTO lc_rq2name .
ELSE.
v_len1 = 9 - v_len .
DO v_len1 TIMES .
CONCATENATE v_temp '_' INTO v_temp .
ENDDO.
CONCATENATE p_repid v_temp
p_uname INTO lc_rq2name .
ENDIF.
*selecting the spool request using the above consructed varibale
SELECT * FROM tsp01 INTO TABLE it_tsp01
WHERE rq2name = lc_rq2name .
*sorting the interbla table
SORT it_tsp01 BY rqcretime DESCENDING .
*reading the first spool request
READ TABLE it_tsp01 INDEX 1.
*converting the spool request into pdf
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = it_tsp01-rqident
dst_device = 'LP01'
TABLES
pdf = it_pdf
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.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf.
TRANSLATE it_pdf USING ' ~'.
CONCATENATE gd_buffer it_pdf 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. " CREATE_PDF
FORM SEND_eMAIL using p_email .
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'.
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. " SEND_MAIL
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_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'
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.
Thanks and Regards ..
Priyankhi this is the part of code ...
PERFORM process_email .
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf.
TRANSLATE it_pdf USING ' ~'.
CONCATENATE gd_buffer it_pdf 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. " CREATE_PDF
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 using p_email .
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'.
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. " SEND_MAIL
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'
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. -
Error while opening the PDF attachment
HI SDN's
I have to send order confirmation thru mail as a pdf attachment as soon as order has been saved.
I have written the code and assigned to output type.
Here I am getting an error opening a converted pdf file with Adobe Reader
The error message reads:
Adobe Reader could not open "filename.PDF" 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).
Any help would be appreciated.
Thanks in advance
VRhello, i have the same problem as VR's. The pdf file sent to my email is not able to open. You mentioned that this is only supported by early releases of Adobe. But anyhow, I followed your advice to have my spool converted to PDF, instead of OTF to PDF. But I get this error: Spool request 23595 contains no ABAP list data.
What exactly my transaction does is that, it makes use of a sapscript layout via VL02N using an output type. I retrieve the OTF data in CLOSE_FORM function module. OTF is then converted to PDF via SX_OBJECT_CONVERT_OTF_PDF, then send via email through SO_NEW_DOCUMENT_ATT_SEND_API1.
When I view the sent PDF file in my email, It cannot be opened.
I would appreciate your help guys! thank you very much. -
The issue:
www.norwich.gov.uk
When you carry out a search for "co-operative bank" and click the first result (which is a pdf), Adobe Reader is launched and the user sees this error: "There was an error opening this document, The filename, directory name or volume label syntax
is incorrect"
However, if you do any of these...
right-click the link and choose to open it in a new tab
right-click the link, copy the shortcut, paste it into the address bar and hit go
open the file directly from the library
open the file by clicking on a hyperlink
... you are prompted to Open or Save the file. On choosing 'Open' the file is opened in the browser window with no problems. It is only when clicking on the link in the search results that the issue arises. The issue only occurs with IE.
Current settings:
Client integration is disabled
Browser file handling is set to permissive
Default open behaviour for browser-enabled documents is set to open in the browser
DOCICON.xml is configured to show <Mapping Key="pdf" Value="icpdf.png" EditText="Adobe Acrobat" OpenControl=""/>
Disabling the Adobe Acrobat SharePoint Opendocuments add-on 'fixes' the issue, in that the user no longer sees the error, but instead sees the prompt. However, this doesn't help us as the site is public facing asn we cant control user's add-ons.
Hope someone can help.I tried this from my laptop with IE8 and it worked fine.
I trust that answers your question...
Thanks
C
|
RSS |
http://crayveon.com/blog |
SharePoint Scripts | Twitter |
Google+ | LinkedIn |
Facebook | Quix Utilities for SharePoint -
Error when reading a pdf attachment file in sap inbox
Hi all,
I have created a RFC which sends mail from an external user to my sap inbox with attachment.
the problem is with the PDF attachment where when i received the mail in my sap inbox in sbwp, it says that there is an error that it wasnt correctly decode.
I used the class cl_document_bcs...
and used the method add_attachment...
would plz help me outthis is my code
FUNCTION ZMAIL_READ.
*"*"Local Interface:
*" IMPORTING
*" VALUE(SUBJECT) TYPE SO_OBJ_DES
*" VALUE(TEXT) TYPE STRING
*" VALUE(SENDER) TYPE ADR6-SMTP_ADDR
*" VALUE(RECEIVER) TYPE ADR6-SMTP_ADDR
*" VALUE(ATTACHMENTS) TYPE Z_T_XATTACH OPTIONAL
*" EXPORTING
*" VALUE(MESSAGE) TYPE STRING
DATA: lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
lo_bcs_send_request TYPE REF TO cl_bcs,
l_send type ADR6-SMTP_ADDR ,
l_rec type ADR6-SMTP_ADDR .
data: it_text type table of soli,
wa_text type soli.
DATA: lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
DATA: lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
DATA: lv_recipient_uid TYPE uname,
lv_recipient_mail TYPE adr6-smtp_addr.
data: lo_message type ref to cx_send_req_bcs value is initial,
text_val type string.
data: it_userlist type table of BAPIUSNAME,
wa_userlist type BAPIUSNAME.
data: it_selection_range type table of BAPIUSSRGE,
wa_selection_range type BAPIUSSRGE.
data: wa_attachment TYPE ZXATTACH,
attachment_sub type SO_OBJ_DES.
DATA: xstr type xstring,
str TYPE string,
str1 type string,
it_str2 type table of soli,
wa_STR2 TYPE SOLI.
DATA: LOC_CONV TYPE REF TO CL_ABAP_CONV_IN_CE,
wa_solix type solix,
it_solix type table of solix,
wa_soli type soli,
it_soli type table of soli.
data result TYPE boolean.
data: i_ext(10) type c,
i_type type soodk-objtp.
wa_text-line = text.
append wa_text to it_text.
CLASS cl_bcs DEFINITION LOAD.
try.
lo_send_request = cl_bcs=>create_persistent( ).
catch cx_send_req_bcs.
endtry.
* Message body and subject
data: lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
try.
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = it_text
i_subject = subject ).
catch cx_send_req_bcs.
catch cx_document_bcs.
catch cx_address_bcs.
endtry.
loop at attachments into wa_attachment.
attachment_sub = wa_attachment-file_name.
it_str2 = wa_attachment-attach.
loop at it_str2 into wa_str2.
str1 = wa_str2-line.
try.
CALL FUNCTION 'SSFC_BASE64_DECODE'
EXPORTING
B64DATA = str1
* B64LENG =
* B_CHECK =
IMPORTING
BINDATA = xstr
* EXCEPTIONS
* SSF_KRN_ERROR = 1
* SSF_KRN_NOOP = 2
* SSF_KRN_NOMEMORY = 3
* SSF_KRN_OPINV = 4
* SSF_KRN_INPUT_DATA_ERROR = 5
* SSF_KRN_INVALID_PAR = 6
* SSF_KRN_INVALID_PARLEN = 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.
catch cx_sy_dyn_call_illegal_type.
endtry.
CALL METHOD CL_ABAP_CONV_IN_CE=>CREATE
EXPORTING
INPUT = xstr
ENCODING = 'UTF-8'
* REPLACEMENT = '?'
* IGNORE_CERR = ABAP_TRUE
RECEIVING
CONV = loc_CONV.
TRY.
CALL METHOD LOC_CONV->READ
IMPORTING
DATA = STR.
CATCH CX_SY_CONVERSION_CODEPAGE.
CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
CATCH CX_PARAMETER_INVALID_TYPE.
CATCH CX_PARAMETER_INVALID_RANGE.
ENDTRY.
wa_solix-line = xstr.
append wa_solix to it_solix.
wa_soli-line = str.
append wa_soli to it_soli.
endloop.
try.
CALL FUNCTION 'SA_KW_RFC_FILENAME_EXT_GET'
EXPORTING
AREA = 'IWBSOLAR'
MIMETYPE = wa_attachment-type
IMPORTING
EXTENSION = i_ext
catch cx_sy_dyn_call_illegal_type.
endtry.
i_type = i_ext.
if i_ext <> 'pdf'.
try.
lo_document->add_attachment(
EXPORTING
i_attachment_type = i_type
i_attachment_subject = attachment_sub
i_att_content_hex = it_solix ).
CATCH cx_document_bcs.
endtry.
clear wa_solix.
refresh it_solix.
else.
TRY.
CALL METHOD LO_DOCUMENT->ADD_ATTACHMENT
EXPORTING
I_ATTACHMENT_TYPE = i_type
I_ATTACHMENT_SUBJECT = attachment_sub
* I_ATTACHMENT_SIZE =
* I_ATTACHMENT_LANGUAGE = SPACE
I_ATT_CONTENT_TEXT = it_soli
* I_ATT_CONTENT_HEX =
* I_ATTACHMENT_HEADER =
CATCH CX_DOCUMENT_BCS .
ENDTRY.
ENDIF.
endloop.
try.
lo_send_request->set_document( lo_document ).
CATCH cx_send_req_bcs.
endtry.
wa_selection_range-PARAMETER = 'address'.
wa_selection_range-field = 'e_mail'.
wa_selection_range-sign = 'I'.
wa_selection_range-option = 'EQ'.
wa_selection_range-low = receiver.
append wa_selection_range to it_selection_range.
try.
CALL FUNCTION 'BAPI_USER_GETLIST'
* EXPORTING
* MAX_ROWS = 0
* WITH_USERNAME = ' '
* IMPORTING
* ROWS =
TABLES
SELECTION_RANGE = it_selection_range
* SELECTION_EXP =
USERLIST = it_userlist
* RETURN =
catch cx_sy_dyn_call_illegal_type.
endtry.
read table it_userlist into wa_userlist index 1.
try.
lo_sender = cl_cam_address_bcs=>create_internet_address( sender ).
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
catch cx_send_req_bcs.
catch cx_document_bcs.
catch cx_address_bcs.
return.
endtry.
try.
lo_recipient = cl_sapuser_bcs=>create( wa_userlist-USERNAME ).
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient ).
* i_express = 'X' ).
catch cx_send_req_bcs.
catch cx_document_bcs.
catch cx_address_bcs.
endtry.
try.
** Send email
LO_SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
lo_send_request->send( EXPORTING
i_with_error_screen = ' '
RECEIVING
result = result ).
COMMIT WORK.
CATCH CX_DOCUMENT_BCS.
CATCH CX_SEND_REQ_BCS INTO lo_message.
CATCH CX_ADDRESS_BCS.
text_val = lo_message->IF_MESSAGE~GET_TEXT( ).
endtry.
if result = 'X'.
message = 'E-Mail sent'.
else.
message = 'E-Mail not sent'.
endif.
ENDFUNCTION. -
No Email Client Associated Error When Opening a PDF
I get an Adobe Reader XI error dialogue when I open any PDF; it says "Email: There is no email program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default Programs control panel."
What does Adobe have to do with my email client?
How can this annoying error dialogue be fixed?
I am using a Windows 7 Professional OS
This did not happen with Adobe Reader XDoing some additional research on this I found that the message can occur from different programs: Word, Excel, ..., but all point to an Outlook configuration problem.
See if anything in here helps: http://social.technet.microsoft.com/Forums/windows/en-US/036e3cf6-bff7-4ef2-bd0a-555cd2399 ad4/there-is-no-email-program-associated-to-perform-the-requested-action-please-install-an -email?forum=w7itproappcompat
Maybe you are looking for
-
How can I find a group of lost photos from iPhoto?
When a recent Mac OS X update was installed on my computer which included the new Photo App, my iPhoto upgraded to this new app and was replaced by it on my desktop. In beginning to use the new Photo App, I discovered that it did not have the same ed
-
[JS] (CS3) InDesign- Bridge- mySQL (and back)
Hi there I'm trying to connect InDesign to mySQL database. So far I managed to make Bridge read/write to mySQL via its HttpConnection object (JavaScript Tools Guide.pdf p.170) & Apache/PHP: =========================================== if (webaccesslib
-
PC will not boot from power up
Since I purchased and fitted a new MSI K7T266 Pro2-U Mobo , the PC won't boot up from power on past the Win98 startup graphic. When I hit the reset button, it boots in safe mode, and will reboot OK after that, except that the memory show is only 256
-
HR_INFOTYPE_OPERATION mod not working
Hi all, Getting a bit desperate here. Using HR_INFOTYPE_OPERATION in 'INS' mode and that is working fine. However, when trying to change one field - ENDDA - with OPERATION=MOD it is just not doing it. Going thru most of the other posts regarding this
-
Moving keyfgures to some other place in the query designer
Hi I have lot of Keyfigures in the Query Designer (Columns). How can i move some other place in the query designer. Like We can move some of characteristics to "Free Charactersitic" area . Like that how can i move some of keyfigures to some other are