How to send mail with zip file
Hi,
We are sending email in one of our program with an attached xls file. We are sending email using classes (cl_bcs).
Our requirement is to send the attached file in zip format to reduce the size.
Please provide if you have any pointers to get zipped file in attachment.
Regards,
Mamta
Dear Mamta,
Check this class,
CL_ABAP_GZIP -- Class for (De)Compression (GZIP)
CL_ABAP_GZIP_BINARY_STREAM -- Class for Data Compression (GZIP, Streaming)
CL_ABAP_GZIP_TEXT_STREAM -- Class for Text Compression (GZIP, Streaming)
IF_ABAP_GZIP_BINARY_HANDLER -- IF for Output Buffer Handler
IF_ABAP_GZIP_TEXT_HANDLER -- IF for Output Buffer Handler
Regards,
Surjith
Similar Messages
-
Send mails with csv file as an attachment through oracle(SQL SCripts / Stor
Hello Everybody,
I have recently come across a requirement in which I am supposed to send mails with csv file as an attachment through oracle(SQL SCripts / Stored Procedure) .
The contents of the csv file are to be retreived from the Database as well as the content of the mail and to whom it needs to be sent has also to be picked up from the database.
Can somebody suggest me with a suitable code for the same?
Would be of great help..!!
Thanks & Regards,
- VR
Edited by: user646716 on Dec 18, 2009 10:44 AMread below links
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:255615160805
http://www.orafaq.com/wiki/Send_mail_from_PL/SQL#Send_mail_with_UTL_TCP_-withattachments
How to send csv file as an attachment -
Convert Screen(spool) to PDF file sending mail with attach file
Hi :
I'd like convert spool list to pdf and sending file...
so, I read thread about spool convert to PDF before,
and know how to convert Spool to PDF file and send mail with attach file.
but I have a problem.
my solution as:
step 1. Call function: "CONVERT_ABAPSPOOLJOB_2_PDF"
step 2. Call function: "SO_NEW_DOCUMENT_ATT_SEND_API1"
then, I got a mail with attached PDF file, but the PDF file display limited 255 line.( SO_NEW_DOCUMENT_ATT_SEND_API1 limited)
I want to showing word is wider that 255.
and then I find a manual method as:
After program finished.
Function Menu -> system -> List -> Send
use Prog: "Create Document and Send"
I use this prog sending mail and attached file ,
PDF file do <b>NOT</b> have 255 word limit !
finally. my question is, If I want sending mail as Prog: "Create Document and Send", how to do?
which Function I have to use?...
Please help me, Thanks!Hi,
Check this sample code of sending spool as attachment to an email address..
Parameters.
PARAMETERS: p_email(50) LOWER CASE.
PARAMETERS: p_spool LIKE tsp01-rqident.
Data declarations.
DATA: plist LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: document_data LIKE sodocchgi1.
DATA: so_ali LIKE soli OCCURS 100 WITH HEADER LINE.
DATA: real_type LIKE soodk-objtp.
DATA: sp_lang LIKE tst01-dlang.
DATA: line_size TYPE i VALUE 255.
DATA: v_name LIKE soextreci1-receiver.
DATA rec_tab LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
Get the spool data.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = p_spool
first_line = 1
last_line = 0
desired_type = ' '
IMPORTING
real_type = real_type
sp_lang = sp_lang
TABLES
buffer = so_ali
EXCEPTIONS
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'Error'.
LEAVE LIST-PROCESSING.
ENDIF.
Prepare the data.
plist-transf_bin = 'X'.
plist-head_start = 0.
plist-head_num = 0.
plist-body_start = 0.
plist-body_num = 0.
plist-doc_type = 'RAW'.
plist-obj_descr = 'Test ALV'.
APPEND plist.
plist-transf_bin = 'X'.
plist-head_start = 0.
plist-head_num = 0.
plist-body_start = 1.
DESCRIBE TABLE so_ali LINES plist-body_num.
plist-doc_type = real_type.
Get the size.
READ TABLE so_ali INDEX plist-body_num.
plist-doc_size = ( plist-body_num - 1 ) * line_size
+ STRLEN( so_ali ).
APPEND plist.
Move the receiver address.
MOVE: p_email TO rec_tab-receiver,
'U' TO rec_tab-rec_type.
APPEND rec_tab.
IF NOT sp_lang IS INITIAL.
document_data-obj_langu = sp_lang.
ELSE.
document_data-obj_langu = sy-langu.
ENDIF.
v_name = sy-uname.
Send the email.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = document_data
sender_address = v_name
sender_address_type = 'B'
TABLES
packing_list = plist
contents_bin = so_ali
receivers = rec_tab
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 e208(00) WITH 'Error'.
ENDIF.
COMMIT WORK.
Send the email immediately.
SUBMIT rsconn01
WITH mode = 'INT'
AND RETURN.
Thanks,
Naren -
How to send mail with attachment
Hi,
How to send mail with word document as attachment in oracle pl/sql.
kindly help me .
thank you
regards
P Prakashcreate or replace procedure pdf_mail(
p_sender varchar2, -- sender, example: 'Me <[email protected]>'
p_recipients varchar2, -- recipients, example: 'Someone <[email protected]>'
p_subject varchar2, -- subject
p_text varchar2, -- text
p_filename varchar2, -- name of pdf file
p_blob blob -- pdf file
) is
conn utl_smtp.connection;
i number;
len number;
BEGIN
conn := demo_mail.begin_mail(
sender => p_sender,
recipients => p_recipients,
subject => p_subject,
mime_type => demo_mail.MULTIPART_MIME_TYPE);
demo_mail.begin_attachment(
conn => conn,
mime_type => 'application/pdf',
inline => TRUE,
filename => p_filename,
transfer_enc => 'base64');
-- split the Base64 encoded attachment into multiple lines
i := 1;
len := DBMS_LOB.getLength(p_blob);
WHILE (i < len) LOOP
IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.Substr(p_blob, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
ELSE
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.Substr(p_blob, (len - i)+1, i)));
END IF;
UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
END LOOP;
demo_mail.end_attachment(conn => conn);
demo_mail.attach_text(
conn => conn,
data => p_text,
mime_type => 'text/html');
demo_mail.end_mail( conn => conn );
END;
ref:
http://www.plpdf.com/23-1725.html
Edited by: Mahanam on Jan 9, 2011 10:32 PM -
Send mail with attached file without using Repository
Hello,
I want to know if have a way to Send mail with attached file without using Repository.
Regards
EladElad,
Check this article where a image has been picked by the file adapter and sent as an attachment to the mail adapter.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816">Sending an Image File Through XI in a File-to-Mail Scenario</a>
For how to proceed without integration repository content look into this blog,
<a href="/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository">How to send any data (even binary) through XI, without using the Integration Repository</a>
Combining these 2 you have the solution.
Regards
Bhavesh -
I receive many e-mails with zipped files. I can no longer open or unzip my files. A window welcoming me to Application Loader drops down. It prompts for an iTunes Connect login, but will no accept my iTunes login. I have no way to open or unzip my files. Help!!!!
Application Loader, unless there's another one I'm not familiar with, is part of the iOS SDK. That have usurped the .zip, or you may have removed that application but your Mac is still holding onto the mapping of Zip files to that application. Select a .zip file in Finder, Get Info, and go to the Open with section. Select Archive Utility and click Change All. That should fix the problem.
Regards. -
How to send mail with attachments - ALBPM 5.7
Hi All,
I am new to BPM,
Someone could help giving me a example of Send Mail with attachments in Aqualogic Studio 5.7?
thanks,
Renatanombrefichero="C:\\Temp\\test.doc"
subject as String="Subject"
message as String="Message"
mailAttachment = Fuego.Net.MailAttachment(source : BinaryFile.readToBinaryFrom(name : nombrefichero), fileName : "test2.doc")
mailAttachments[0] = mailAttachment
correo as Mail
correo.attachments = mailAttachments
correo.contentType = "text/html"
send correo
using from = "[email protected]",
recipient = "[email protected]",
subject = subject,
message = message -
How to Send mail with an attachment of html file?
Hi all,
i am using Oracle 11g Database R1 on Windows 2003 Server R2. I am using the below script for sending a mail with an attachment
declare
vInHandle utl_file.file_type;
flen number;
bsize number;
ex boolean;
l_Output raw(32767);
fname varchar2(30) := 'TEXT.TXT';
vSender varchar2(30) := '[email protected]';
vRecip varchar2(30) := '[email protected]';
vSubj varchar2(50) := 'Weekly Invoice Report';
vAttach varchar2(50) := 'TEXT.TXT';
vMType varchar2(30) := 'Content-type: text / html';
begin
utl_file.fgetattr('ORALOAD', fname, ex, flen, bsize);
vInHandle := utl_file.fopen('ORALOAD', fname, 'R');
utl_file.get_raw (vInHandle, l_Output);
utl_file.fclose(vInHandle);
utl_mail.send_attach_raw(sender => vSender
,recipients => vRecip
,subject => vsubj
,attachment => l_Output
,att_inline => false
,att_filename => fname);
end;
this Script is Working Fine for text based file only. but i want to send a html file from oracle directory. is it possible? .... Please Advice me... if it possible please provide a sample code or any Link Related to this.
Thank You So Much for Your Help
Shanif it possible please provide a sample code or any Link Related to this.Perhaps the maildemo is of use to you, read more threads about it's use here:
http://forums.oracle.com/forums/search.jspa?objID=f75&q=maildemo
OTN code sample link:
https://codesamples.samplecode.oracle.com/servlets/tracking?id=S516 -
Sending mail with attachment file through plsql
Hi,
Now i send the mail using utl_smtp and utl_tcp.
How can i send a mail with a attachment file. That file is in the local directory. Can any one know just send me to the following mail id [email protected]
Regards
SureshHi,
Now i send the mail using utl_smtp and utl_tcp.
How can i send a mail with a attachment file. That file is in the local directory. Can any one know just send me to the following mail id [email protected].
Regards
Suresh -
Send mail by zip file format..
Hi ALL,
I have a one problem in sending mail through SAP. I have file with more than 5MB in pdf format, this file i am unble to send. but below 5MB its successfully sending.
so i m doubt is i have to zip the file, means if that file is more than 5MB.
please any one tell me for above problem.
Thanks,
Srinivas.Take a look to the class CL_ABAP_GZIP.
Regards. -
Sending mail with PDF file attachment ?
Hi All,
I have scenario File ---> Mail, monitoring FTP directory for PDF file and sending using mail attachment.
At the moment i am using JAVA mapping to construct the mail package structure follow all the step in this blog : XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
it is working if i am using text file but then how to encode the pdf content so i can send throught the mail adapter. ?
Thank you and Best Regards
FernandHi,
Actually, i am using this java code below :
try {
// create XML structure of mail package
String output = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<ns:Mail xmlns:ns=\"http://sap.com/xi/XI/Mail/30\">"
+ "<Subject>" + mailSubject + "</Subject>"
+ "<From>" + mailSender + "</From>"
+ "<To>" + mailReceiver + "</To>"
+ "<Content_Type>multipart/mixed; boundary=\"" + boundary + "\"</Content_Type>"
+ "<Content>";
out.write(output.getBytes());
// create the declaration of the MIME parts
//First part
output = "--" + boundary + CRLF
+ "Content-Type: text/plain; charset=UTF-8" + CRLF
//+ "Content-Transfer-Encoding: 8bit" + CRLF
+ "Content-Disposition: inline" + CRLF + CRLF
+ mailContent + CRLF
//Second part
+ "--" + boundary + CRLF
+ "Content-Type: Application/pdf; name=" + attachmentName + CRLF
//+ "Content-Transfer-Encoding: base64" + CRLF
+ "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;
out.write(output.getBytes());
//Source is taken as attachment
copySource(in, out);
out.write("</Content></ns:Mail>".getBytes());
} catch (IOException e) {
throw new StreamTransformationException(e.getMessage());
protected static void copySource(InputStream in, OutputStream out)
throws IOException {
byte[] bbuf = new byte[in.available()];
int bblen = in.read(bbuf);
if (!(bblen < 0)) {
//String sbuf = new String(bbuf);
//String encoded = Base64.encode(sbuf);
// replace all control characters with escape sequences
//sbuf = sbuf.replaceAll("&", "&");
//sbuf = sbuf.replaceAll("\"", """);
//sbuf = sbuf.replaceAll("'", "'");
//sbuf = sbuf.replaceAll("<", "<");
//sbuf = sbuf.replaceAll(">", ">");
out.write(bbuf);
This code working fine with text file but not for pdf file. because i got error in mail adapter :
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: java.lang.NullPointerException; nested exception caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 8f(:main:, row:11, col:4)(:main:, row=11, col=4) -> com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 8f(:main:, row:11, col:4)
I guest the problem because the mail adapter doen't accept pdf content insite the mail package.
please advise me
Best Regards
Fernand -
Hi all,
I have a pdf file which i got it by coverting the smart form using OTF covert Funciton module..am using this fn module to convert 132 lines to 255 lines,
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
LINE_WIDTH_SRC =
LINE_WIDTH_DST = '255'
TRANSFER_BIN = ' '
TABLES
CONTENT_IN = it_pdfdata[]
CONTENT_OUT = it_pdf[]
my it_pdf[], it_pdfdata[] contains data ,
clear wa_objpack-TRANSF_BIN.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num = tab_lines.
wa_objpack-doc_type = 'RAW'.
append wa_objpack to objpack.
wa_objpack-transf_bin = 'X'.
wa_objpack-head_start = 1.
wa_objpack-head_num = 1.
wa_objpack-body_start = 1.
wa_objpack-body_num = tab_lines.
wa_objpack-doc_type = 'PDF'.
wa_objpack-OBJ_NAME = "test".
wa_objpack-OBJ_DESCR = "test".
wa_objpack-doc_size = tab_lines.
append wa_objpack to objpack.
*LOOP AT it_pdfdata INTO WA_PDFDATA.
loop at it_email into wa_email.
* e-mail receivers.
loop at gi_header into wa_header.
SELECT mailid FROM ZPY_MAILID INTO wa_email
WHERE EMPNO = wa_header-Pernr.
gv_email = wa_email.
endselect.
wa_rec-receiver = gv_email.
wa_rec-rec_type = 'U'.
wa_rec-notif_ndel = 'X'.
APPEND wa_rec to it_rec.
APPEND wa_email TO it_email.
endloop.
These are the stmts i am using, and my FM to send email is
\CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = doc_chg
PUT_IN_OUTBOX = ' '
SENDER_ADDRESS = sender
SENDER_ADDRESS_TYPE = sender_type
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = objpack
CONTENTS_BIN = objbin
CONTENTS_TXT = objtxt
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = it_rec
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.
it is showing run time error...
Please help me to go ahead ....Hi!
Instead of putting such a lengthy code, its better to use the std functionality available with smartforms. In the interface for your smartform FM, use the parameters MAIL_SENDER, MAIL_RECIPIENT, CONTROL_PARAMETERS (DEVICE as 'MAIL' and no_dialog = 'X'). No conversion from OTF to PDF etc is required.
Use the below code to populate the Sender and receiver mail ids:
DATA GV_SENDER TYPE SWC_OBJECT.
DATA GV_SENDER_ID LIKE SWOTOBJID.
DATA GV_RECEIVER TYPE SWC_OBJECT.
DATA GV_RECEIVER_ID LIKE SWOTOBJID.
SWC_CONTAINER LT_CONTAINER.
*reset data for CTCV
CALL FUNCTION 'CTCV_INIT_USER_DATA'.
*Create sender using sender mail address from new table
SWC_CLEAR_CONTAINER LT_CONTAINER.
SWC_CREATE_OBJECT GV_SENDER 'RECIPIENT' SPACE.
SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
zmail-sender.
SWC_SET_ELEMENT LT_CONTAINER 'TypeID' 'B'.
SWC_CALL_METHOD GV_SENDER 'CreateAddress' LT_CONTAINER.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
RAISING SENDER_CREATION_FAILED.
ENDIF.
SWC_OBJECT_TO_PERSISTENT GV_SENDER GV_SENDER_ID.
Similarly you can create the recipient mail id.
SWC_CLEAR_CONTAINER LT_CONTAINER.
SWC_CREATE_OBJECT GV_RECEIVER 'RECIPIENT' SPACE.
SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
adr6-smtp_addr.
SWC_SET_ELEMENT LT_CONTAINER 'TypeID' 'U'.
SWC_CALL_METHOD GV_RECEIVER 'CreateAddress' LT_CONTAINER.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
RAISING SENDER_CREATION_FAILED.
ENDIF.
SWC_OBJECT_TO_PERSISTENT GV_RECEIVER GV_RECEIVER_ID.
endif.
This will save a lot of effort and make life easier.
Hope this helps.
Cheers! -
How to send mail with out attachment in a report using oops concept
Hi Abap Experts,
My requirement is i have to send a mail with out attaching any documents this is a report using oops conceopt how can i acheive it .Hi Saeed,
Please search SDN before posting. There are so may threads for the same.
Check out the standard reports--
bcs_example_1, bcs_example_2, .. bcs_example_7
Howard -
How to send mail with attachment through SCSM 2012
Dear All,
I need to send mail to the end user with file attachment, as the user cannot download any attachments from the portal, Please support....
Thanks,
Kalpankur PandeyHello Kalpankur,
I just came across a same kind of thread about this subject. A way to workaround this is the use of Orchestrator:
http://social.technet.microsoft.com/Forums/en-US/systemcenterservicemanager/thread/6a9e933f-291a-438a-a771-f067bb132a24/
Hope this helps a bit
- Dennis | Netherlands | Blog |
Twitter -
How to send mail with pdf attachment.
hello,
I want to know if I can send a pdf attachment via mail. My PDF file is somewhere in the server and its content doesn't need to be changed by the program. the program just needs to find the pdf in server, then it will just send pdf file as attachment to the mail. is it possible ? thanks in advance.Hi Friend,
You can easily send the document by email as follows :
REPORT ZSENDEXTERNAL.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
Creation of the document to be sent
File Name
DOC_CHNG-OBJ_NAME = 'SENDFILE'.
Mail Subject
DOC_CHNG-OBJ_DESCR = 'Send External Mail'.
Mail Contents
OBJTXT = 'Minimum bid : $250000'.
APPEND OBJTXT.
OBJTXT = 'A representation of the pictures up for auction'.
APPEND OBJTXT.
OBJTXT = 'was included as attachment.'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
Creation of the document attachment
(Assume that the data in OBJBIN is in BMP format)
*OBJBIN = ' \O/ '. APPEND OBJBIN.
*OBJBIN = ' | '. APPEND OBJBIN.
*OBJBIN = ' / \ '. APPEND OBJBIN.
*DESCRIBE TABLE OBJBIN LINES TAB_LINES.
*OBJHEAD = 'PICTURE.BMP'.
*APPEND OBJHEAD.
Creation of the entry for the compressed attachment
*OBJPACK-TRANSF_BIN = 'X'.
*OBJPACK-HEAD_START = 1.
*OBJPACK-HEAD_NUM = 1.
*OBJPACK-BODY_START = 1.
*OBJPACK-BODY_NUM = TAB_LINES.
*OBJPACK-DOC_TYPE = 'PDF'.
*OBJPACK-OBJ_NAME = 'PICTURE'.
*OBJPACK-OBJ_DESCR = 'Representation of object 138'.
*OBJPACK-DOC_SIZE = TAB_LINES * 255.
*APPEND OBJPACK.
Completing the recipient list
RECLIST-RECEIVER = <External Email id >.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
*RECLIST-RECEIVER = 'SAPUSERNAME'.
*RECLIST-REC_TYPE = 'P'.
*APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
WRITE: / 'Result of the send process:'.
LOOP AT RECLIST.
WRITE: / RECLIST-RECEIVER(48), ':'.
IF RECLIST-RETRN_CODE = 0.
WRITE 'The document was sent'.
ELSE.
WRITE 'The document could not be sent'.
ENDIF.
ENDLOOP.
WHEN 1.
WRITE: / 'No authorization for sending to the specified number',
'of recipients'.
WHEN 2.
WRITE: / 'Document could not be sent to any recipient'.
WHEN 4.
WRITE: / 'No send authorization'.
WHEN OTHERS.
WRITE: / 'Error occurred while sending'.
ENDCASE.
Regards
Dhirendra Pandit
Maybe you are looking for
-
I want to generate a report with the report generation toolkit in LV7.1. In that report I use several report VIs to append text, titles and frontpanel images to a word document template (Office 2003). That works fine. Depending on the size and text o
-
This computer is not authorized to play or burn...
I just installed Windows XP in my computer and I downloaded music from Apple store. When I try to sync my iPod, it says that I am not authorized to play the music. I can't even seem to burn it into a CD. Does anybody know what I need to do? Thanks.
-
LSMW Recording with multiple lines
I am creating a recording in LSMW for VA02 - Change Sales Order. My source file contains several lines from the same sales order, the sales order number is maintained in one of the columns. The order originates from an IDOC LSMW I will run ahead of t
-
Hello- I have a Summer 2006 White MacBook, and I really want to get the Sims 3 which is coming out in about a month. I just found out that "This game will not run on PowerPC (G3/G4/G5) based Mac systems, or the GMA 950 class of integrated video cards
-
Genieo - AHHHHHH! It's killing me!
Legends, Genieo is draining me of the will to live. Having hijacked my iMac I've been trying to get rid of it. I've tried every library trash, the useless uninstall, the lot. But each time I use my Safari search bar there it is. Any help would be