Help - PDF Attachment Problem
Hi,
Receently, some of our users experienced pdf attachment problem. The user sent a 4mb pdf attachment but after the mail was sent out it only showed 4k in sent item. When the recipient received the e-mail the attachment also showed 4kb and it can't be opend too. These users are using Outlook 2000 and our Exchange server is 2000 Enterprise.
Thanks for the help,
JY
Hi Suresh,
I just tried this thing in my systtem and it is working... BADI is trigerred everytime there is a change in the PO... even when you release there is a change in the PO so this BADI will be triggerred....
I suggest you should implement BADI in your dev system and place a break point in the POST method...
After that create a PO and release it using ME29N... thereafter when you save the PO... this method will trigger and you will have access to PO details...
PS: Remember this BADI wont work for transaction ME29...
Regards
Gautam
Similar Messages
-
Pdf attachment problems on osx lion
Hello
i was wondering if apple has fixed the pdf attachment problem seen on other iOS' such as 7.1. I get the same error (blank pdf file, white screen), however, it doesn't happen all the time.
any explanations and comments would be greatly appreciated!OS 7 or IOS 7?
If IOS 7, try the iPad community.
iPad Community -
PDF Attachment problem in Adobe form and send mail is not working
Dear Experts,
Recently i'm facing a problem regarding Adobe form PDF attachment and sending an e-mail along with the PDF attachment to customer mail id.But when i execute the RFC Function module, in customer side no mail is comming. And when i check the transaction SBWP then i found that the PDF attachment hold only 1KB of data which is not right.For that i'm sending my code which i was declared in my program.Can anybody please help me to overcome this problem?
Warm Regards,
sameek.
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
data: t_att_content_hex type SOLIX_TAB.
DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
DATA: lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
l_send type ADR6-SMTP_ADDR value 'Already provided an e-mail address here'.
DATA: lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
Message body and subject*
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL,
lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
APPEND 'Dear,' TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Please fill the attached form and send it back to us.'
TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Thank You,' TO lt_message_body.
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'Customer Information Form').
TRY.
lo_document->add_attachment(
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = 'Customer Information Form'
I_ATTACHMENT_SIZE =*
I_ATTACHMENT_LANGUAGE = SPACE*
I_ATT_CONTENT_TEXT =*
I_ATTACHMENT_HEADER =*
i_att_content_hex = t_att_content_hex ).
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
Add attachment*
Pass the document to send request*
lo_send_request->set_document( lo_document ).
Create sender*
lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
lo_sender = cl_sapuser_bcs=>create( sy-uname ).*
Set sender*
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
Create recipient*
lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).*
Set recipient*
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
lo_send_request->add_recipient(*
EXPORTING*
i_recipient = lo_recipient*
i_express = 'X' ).*
Send email*
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
message 'The Customer Information form has been emailed to the Employee' type 'I'.I am also facing issue with email send .
apex 4.1.1 oracle 11g
create or replace procedure email ( p_email in varchar2)
is
l_workspace_id number;
l_subject varchar2(2000);
l_body clob;
l_body_html clob;
l_email varchar2(40);
begin
l_workspace_id := apex_util.find_security_group_id (p_workspace => 'xyz');
apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
l_email:= p_email;
l_body := ' ';
l_subject := 'You have new tasks';
--if l_email=:P3_CONFIRM_EMAIL_ADDRESS is not null then
-- email( l_email =>:P3_CONFIRM_EMAIL );
-- end if;
l_body_html := '<p />The following tasks have been added.';
apex_mail.send (
p_to => l_email ,
p_from => '[email protected]',
p_body => l_body,
p_body_html => l_body_html,
p_subj => l_subject );
APEX_MAIL.PUSH_QUEUE;
end; I also check the log and queue but both are empty,
select * from
apex_mail_queue
select * from
apex_mail_log Kindly suggest what to do ?
I also created a process in apex , which call this procedure and pass the email address entered by user. -
Thunderbird sending pdf attachment problem – 'empty file' from mac to mac & PC
OSX 10.9.5 with TB 31.6
This problem has just started happening when sending PDFs to clients at different location who are using a mixture of email systems on Mac and PCs (different PDFs over the last week to differetent people but not everyone). The file arrives but it says 'empty file'. I have tried sending the same PDF though gmail and that arrives with no problem.
I can see this is a reoccuring problem with older TB releases but there doesn't seem to be a solution.
Can anyone help?
best
MartinI've now asked 2 people who have received PDFs either as "message saying that they are corrupted" ...
"Hi Martin. Many thanks - the files sent via MailBigFile have all opened up OK. I deliberately use a Mac to try and avoid viruses! No one else in the
factory could open them either. Kind regards, Nicky."
and
"I haven’t got anti-virus software. The third one you sent was openable (the one from from gmail). – Tim" ... this one said "empty file" also on a Mac. -
.pdf attachment problems
I have been having problems with my mail reversing the colors of any pdf attachments I get. It is just the preview of the pdf. If I open it in acrobat I can read it just fine. Any idea what setting in my mail would effect this?
If I double click the graphic that is displayed (the pdf file) then it opens in Acrobat.
My problem lies in the graphic that is displayed. I work for a local newspaper and receive/send pdf files all the time. The "preview" I see in my mail account looks nothing like what the actual file is. I can't see type, yellow color is blue, some graphics are not seen at all. But if I open it in Acrobat or Photoshop, everything looks fine.
Here is an example: The yellow is right, the blue is a screen shot of how I see it in mail
http://i43.tinypic.com/2rpv6f6.jpg
Or this one - I'm sure you can tell which one is right
http://i42.tinypic.com/mwbekz.png
Message was edited by: NDNews -
Help: PDF Generation Problems in Reports 3.0
Hi Techies,
We are generating PDFs from Oracle Reports 3.0
The PDF generation is fine in some datbases.
But in some database,when the records are more, during PDF
generation, Dr.Watson error is encountered, saying access
violation.
Can any one please clarify whether the error is due to memory
constraints on the system or if it has something to do with
Oracle Reports setting, while generating PDFs.
Do note that the reports are running fine, when the report has
less number of records.
Any suggestion/tip is awaited at the earliest.
Thanks in advance,
Geoff
nullHi!
Remove cache from output dir from time time.
(i.e. from virtual dir where report server puts output)
let me know ...
later
Geoff (guest) wrote:
: Hi Techies,
: We are generating PDFs from Oracle Reports 3.0
: The PDF generation is fine in some datbases.
: But in some database,when the records are more, during PDF
: generation, Dr.Watson error is encountered, saying access
: violation.
: Can any one please clarify whether the error is due to memory
: constraints on the system or if it has something to do with
: Oracle Reports setting, while generating PDFs.
: Do note that the reports are running fine, when the report has
: less number of records.
: Any suggestion/tip is awaited at the earliest.
: Thanks in advance,
: Geoff
null -
Facing problem with logo in the PDF attachment when sending mail...
hi friends,
i'm facing problem with logo in the PDF attachment to the mail.
my requirement:
1. enter spool number and mail id in the selection screen.
process:
1. now the program will fetch the spool data and converts it to PDF.
2. but when i'm trying to send mail with this PDF as attachment.
when i open the PDF file from the mail, logo is not coming properly (looks disturbed).
can anyone help me how to resolve this issue...
thanks in advance, murashali.hi dinakar, thanks for your mail...
logo looks good in spool/script/smartform.
even it look good when i download this spool to pdf and to the presentation server as pdf file.
i'm using CONVERT_OTFSPOOLJOB_2_PDF.
when i used CONVERT_ABAPSPOOLJOB_2_PDF, is gives a msg - 'spool number not found'.
here i'm using folloing code to pass pdf to the function module: SO_NEW_DOCUMENT_ATT_SEND_API1.
code:
Transfer the 132-long strings to 255-long strings
lt_mtab_pdf[] = pdf[].
LOOP AT lt_mtab_pdf INTO lwa_mtab_pdf.
TRANSLATE lwa_mtab_pdf USING ' ~'.
CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
CLEAR lwa_mtab_pdf.
ENDLOOP.
TRANSLATE lv_gd_buffer USING '~ '.
DO.
lwa_mess_att = lv_gd_buffer.
APPEND lwa_mess_att TO lt_mess_att.
CLEAR lwa_mess_att.
SHIFT lv_gd_buffer LEFT BY 255 PLACES.
IF lv_gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
NOTE: problem i believe is with ''. i'm getting this tilt symbol () in my pdf internal table. here in the above code the line TRANSLATE lv_gd_buffer USING '~ ' is changing the existing tilt to space. so my logo is getting disturbed.
even i tried with REPLACE this tilt with other char, but it doent work.
can you give any idea... -
Problem for Mail with PDF attachment
Hello all,
I have a problem regarding sending mail with a PDF attachment from SAP. The attachment contains Payslip of employee that is being generated from a Submit program of the respective HRFORM. I have used the Submit program within a JOB and the spool request generated. From the spool request i am extracting the pages using FM RSPO_GET_PAGES_SPOOLJOB.
Now to convert the spool job to PDF am using FM CONVERT_OTFSPOOLJOB_2_PDF. And after the job is being finished, am deleting both the JOB and SPOOL.
To change the output of the FM CONVERT_OTFSPOOLJOB_2_PDF, into attachment with line width of 255 am using FM SX_TABLE_LINE_WIDTH_CHANGE. Then after filling all the required parameters for FM SO_DOCUMENT_SEND_API1, am sending the mail with the attachment. I have kept the format as PDF.
But the problem here is, the attachment is going as .DAT file and not as .PDF file!!!
Please help to resolve this issue.
with regards,
Koushik.Hello,
Instead of using SO* APIs to send mail you should use the BCS classes. Anyway there is a sample program BCS_EXAMPLE_8 which is very similar to your requirement
Cheers,
Suhas
PS: The sample program BCS_EXAMPLE_6 has got more to do with PDF forms as is your case -
E-Mail problems - will not open pdf attachment found in my e-mail...
Here what I’m using:
OS X (10.3.9)
safari 1.2 (v125)
SBC Yahoo DSL (sbcglobal.net)
SBC MAIL
Running through Safari 1.2 (v125)
Over the weekend I elected to empty my cache and reset Safari (don’t ask me why - I guess I through by doing so it would speed up Safari which as been running a bit show of late) - now I’m unable to open any of my current or new pdf attachments.
I open a pdf attachment, it runs a antiVirus check, then when I try to open the attachments itself from the AntiVirus window it opens a black windows and stops - no pdf document!
So what's up and what do I do?
thanks in advance for the help I going to get!
ric rYou don't need to run any antivirus software at the present time with OS X. There are no viri that currently affect OS X which has been available for 5 years and counting and if the antivirus software used is causing problems which isn't protecting you from anything anyway, you should use the uninstall feature to remove it from the hard drive if included with the antivirus software installed.
You don't need to install any software provided by an ISP which can sometimes cause more problems than it helps.
You can download Firefox for free to test if the same occurs.
http://www.mozilla.com/firefox/
I would like to get myself over to mac's own
service Mail but just how is the question?
The required account information to set up your SBC email account with the Mail.app is provided on SBC's website or you can call SBC.
SBC will tell you they don't support the Mail.app but all you need is the following:
* Account Type - I'm sure POP is the account type.
* Incoming Mail Server
* Account User Name - usually the portion of your email address in front of the @ sign only but for some providers it is the entire email address.
* Account Password - this you should know.
* Outgoing or SMTP server and is the SMTP server authenticated? I don't believe SBC requires or supports SMTP authentication but if authenticated, ask what type of authentication. If SMTP authentication is required, it is usually password authentication which requires entering the same user name and password required to check the account's incoming mail server for new mail.
This is all you need to create and access the account using the Mail.app.
Regarding using Norton SystemWorks, don't. It is poison for OS X and can cause more problems than it resolves. Symantec announced almost 3 years ago they will no longer be supporting SystemWorks or Disk Doctor with OS X but they continue to sell their garbage and they don't sell a Tiger compatible version.
If installed on your hard drive, use the uninstall feature included to remove it and discontinue its use altogether. I believe the uninstall utility included has some problems so visit Symantec's website for an updated removal utility and/or for proper removal instructions. Symantec products installs a large number of components all over the hard drive. -
Problem in sending pdf attachment
hi all
i am facing a problem when i am sending a pdf attachment in mail... It is showing an errror that the file is not decode properly as it is an email attachment. The below code works fine for other file types. please help meFUNCTION 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_soli type soli,
it_soli type table of soli,
it1_solix type solix_tab.
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.
catch cx_sy_dyn_call_illegal_type.
endtry.
try.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = xstr
APPEND_TO_TABLE = 'X'
* IMPORTING
* OUTPUT_LENGTH =
TABLES
BINARY_TAB = it1_solix
catch cx_sy_dyn_call_illegal_type.
endtry.
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.
try.
lo_document->add_attachment(
EXPORTING
i_attachment_type = i_type
i_attachment_subject = attachment_sub
i_att_content_hex = it1_solix ).
CATCH cx_document_bcs.
endtry.
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
USERLIST = it_userlist.
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. -
Please help, I'm unable to send an email with a pdf attachment
We have Windows 8 Pro on the pc, I have been trying to send a pdf document that my husband needs to his work and no matter how I try to send it (either from reader or directly from my email with the attachment it just will not send. Can anyone please help?
No worries. But it is strange that you cannot even send email with a PDF attachment from Microsoft Mail. At this point, no PDF viewers (e.g. Microsoft Reader, Adobe Reader Touch) are involved because you are not viewing PDF files.
Instead of saying "It won't send", you need to describe exactly what you see on the screen for every step. Where does the problem start?
Step 1: Attaching a PDF file to new email in Microsoft Mail
Are you able to find the PDF file and attach it to new email?
Step 2: Sending email with a PDF attachment
What happens when you click the Send button? Does it hang forever? Does it show an error message? Could you confirm that you can send email with other type of attachments (e.g. text file, Word file) from Microsoft Mail from the same PC?
You can provide the details to Microsoft for troubleshooting.
Alternatively, you can try to send email with the PDF attachment from other accounts like Gmail (Google Mail) or Yahoo Mail via the web browser (Internet Explorer) interface.
Sometimes, rebooting your system solves "mysterious" problems, too.
Good luck! -
PDF ICON problem in attachment
Hi all,
I am sending the PO smartform to mail as PDF attachment .
Attachment was happening correct. but problem is Attachment ICON was not showing as PDF ICON. When Double click on attachment to open , it is asking with OPEN WITH POPUP.in that I am choosing Acorobat reader.
but i need when i double click attachment , it shoube open in directly in PDF.
please help in this.
regards,
Rama
Edited by: ram reddy on Feb 24, 2009 1:47 PMJust check if everything is fine or not.
TYPES : BEGIN OF ty_errorlog,
field(255) TYPE c,
END OF ty_errorlog.
DATA: lwa_objpack TYPE sopcklsti1, "Contents of the Email
lt_objpack TYPE STANDARD TABLE OF sopcklsti1,
lwa_reclist TYPE somlreci1, "Recievers List
lt_reclist TYPE STANDARD TABLE OF somlreci1,
lwa_errorlog TYPE ty_errorlog,
lwa_doc_chng TYPE sodocchgi1, "Mail Contents
lt_errorlog TYPE STANDARD TABLE OF ty_errorlog.
CONSTANTS :lc_1(15) TYPE n VALUE '1', "Email Params
lc_2(15) TYPE n VALUE '2', "Email Params
lc_raw(3) TYPE c VALUE 'RAW', "Email Params
lc_u TYPE c VALUE 'U', "Recipient Property
lc_01 TYPE c VALUE '1',
lc_docsize TYPE so_doc_siz VALUE '510',
lc_x TYPE c VALUE 'X'.
Pack to main body
lwa_objpack-body_start = lc_1.
lwa_objpack-head_start = lc_1.
lwa_objpack-body_num = lc_2.
lwa_objpack-doc_type = lc_raw.
APPEND lwa_objpack TO lt_objpack.
Fill receiver list
lwa_reclist-receiver = p_mail.
lwa_reclist-rec_type = lc_u.
APPEND lwa_reclist TO lt_reclist.
Filling Mail Contents
lwa_doc_chng-obj_descr = p_subject.
lwa_doc_chng-obj_prio = lc_01.
lwa_doc_chng-doc_size = lc_docsize.
lwa_errorlog-field = p_msg.
APPEND lwa_errorlog TO lt_errorlog.
Calling FM to Send Email
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = lc_x
commit_work = lc_x
TABLES
packing_list = lt_objpack
contents_txt = lt_errorlog
receivers = lt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE e011(z_com_msg).
ENDIF.
Edited by: Phanindra Annaparthi on Feb 24, 2009 1:49 PM -
PDF attachment sign and save problem
I've used digital signatures for quite a while without problem. Recently, I've noticed that when trying to digitally sign a PDF attachment from Outlook 2003 or 2010 using Adobe Acrobat Standard 7, I get an error when clicking Sign and Save. The Sign and Save As button works fine
Error is:
The document could not be signed.
There was an error when attempting to commit this signature. The document was not saved.
The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder.
Any help is greatly appreciated! TIA!I will try that, thank you.
Jim Dodge
English Proofreading Coordinator
ASIST Translation Services
4891 Sawmill Road, Suite 200
Columbus, OH 43235-7266
www.ASISTtranslations.com
Tel: 937-596-6649
NOTICE: This electronic mail transmission is for the use of the named
individual or entity to which it is directed and may contain information
that is privileged or confidential. It is not to be transmitted to or
received by anyone other than the named addressee (or a person authorized
to deliver it to the named addressee). It is not to be copied or forwarded
to any unauthorized persons. If you have received this electronic mail
transmission in error, delete it from your system without copying or
forwarding it, and notify the sender of the error by replying via email or
by calling ASIST Translation Services, Inc. at (614) 451-6744, so that our
address record can be corrected. -
Problem in sending online interactive form in email as PDF attachment
Hi,
I am trying to send online intercative forms as PDF attachment once user fills it and click on send button. But this mail i am trying to send from SAP workflow. For this am using one function module which is accepting the pdfsource context attribute of binary type as Xstring. Once i run the webdynpro application i am getting mail in out look but when i open the attachment i am getting error file is damaged.
Can you pls help me in solving this, Or any other way for doing the same.
Here is the code i am using for triggering the RFC from WD
Zsend_Mail_Attachment_Sev_Input mail = new Zsend_Mail_Attachment_Sev_Input();
//to capture the outplacement level entered in the form
mail.setI_Out_Place_Level(wdContext.currentVn_severancedetailsElement().getVa_outplacement_level().getBytes());
mail.setI_Bin_Data(wdContext.currentContextElement().getPdfSource());
wdContext.nodeZsend_Mail_Attachment_Sev_Input().bind(mail);
try
wdContext.currentZsend_Mail_Attachment_Sev_InputElement().modelObject().execute();
wdComponentAPI.getMessageManager().reportSuccess("Notification Sent Successfully.");
catch (WDDynamicRFCExecuteException e)
// TODO Auto-generated catch block
wdComponentAPI.getMessageManager().reportSuccess(" This is inside the mail exception!!"+e);
e.printStackTrace();
Here is the function module code
FUNCTION ZSEND_MAIL_ATTACHMENT_SEV.
""Local Interface:
*" IMPORTING
*" VALUE(I_OUT_PLACE_LEVEL) TYPE XSTRING OPTIONAL
*" VALUE(I_BIN_DATA) TYPE XSTRING OPTIONAL
*" TABLES
*" T_V_BIN_DATA STRUCTURE SOLISTI1
*" IT_MESSAGE STRUCTURE SOLISTI1
Data Declaration
DATA: gd_cnt TYPE i,
gd_sent_all(1) TYPE c,
gd_error TYPE sy-subrc,
tab_lines LIKE sy-tabix,
v_subject(255) VALUE 'HI'.
Structure Declaration
DATA : BEGIN OF it_file OCCURS 0,
row(255),
END OF it_file.
DATA : BEGIN OF i_split OCCURS 0,
row(50),
END OF i_split.
DESCRIBE TABLE it_message LINES tab_lines.
READ TABLE it_message INDEX tab_lines.
Internal Table Declaration
data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
DATA : objbin LIKE SOLIX OCCURS 0 WITH HEADER LINE.
DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
data : wa_receiver like table of SOMLRECI1 with header line.
data : it_receiver like table of SOMLRECI1 with header line.
DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
CLEAR : objbin, it_packing_list, wa_receiver, it_receivers.
gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SENDFILE'.
gd_doc_data-obj_descr = v_subject.
gd_doc_data-sensitivty = 'O'.
APPEND GD_DOC_DATA.
Appending The Internal Table it_packing_list
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
it_packing_list-doc_type = 'RAW'.
it_packing_list-body_num = tab_lines.
APPEND it_packing_list.
move i_bin_data to t_v_bin_data.
********Add By Anuj
APPEND t_v_bin_data.
********End Add By Anuj
LOOP AT t_v_bin_data.
MOVE t_v_bin_data TO objbin-line.
APPEND objbin.
ENDLOOP.
CLEAR it_packing_list.
DESCRIBE TABLE objbin LINES tab_lines.
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
it_packing_list-doc_type = 'PDF'.
it_packing_list-body_num = tab_lines.
it_packing_list-doc_size = tab_lines * 255.
APPEND it_packing_list.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
*Appending The Internal Table it_receivers
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver to it_receiver.
append it_receiver.
Move wa_receiver[] to it_receivers[].
Clear it_receivers.
if i_OUT_PLACE_LEVEL NE 0.
loop at it_receivers into wa_receiver.
loop at it_receivers into wa_receiver.
*Function Module To Post The Message To Externa Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_packing_list
contents_hex = objbin
receivers = it_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.
clear wa_receiver.
endloop.
elseif i_OUT_PLACE_LEVEL eq 0.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_packing_list
contents_hex = objbin
receivers = it_receiver
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.
clear wa_receiver.
endif.
ENDFUNCTION.
Regards
RavindraHi,
I am trying to send online intercative forms as PDF attachment once user fills it and click on send button. But this mail i am trying to send from SAP workflow. For this am using one function module which is accepting the pdfsource context attribute of binary type as Xstring. Once i run the webdynpro application i am getting mail in out look but when i open the attachment i am getting error file is damaged.
Can you pls help me in solving this, Or any other way for doing the same.
Here is the code i am using for triggering the RFC from WD
Zsend_Mail_Attachment_Sev_Input mail = new Zsend_Mail_Attachment_Sev_Input();
//to capture the outplacement level entered in the form
mail.setI_Out_Place_Level(wdContext.currentVn_severancedetailsElement().getVa_outplacement_level().getBytes());
mail.setI_Bin_Data(wdContext.currentContextElement().getPdfSource());
wdContext.nodeZsend_Mail_Attachment_Sev_Input().bind(mail);
try
wdContext.currentZsend_Mail_Attachment_Sev_InputElement().modelObject().execute();
wdComponentAPI.getMessageManager().reportSuccess("Notification Sent Successfully.");
catch (WDDynamicRFCExecuteException e)
// TODO Auto-generated catch block
wdComponentAPI.getMessageManager().reportSuccess(" This is inside the mail exception!!"+e);
e.printStackTrace();
Here is the function module code
FUNCTION ZSEND_MAIL_ATTACHMENT_SEV.
""Local Interface:
*" IMPORTING
*" VALUE(I_OUT_PLACE_LEVEL) TYPE XSTRING OPTIONAL
*" VALUE(I_BIN_DATA) TYPE XSTRING OPTIONAL
*" TABLES
*" T_V_BIN_DATA STRUCTURE SOLISTI1
*" IT_MESSAGE STRUCTURE SOLISTI1
Data Declaration
DATA: gd_cnt TYPE i,
gd_sent_all(1) TYPE c,
gd_error TYPE sy-subrc,
tab_lines LIKE sy-tabix,
v_subject(255) VALUE 'HI'.
Structure Declaration
DATA : BEGIN OF it_file OCCURS 0,
row(255),
END OF it_file.
DATA : BEGIN OF i_split OCCURS 0,
row(50),
END OF i_split.
DESCRIBE TABLE it_message LINES tab_lines.
READ TABLE it_message INDEX tab_lines.
Internal Table Declaration
data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
DATA : objbin LIKE SOLIX OCCURS 0 WITH HEADER LINE.
DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
data : wa_receiver like table of SOMLRECI1 with header line.
data : it_receiver like table of SOMLRECI1 with header line.
DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
CLEAR : objbin, it_packing_list, wa_receiver, it_receivers.
gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SENDFILE'.
gd_doc_data-obj_descr = v_subject.
gd_doc_data-sensitivty = 'O'.
APPEND GD_DOC_DATA.
Appending The Internal Table it_packing_list
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
it_packing_list-doc_type = 'RAW'.
it_packing_list-body_num = tab_lines.
APPEND it_packing_list.
move i_bin_data to t_v_bin_data.
********Add By Anuj
APPEND t_v_bin_data.
********End Add By Anuj
LOOP AT t_v_bin_data.
MOVE t_v_bin_data TO objbin-line.
APPEND objbin.
ENDLOOP.
CLEAR it_packing_list.
DESCRIBE TABLE objbin LINES tab_lines.
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
it_packing_list-doc_type = 'PDF'.
it_packing_list-body_num = tab_lines.
it_packing_list-doc_size = tab_lines * 255.
APPEND it_packing_list.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
*Appending The Internal Table it_receivers
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
wa_receiver-receiver = '[email protected]'.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver to it_receiver.
append it_receiver.
Move wa_receiver[] to it_receivers[].
Clear it_receivers.
if i_OUT_PLACE_LEVEL NE 0.
loop at it_receivers into wa_receiver.
loop at it_receivers into wa_receiver.
*Function Module To Post The Message To Externa Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_packing_list
contents_hex = objbin
receivers = it_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.
clear wa_receiver.
endloop.
elseif i_OUT_PLACE_LEVEL eq 0.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_packing_list
contents_hex = objbin
receivers = it_receiver
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.
clear wa_receiver.
endif.
ENDFUNCTION.
Regards
Ravindra -
Problem while opening PDF attachment in Inbox
Hi all,
I am sending PDF attachment through email to inbox.
When am trying to open PDF attachment i am getting error-
'There was an eror opening this document.The fuile changed and couldnt be open'
When i click on attachment some bytes are getting transfere essage is displayed in lower toolbar.
Please guide to resolve this problem.No reply.
Maybe you are looking for
-
Specify Calendar in Nokia Weather & Calendar app w...
I recently bought the DT-910. After some initial trouble adding the Nokia Accessories section to Settings (I found a QR code link in these forums to install it, because it doesn't appear in the Store and wasn't on my Lumia 928 otherwise), I was enjoy
-
Apple never accept replacement for their yellowish screen on my new iphone5s
I bought iphone5s few days ago and I reallized that my screen is yellowish. Applecare also agreed with yellowish screen on my phone. but finally, Apple said it can not be replaced because yellow screen is not hardware failure.. I should see yellow co
-
Hi experts, I want to know if is possible to limit the use of memory, buffers,...at user level (no at instance level) Does someone tell me how can I do it, please? Thanks in advance. Message was edited by: Eshmarc
-
Import iPhoto libraries on external drives to Apple TV?
Can this be done?
-
Video Card is broken HP Pavillion g6 1320ed
Hello, more that Two years ago I bought the laptop and one day the laptop couldnt start any more and only blinked next to caps lock in three times iteration. Was suspected Memory card but then once taken to a lab was determined that the Video card i