Order output send with attachment to external email recipient
Hello,
We have a requirement that we should be able to send an email with an orderconfirmation attached (like BA00) to specific contact persons (maybe one, maybe multiple contact persons) But this should be not the email in the customer master general data. This email is not internal, we need to send external emails with the document attached (PDF).
Also this requirement should be also for invoices (RD00), it could be that this is an other person than the contact person for the order confirmation.
Our first thought was to use the contact persons and create 2 new entries, order confirmation recipient and invoice recipient. In this contact person we can add an e-mail address .
First, we created a condition record for output BA00 in VV12. We use standard communication strategy CS01 and with partner function CP (Contact Person) and add the number of the contact person (which is found in customer master).
Only then we get the following messages:
Message no. AM016
Please enter an address number
Message no. SVN000
Communication type cannot be used
Ok, this is due to that CP is missing in partner functions, so we add this then the output is send to the contact person. This is fine and working.
But the problem is that we want to have this for multiple recipients, so for example 2 contact persons. You cannot create the same condition record for two recipients, so you can leave the partner empty in VV12. But when you enter an order, you get a popup for which CP you want to create this order. So only one is possible.
Now we saw that there is a partner function MA (Mail partner address) is available. I have looked and searched but cannot find the exact function of this partner function. Like the MP (Mail partner) is internal, I expect this one to be external mail.
But the only problem is with this partner function, we cannot add this to the partner determination for customer master.
So how are we able to set this up? Any suggestion is appreciated and when usable also awarded.
Read note 191470 - Purchase order as an e-mail.pdf
Similar Messages
-
Send mails with attachment to external email id
Hi Folks,
I have an ALV report, the output of which needs to be sent as an excel attachment to an external email id. Can I use SO_NEW_DOCUMENT_ATT_SEND_API1 in this case? What about the SAP Connect settings? Any documents/help files/code samples describing the same will be useful.
/SagarHI,
If you want to send the ALV output as it is then you need send it to Spool and then convert it to a PDF then send it via email as an attachment,
or else, if you want to send the data of the output you can send it by the final internal table i mean by using the final Internal table you can send the data by passing this final interanl table to <b>'SO_NEW_DOCUMENT_ATT_SEND_API1'</b>
<u>example for your understanding:</u>
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.
DATA L_NUM(3).
Creation of the document to be sent
File Name
DOC_CHNG-OBJ_NAME = 'SENDFILE'.
Mail Subject
DOC_CHNG-OBJ_DESCR = 'Delivered Mail'.
Mail Contents
OBJTXT = 'Object text'.
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
LOOP AT ITAB_DATA.
CONCATENATE ITAB_DATA-PRODUCTOR
ITAB_DATA-VBELN
ITAB_DATA-POSNR
ITAB_DATA-MATNR INTO OBJBIN.
APPEND OBJBIN.
ENDLOOP.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = 'ORDERS'.
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 = 'TXT'.
OBJPACK-OBJ_NAME = 'WEBSITE'.
OBJPACK-OBJ_DESCR = 'ORDERS.TXT'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
Completing the recipient list
target recipent
clear RECLIST.
RECLIST-RECEIVER = '[email protected]'.
RECLIST-EXPRESS = 'X'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
copy recipents
clear RECLIST.
RECLIST-RECEIVER = '[email protected]'.
RECLIST-EXPRESS = 'X'.
RECLIST-REC_TYPE = 'U'.
RECLIST-COPY = 'X'.
APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
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.
ENDFORM. " SEND_MAIL -
Hi all,
i'm working on badi i need to send a mail with excel attachment, if you have sample code pls
send me.
Regards
Suprithhi
refer to this thread
Re: Send mails with attachment to external email id
hope this helps
regards
Aakash Banga -
Excel attachment in external email sending
Hi guys.
Just having a bit problem in my excel attachment in external email sending (internet). The contents of my attachment are being considered as one column per line item, which is supposedly divided into columns according to its tab or space.
example: i sent this :
PO# Poitem
A 1
it will be displayed in excel as:
column1
PO# Poitem
A 1
it should be like this:
column1
column2
PO#
Poitem
A
1
can anyone tell me what additional fm(s) do I need to implement before calling fm: SO_NEW_DOCUMENT_ATT_SEND_API1 to send the email.
thanks a lot!
cheers,jagan,
Comapare your code with this program.
I need a create a excel file (or tab delimited file) and send it as attachment by mail to the user (in background processing). I use SO_NEW_DOCUMENT_ATT_SEND_API1. I have a problem, that 1 Excel line is splited into 2 lines in mail, because there is more then 255 chars in Excel line.
Can anybody help me?
report y_cr17_mail .
data method1 like sy-ucomm.
data g_user like soudnamei1.
data g_user_data like soudatai1.
data g_owner like soud-usrnam.
data g_receipients like soos1 occurs 0 with header line.
data g_document like sood4 .
data g_header like sood2.
data g_folmam like sofm2.
data g_objcnt like soli occurs 0 with header line.
data g_objhead like soli occurs 0 with header line.
data g_objpara like selc occurs 0 with header line.
data g_objparb like soop1 occurs 0 with header line.
data g_attachments like sood5 occurs 0 with header line.
data g_references like soxrl occurs 0 with header line.
data g_authority like sofa-usracc.
data g_ref_document like sood4.
data g_new_parent like soodk.
data: begin of g_files occurs 10 ,
text(4096) type c,
end of g_files.
data : fold_number(12) type c,
fold_yr(2) type c,
fold_type(3) type c.
parameters ws_file(4096) type c default 'c:\debugger.txt'.
Can me any file fromyour pc ....either xls or word or ppt etc ...
g_user-sapname = sy-uname.
call function 'SO_USER_READ_API1'
exporting
user = g_user
PREPARE_FOR_FOLDER_ACCESS = ' '
importing
user_data = g_user_data
EXCEPTIONS
USER_NOT_EXIST = 1
PARAMETER_ERROR = 2
X_ERROR = 3
OTHERS = 4
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
fold_type = g_user_data-outboxfol+0(3).
fold_yr = g_user_data-outboxfol+3(2).
fold_number = g_user_data-outboxfol+5(12).
clear g_files.
refresh : g_objcnt,
g_objhead,
g_objpara,
g_objparb,
g_receipients,
g_attachments,
g_references,
g_files.
method1 = 'SAVE'.
g_document-foltp = fold_type.
g_document-folyr = fold_yr.
g_document-folno = fold_number.
g_document-objtp = g_user_data-object_typ.
*g_document-OBJYR = '27'.
*g_document-OBJNO = '000000002365'.
*g_document-OBJNAM = 'MESSAGE'.
g_document-objdes = 'Manohar testing by program'.
g_document-folrg = 'O'.
*g_document-okcode = 'CHNG'.
g_document-objlen = '0'.
g_document-file_ext = 'TXT'.
g_header-objdes = 'Manohar testing by program'.
g_header-file_ext = 'TXT'.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = sy-uname
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header
FOLMEM_DATA =
RECEIVE_DATA =
File from the pc to send...
method1 = 'ATTCREATEFROMPC'.
g_files-text = ws_file.
append g_files.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header
method1 = 'SEND'.
g_receipients-recnam = 'MK085'.
g_receipients-recesc = 'B'.
g_receipients-sndex = 'X'.
append g_receipients.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header. -
I have Microsoft Word for Apple, and when I send an attachment to an email, it goes as "application/octet-stream", and no one can open it. What can I do to send it as an ordinary word.doc>
You could Zip it.
Cheers, Tom -
Hello,
I have the following problem :
I have an .CSV file in a specific Directory, an I want to attached that file in a email in order to send the file to a specific email address.
The file dimension can be over 200 MB, and my question is if it's exists some restrictions about the file length .
Please help me with some documentation or something code which fits with my problem.
Thank you in advance !
Best regards,
Daniel.Hüseyin Dereli wrote:
> Hi ,
>
> You can use
>
> CL_ABAP_GZIP_BINARY_STREAM
> CL_ABAP_GZIP_TEXT_STREAM
>
> to compress your data. Sending that kind of large file via email seems not effective even there are no restrictions. There could be some other way for the related process.
>
>
> Regards
Hi Daniel,
I must agree with Hüseyins Statement. I mean do you ever experienced that you have found an 200 mb e-mail in your mailbox?
I would say you should use the BCS-Class to send an e-mail or some kind of FM like SO_DOCUMENT_SEND_API1.
Maybe you can find some information of how to send e-mail in this Thread:
How to add attachments to a mail -
Send ALV Grid output as PDF attachment to external mail id?
Any solution on this please
Check SOST transaction for external email problem.Is it showing some error there or it has not started external send process.
If external send process has not started then follow below route :
Go to sost->eneter selection criteria -> utilities-> start send process
you are sending attachement as PDF ? or which type o document ?
Please check the type of document & whether it's been supported by application via which you are trying to view.
Re: Sending Email to external email address in Batch mode
Hope this explanation helps.
Message was edited by:
Karthikeyan Pandurangan -
Send PO vía external email using contact person information
Hi,
I am trying to send the PO to the vendor via external email. The problem is that the customer is already using field email in vendor master data for other purposes.
The requierement is to use contact person´s email or another business partner´s email to send the vendor the purchase order when it is save.
I´ve done all customizing on output determination.
Something I might be missing? Can this be done?
Thank youHi,
I have been doing some tests and the po determines the business partner - contact person in tab message, also when I save the PO status for the external email is set on green. If I go to transactions SOST is there when the email never is send.
Why is this happening? I have done test with the email on vendor master and the po is sent, therefore is not a problem with the server sending emails.
Is there a way I can get the po sent? Please suggest.
Thank in advance
Edited by: Rafael Arrese on Mar 1, 2012 5:49 PM -
Delivers - Send Requests to an External Email
Is there a way to send a request in an iBot to an external email. So if the user does not exist in the Catalog and hence has no Active Delivery profile. Can one still send the request to an external user's email? Thanks
You can try the following :
1) create a user in the rpd for each of your vendor
2) create an int block to hold supplier name or similar in a variable
3) create answers request on sa subject area, puling back the vendors you want in your mailing list
4) optionally filter the report you want to send out using your vendor variables
5) create an ibot, using conditional request to return your mailing list, the output report is set for email profile and to "rus as user" not the user of the ibot
The users get authenticated with the RPD and the email address is pulled from your SA System table which contains email addresses for the vendor logins in your RPD.
I've done the above set up in the past, Here is the UDML to create RPD users if you have a lot to create ?
DECLARE USER "NewUser" AS "NewUser" UPGRADE ID 1 FULL NAME {New User} PASSWORD
'D7EDED84BC624A917F5B462A4DCA05CDCE256EEEEEDC97D54A286E822D97C35C7AD5C43AD4F2A09EAC4D07C3A079829F'
PERIODICITY 90 HAS ROLES ( "Administrators", "XMLP_ADMIN" ) DESCRIPTION
{password = welcome1} PRIVILEGES ( READ);
Edited by: Alastair_PeakIndicators on 11-Feb-2010 14:13 -
Output text as subject in External Email
Hi Experts,
I am trying to configure email output for shipment order.
I have configured using nace, a new output type with medium 5, a zprogram and a smart form to generate and trigger the output. I was able to see the pdf in SOST transaction till I tried the following
I took refernace of earlier mails and tried to add mail text and subject in the following way
Went to config of my output type via V/30
In the output detail, general data tab when I enter
Program: sapmoigs
Form routine: TEXT_SYMBOL_REPLACE
I get the following warning message
FORM routine TEXT_SYMBOL_REPLACE could not be found in program SAPMOIGS
In the mail titles and text added : &OIK01-USERFLD3& in Document title
Now the pdf file in SOST does not open. throws error An error occurred while opening this document. The file is damaged and could not be repaired
Can some one please suggest what can be done here ASAP.
Thanks.I'm guessing that the file doesn't open because instead of a legitimate PDF file name you now have &OIK01-USERFLD3& in it (does the file show up with the Adobe icon?).
The message you are getting is saying that you have entered the subroutine TEXT_SYMBOL_REPLACE that does not exist in program SAPMOIGS. If you go to SE38, enter SAPMOIGS and display Object List (there is a button on the toolbar), you'll see that on the left under 'Subroutines' there is no TEXT_SYMBOL_REPLACE. Either you need to use another program or create a custom program or maybe this funcationality just not available for shipments.
Such routine, for example, exists in SAPMV60A if you want to see what it looks like. -
JavaMail hangs up does not send mail nor throws exception when sending with attachment.
So basically i have a problem that has been reported, but none of the answers solved in my case.
I'm trying to send a mail with attachment using java mail, and it hangs in the transport.Send without sending an exception.
I've put the debug to true to try to understand what's going on and the result that i get is this:
DEBUG: not loading system providers in <java.home>/lib
DEBUG: not loading optional custom providers file: /META-INF/javamail.providers
DEBUG: successfully loaded default providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.S MTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.
SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLSto re,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLSto re,Sun M
icrosystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,
smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=java
x.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
DEBUG: not loading optional address map file: /META-INF/javamail.address.map
i've tried set the both connection timeout proprieties to 5000 but it stil does nott generate an exception. i've tried to chage the try catch block to catch Exception rather than MessagingException but it still does not generate an exception.
So i have another environment where using the same mail server and code it is working and i.ve generated the debug message and the next message is
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
I don't understand why it blocks here and why this message is not shown. i don't think its a connection problem. maybe a configuration issue, so i'm triyng to understand whats going wrong.
Any help would be appreciated. Thanks.Based on the debug output, you're using a very old version of JavaMail. You should consider upgrading.
The debug output shows no attempt to connect to any server, so it appears that something is going wrong even before then.
If the program is really blocked, try to get a stack trace showing where it's blocked.
Also, try catching Throwable to make sure you're not missing some kind of unexpected failure.
Do you have a standalone application, or is it running in some sort of application server?
What version of the JDK are you using? -
PO Output type with Option 5 External Send (&EKKO-EBELN&)
Dear Friends,
We have come across and interesting issue.
We want PO output to be send to vendor via email and the email subject should be "New Purchase Order <po document no>". To achieve this requirement we have set the Output type NEU --> Mail title and Text as NEW PURCHASE ORDER &EKKO-EBELN&.
When PO is created and before saving the PO user select the option 5 External Send in Message and further go to the communication tab. he can see the 'NEW PURCHASE ORDER &EKKO-EBELN&.' in Cover Page Text.
But the movement user saves the PO, Message --> communication is replaced with 'NEW PURCHASE ORDER".
And finally when the mail is sent with no PO document number and subject as "NEW PURCHASE ORDER".
Has any one has come across this issue before?
Or is there any OSS note for this?
Please Help!!
Sandeepdear sandeep
you can follow below mention steps or reffer OSS
1. You must maintain an e-mail address in the address in the vendor master.
2. The same applies to your own user master. You also have to specify an e-mail address there in order to identify the sender.
Note that it is not possible to change the e-mail address of the vendor via the SAP purchase order transaction (ME21N, ME22N, and so on). The system only uses the e-mail address of the vendor that is maintained in the vendor master!
3. For the output type for default values, a communication strategy needs to be maintained in the Customizing that supports the e-mail. You can find the definition of the communication strategy in the Customizing via the following path: (SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define Communication Strategy). As a default, communication strategy CS01 is delivered. This already contains the necessary entry for the external communication. Bear in mind that without a suitable communication strategy it is not possible to communicate with a partner via Medium 5 (external sending).
4. Use the standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
5. In the condition records for the output type (for example, Transaction MN04), use medium '5' (External send).
6. You can use Transaction SCOT to trigger the output manually. The prerequisite for a correct sending is that the node is set correctly. This is not described here, but it must have already been carried out.
7. To be able to display, for example, the e-mail in Outlook, enter PDF as the format in the node.
For more details, check out the OSS note :191470
Hope this will help.
reward points if helpful
thanks and regards
ravikant dewangan -
Sales order information in Output text as subject in External Email
Dear Expert
Request to guide me with the steps involved to configure output text for the information of sales order to be sent to customer via e mail once the order is svaed.Hi Amit,
Please go through the document given below. Hope it helps.
Output generation using condition type for deliveries - emailing output
Specially see the martina's reply.
Please also go through the notes given below.
960088 FAQ: Sending SD messages externally
454893 CHECKLISTSD: Sales document output as an e-mail
152474 Testing fax and e-mail
Regards,
MT -
Sales order number in Output text as subject in External Email
Dear Friends,
I have configured every thing in customisation so that whenever the sales order is saved an email goes to customer email mail id. this is working fine.
Please help as i want to have Sales order number also in the subject of the email.
I am doing this process through OUTput and not workflow.
Please help.
regards,Hi can you please tellme what configuraiton settings that to be made. i am not able to get the email generated in the spool and before that it is issuing no output is issue.
the following are the configuration changes that i did for the new output type for Emails
In General data of the Output type i maintinaed : SAPMV45A - TEXT_SYMBOL_REPLACE under replacement of Text symbols
i selectd the medium as extenal send.did i miss anything. or else i request you to provide me the complete configuration on emails.
Thanks -
HAving issues in sending txt attachment in abap email pgm
Hi,
I need to send an email from my Abap program with a txt attachment in the flowing format:
We are glad to see these results
Kindly forward the details Number
Vendor details:123
However, this is not getting formatted properly and the txt file is getting unnessacary spaces. I am working in ECC 6 and is Unicode complaint.
I am not able to format this in the txt attachment.
I am providing the sample code as below.Please kindly help me.Thanks!
Creation of the document to be sent File Name
maildata-obj_name = 'Payee extraction data'. "EC NOTEXT
Mail Subject
maildata-obj_descr = 'Payee Positive pay'. "EC NOTEXT
Mail Contents
loop at lt_file into l_file.
mailtxt-line = l_file.
xtex1-line = l_file.
append xtex1.
append mailtxt.
endloop.
clear: mailpack, mailbin, mailhead.
refresh: mailpack, mailbin, mailhead.
describe table mailtxt lines tab_lines.
read table mailtxt index tab_lines.
maildata-doc_size = ( tab_lines - 1 ) * 255 + strlen( mailtxt ).
Creation of the entry for the compressed document
clear mailpack-transf_bin.
mailpack-head_start = 1.
mailpack-head_num = 0.
mailpack-body_start = 1.
mailpack-body_num = tab_lines.
mailpack-doc_type = 'RAW'.
append mailpack.
mailhead = 'PayeePositivepay.txt'.
append mailhead.
Mail Contents
loop at lt_file into l_file.
mailbin-line = l_file.
append mailbin.
endloop.
break-point.
describe table mailbin lines tab_lines.
mailpack-transf_bin = 'X'.
mailpack-head_start = 1.
mailpack-head_num = 1.
mailpack-body_start = 1.
mailpack-body_num = tab_lines.
mailpack-doc_type = 'txt'.
mailpack-obj_name = 'payee'.
mailpack-obj_descr = 'Subject'. "EC NOTEXT
mailpack-doc_size = tab_lines * 140.
append mailpack.
Get the neccessary email ids from the table
SELECT * FROM ZFI_EMAILIDS INTO table I_ZFI_EMAILIDS.
LOOP AT I_ZFI_emailids.
mailrec-receiver = i_zfi_emailids-zemailid .
mailrec-rec_type = 'U'.
mailrec-com_type = 'INT'.
mailrec-notif_del = 'X'.
mailrec-notif_ndel = 'X'.
mailrec-express = 'X'.
append mailrec.
endloop.
Sending the document
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = maildata
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = mailpack
object_header = mailhead
contents_bin = mailbin[]
contents_txt = mailtxt
CONTENTS_HEX = xtex
receivers = mailrec
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.
endform. "send_emailHi,
You need to use attribute CL_ABAP_CHAR_UTILITIES=> NEWLINE or CR to use format the mail contents.
Maybe you are looking for
-
CS5 Printing to an Epson 1900 What happened?
It worked fine in CS 4 to the Epson just select Adobe RGB as the profile in the Print dialog then do the same in the Epson Drivers now I cannot do that once I have the color management option selected in the photoshop print dialog this is now grayed
-
Bug in playing back video podcasts from playlists?
I subscribe to about 2 dozen podcasts, a few of which are video podcasts. I have a smart playlist that collects all the podcasts together, based an their Album name. I have a second smart playlist that collects all unplayed & unrated members of the f
-
How select a range or portion of a clip when importing?
Upgraded from FC Studio 5.1 to FCP10.1 when importing media (mp4 or AVCHD) from the hard drive how do I select a range or portion of a clip in the media import window if I do not want to import the entire clip into FCP. At this point I can select th
-
5800 XPressMusic headphone / line out question.
Hi Is it possible to use the 3.5mm output as a line level output e.g. for a hifi / car stereo input ? Or is the headphone stage amp always in the signal path ? thanks
-
How do you sync Calendar information older than 2 weeks to PALM TX?
Occasionally, I will change information which is older than two weeks in the past on my Oracle Calendar client running on my Windows XP Pro OS. When I sync the data to my Palm TX, it does not get transfered back to my TX calendar. How can I success