Send attachment by email as is from my computer  or network

hi all,
i have to send an attachment as is by email.
this attachment location can be on my computer or on the network.
please i need an example code .
thanks
dany

thanks for the answer.
there is the solution code:
which might help you getting the file from the pc or you can change the source path and then send it to the following reciptant
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.
this code might help you

Similar Messages

  • When sending attachment in email the image is so large it takes up the screen, how do i make it normal, when sending attachment in email the image is so large it takes up the screen, how do i make it normal

    when sending attachment in email the image is so large it takes up the screen, how do i make it normal, when sending attachment in email the image is so large it takes up the screen, how do i make it normal

    In the Mail app, open the help menu. You will find your answer under "add attachments"

  • Help needed to setup template item list to send attachement within email te

    Hi! I read everything there was in the bookshelf on the setting of template on Outbound communication, advanced template and my main concern, template items list and I still can not send a template email with an attachment inside. I managed to send the email with the attachment in the message body but not send mail with an attachment separately.
    Is there a special feature or setting to the template items list or in the Siebel file system that needs to be done ? I've try to put a tag pointing to the template item in the advanced template but got no result. I've tried everything but got no result.
    My main goal is to send a template email containing the attachement of an official letter inside. Ideally, I would like the letter as an attachment to be populated by the data of the BC associated (values substitution). This is already working in the advance template. But that's another story. I would be happy if only I can send the email template to include the letter as attachement.
    Thanks in advance for helping me!

    Yes we do. Even if we go with F9 or by the send email from the file menu, the sending of emails is ok. It's just that it wont send attchment as define in the template item list. All settings are ok and are as specified in related bookshelf. By now, i'm looking if there is any activex control missing for outbond email OR if there is any html tags to put inside the advanced template so that the application could properly attach the file to the email. If you have aswer on you side, it would be appreciated.
    Jean.

  • I cannot send or forward email in Outlook from my iPad

    I cannot send or forward email from Outlook on my iPad

    Try deleting the mail account and setting it back up again.

  • Send email to phone from home computer

    How do I send an email from my home computer to a phone?

    karen0415 wrote:
    How do I send an email from my home computer to a phone?
    Open up your email account and go to compose/write a message. In the TO spot enter in [email protected] (Just where it says 10digitcellnumber enter in your 10 digit cell number, area code + number).  After that just write what you want to say and send.  The email should be sent to the verizon phone. It should land in their text inbox.
    Here are other cell providers email address in case you are interested:
    AT&T – [email protected]
    Verizon – [email protected]
    T-Mobile – [email protected]
    Sprint PCS - [email protected]
    Virgin Mobile – [email protected]
    US Cellular – [email protected]
    Nextel - [email protected]
    Boost - [email protected]
    Alltel – [email protected]

  • HT201269 How do I transfer my email address book from my computer ( not an apple ) to my new iphone 5S ?

    How do I transfer my email contact list from my PC to my iPhone 5S ?

    Sync it via iTunes on the computer as would be done with any content desired to be on an iDevice.
    This is covered in the User's Guide.

  • How to view aperture library from another computer on network?

    Hi,
    I'd like to simply view (not edit) my aperture library from another computer on my home network. The aperture library resides on a mac pro, and I'd like to see the images on a macbook pro to show family members. On the surface, this seems like a simple concept - as Apple TV can do this with home sharing. Further, itunes can share it's library in this manner.  Is this possible?
    thank you,
    T

    You don't mention which OS you're using and I understand that Lion has changed some of the sharing features but  what you are looking to do is doable.
    Be warned that accessing an Aperture library over a network is slow and definitely not something you want to do if editing except in an emergency and you want to make triple sure that only one user is accessing the library at a time.  But I regularly access libraries over wireless when I'm to lazy to walk across the house and need to check somthing out.
    If you are using Snow Leopard go into System preferences->Sharing and tune on file sharing on the the Mac Pro. If you have the same user name on both systems you should have no problem accessing the library from the MBP.
    If you're on Lion, you'l need to lok up how to enable file sharing. I haven't swithced so I can;r help you there.
    good luck

  • Does BPEL Support sending Attachment in EMAIL ?

    Hi,
    We have a scenario where we want to send an attachment of a file in the email for a Field Force Automation application. Is this possible in BPEL Beta 3 to send an email with an attachment ? Because in the notification service wizard there is no facility for attachment.
    The attachment could be even a simple .xml or .txt file.
    Regds,
    Nagarajan K.

    The current versions of the BPEL process manager support sending email attachments using the notification service. When attachments are to be sent via email, in the notification wizard, mark the email as a multipart message. Also set the number of attachments to send. When attachments are to be sent, the content body is set to a MultiPart element that contains as many BodyPart elements as the number of attachments. For example, if there are 2 attachments, a BPEL copy to created to set the content as follows.
    <copy>
    <from>
    <Content xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService">
    <MimeType>multipart/mixed</MimeType>
    <ContentBody>
    <MultiPart>
    <BodyPart>
    <MimeType/>
    <ContentBody/>
    <BodyPartName/>
    </BodyPart>
    <BodyPart>
    <MimeType/>
    <ContentBody/>
    <BodyPartName/>
    </BodyPart>
    </MultiPart>
    </ContentBody>
    </Content>
    </from>
    <to variable="emailPayload"
    part="EmailPayload" query="/EmailPayload/ns:Content"/>
    </copy>
    The content entered from the JDeveloper notification wizard is set for the first BodyPart. The rest of the BodyPart elements has to be set using BPEL copy statements as shown below. Each BodyPart has 3 elements - ContentBody, MimeType and BodyPartName. All the three elements must be set for each attachment.
                   <copy>
                        <from expression="string('image/gif')"/>
                        <to variable="emailPayload" part="EmailPayload"
    query="/EmailPayload/ns:Content/ns:ContentBody/ns:MultiPart/ns:BodyPart[3]/ns:MimeType"/>
                   </copy>
                   <copy>
                        <from expression="ora:readFile('bpel_logo.gif')"/>
                        <to variable="emailPayload" part="EmailPayload"
    query="/EmailPayload/ns:Content/ns:ContentBody/ns:MultiPart/ns:BodyPart[3]/ns:ContentBody"/>
                   </copy>
                   <copy>
                        <from expression="string('bpel_logo.gif')"/>
                        <to variable="emailPayload" part="EmailPayload"
    query="/EmailPayload/ns:Content/ns:ContentBody/ns:MultiPart/ns:BodyPart[3]/ns:BodyPartName"/>
                   </copy>

  • Sending attachment Via Email

    Hi All,
    I have a requirement where in i need to send an email from teh service ticket. The email will be triggered basedon status change to To be Approved. While the email is sent to approver, is it possible to pick the attachment linked to service ticket and add to email as an attachment. is this possible technically..any pointers on how to achive this would be of great help...
    thanq..
    Regards,
    Udaya..

    Udaya,
    I'm not going to give you all the coding details , but I have techically done this before for an activity and here is the recipe for your case:
    1) Create a new z-action profile for the transaciton type
    2) Copy the standard CL_DOC_PROCESSING_CRM_ORDER over to a z-version
    3) Copy the method from that class called CRM_SRVORDER_EXEC_SMART_FORM to a version called EMAIL_SRV_ORDER
    4) Copy the standard smartform used for the service profile to a zed version
    5) Configure a new smart forms mail action to send an e-mail using the new processing class
    6)  Now here is the fun part, you will actually re-code the method to excute the form, but not send out via e-mail.  You will capture the smartform output as OTF and then convert to ASCII to become the body of your e-mail.
    7) Next you will read the attachment for the e-mail message using he CL_CRM_DOCUMENTS class into memory
    8) Finally you will build an e-mail message via separate function module which will be called in a separate task(to avoid issuing  a commit work in the action), using CL_BCS message classes.
    Your end-result is your "action" will generate an e-mail with an attachment.  This isn't way too difficult and I estimate about one week to do. 
    Take care,
    Stephen

  • Xpath error while trying to send attachment with email

    Hi,
    I was trying to execute the BPEL sample - SendingAttachementWithEmail, as given in the tutorials.
    I had mapped the 'contentBody' in attachment[2] to
    ora:readFile(bpws:getVariableData('inputVariable','payload',
    '/client:SendEmailWithAttachmentProcessRequest/client:attachmentURI')
    I have a file called "SOA.txt" in my C:\ (C drive).
    I specified the following details in my 'initiate' screen
    to - jcooper
    subject - sample email
    body - testing how to send email with attachment
    attachmentName - SOA.txt
    attachmentMimeType - multipart/mixed
    attachmentURI - file:C:/SOA.txt
    I got the following error while executing the process, can any one please tell me where I am going wrong. Are the values I am passing correct?
    Error
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:readFile(bpws:getVariableData("inputVariable", "payload", "/client:SendEmailWithAttachmentProcessRequest/client:attachmentURI"))", the reason is C:\SOA.txt (The system cannot find the file specified).
    Please verify the xpath query.
    What could be the problem with the xpath query.

    Thanks for your suggestions, but it still does not work.
    The following is the error I get when I enter
    file:///c:/SOA.txt as my attachmentURI.
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:readFile(bpws:getVariableData("inputVariable", "payload", "/client:SendEmailWithAttachmentProcessRequest/client:attachmentURI"))", the reason is c:\SOA.txt (The system cannot find the file specified).
    Please verify the xpath query.
    I followd the same steps as given in the tutorial 'SendEmailWithAttachment' available under the folder <BPEL_HOME>\integration\orabpel\samples\tutorials\SendEmailWithAttachment.

  • Sending Attachment in Email in GP

    Hello,
    I have a GP Application in which the user wants to use the Attachment functionality. So I am thinking of sending the Attachments attached by the initiator in the email which is sent by using the Action 'Send an Email in Background with Attachment(optional)' to the Approver. So how can i implement this .?
    Any help would be highly appreciated.
    Regards,
    Anil

    Hi Anil,
    Have you done this scenario?
    Please let em know.
    Rajesh N

  • Sending attachment in email

    I want to attach a file from my desktop to an email. how do I do this?
    G5   Mac OS X (10.4)  

    Since this is an Apple Mail forum, I will describe the process using that program.
    The easiest way is to simply drag the file on your desktop onto the Mail icon located in the Dock. This will create a new message with the file attached.
    Another way is if you are already in Mail, simply create a new message and click the 'Attach' button at the top of the window. Then navigate to the Desktop and attach the file.
    Hope this helps.
    Bronson

  • Send attachment  through Email

    Hi All,
    I have a scenario where on Action Submit the uploaded file must send as an e-mail to the given recipient.
    I'm able to create the application till uploading file but could not send this as an attachment through e-mail.
    Could any one help in this regards.
    It is very urgent.
    Thanks in advance
    ambicasony

    hai Ambica,
    put this coding inside a method and call that on the on Action property of button.
    When  give mime body part 2 it ll go as attachment.try this it will work.
    try
                        String strSMTPIPAddress ="192.168.100.103";
                        Properties props;
                        Session session;
                        Provider p;
                        props = System.getProperties();
                        props.put("mail.smtp.host", strSMTPIPAddress);
                        session = Session.getDefaultInstance(props, null);
                        StringBuffer strMailBody = new StringBuffer();
                        wdThis.createmailbody(strMailBody);
                        Message message = new MimeMessage(session);
                        message.setFrom(new InternetAddress("<give the email address here>"));
                        message.addRecipient(Message.RecipientType.TO, new InternetAddress("<email address>"));
                                            message.setSubject("<give the subject of mail>");
                        MimeMultipart mimemultipart = new MimeMultipart();
    //                    //set message content
    //this is body content
                        MimeBodyPart mimebodypart1=new MimeBodyPart();
    //This is attachmnent
                        MimeBodyPart mimebodypart2=new MimeBodyPart();
    //                    mimebodypart1.setText("xxx");          //Attachment
    mimebodypart2.setText("<give the content of attachemnt>');
         mimemultipart.addBodyPart(mimebodypart1);
    mimemultipart.addBodyPart(mimebodypart2);
                        //message.setText(wdContext.currentContextElement().getSalorder());
                        message.setContent(mimemultipart);
                        message.setText(strMailBody.toString());
                        Transport.send(message);
                        wdComponentAPI.getMessageManager().reportSuccess("E-mail is sent to sharanya");
                        catch (Exception e)
                        wdComponentAPI.getMessageManager().raiseException("Exception" + e.getMessage(), true);
        If you have any issues in using this plz let me know.
    Thanks n Regards
    Sharanya.R
    Edited by: Sharanya.R on Mar 4, 2008 9:45 AM
    Edited by: Sharanya.R on Mar 4, 2008 9:56 AM

  • Problum in sending attachment by email

    Hi all,
    I need to send 3 dcouments as attachemnt to external email.
    3 documents are --- one  text file and 2 word documents.
    I am using SO_NEW_DOCUMENT_ATT_SEND_API1 function module.
    Problum is... when i run program foreground, it is working fine. It is sendding 3 attachments.
    But, when I run this program background, it is sending only text file but not 2 other word documents?
    I have tested several times and had same problum.
    What would be reason for this. Y i am not able to send 3 documents by back ground job?
    Thanks
    Shive

    How are you uploading to memory those non-sent documents? being word ones, I bet you are using some *UPLOAD, like WS_UPLOAD, GUI_UPLOAD or its corresponding class object.
    Those objects/functions cannot be used in background.

  • How do I send attachment to email that can be opened by windows or pc users?, how do I send attachment to email that can be opened by windows or pc users?

    I cannot get my mac to attach files to email that may be read by windows users.  It is really annoying.  Any suggestions?

    "ordinary document or occasionally a small photo"
    What is an ordinary document? What program generated it? Windows has trouble opening documents if you don't have the extension visible as well.

Maybe you are looking for

  • How to Reorganize CSM200 Shared Storage in Solaris 10 x86 Oracle 10gR2

    I could use some guidance from those who are more experienced in RAC administration in a Solaris environment with ASM. I have a three-node RAC with Oracle 10gR2 instances on top of Solaris 10 x86 where the shared storage is a Sun CSM200 disk array wh

  • EP technical specification document

    Can one of you share a tech spec document for developer EP portal application? I found a similar thread with this link but did not take me anywhere - https://media.sdn.sap.com/html/submitted_docs/Implementation_Roadmap_EP/Enterprise%20Portal/index.ht

  • Resume an old email address?

    Update: I have contacted customer support via a chat. Apparently, I conclude this is not unheard of:To have a domain & ip already blocked with no action on the part of the user. The unblock request form I was asked to fill in required an ip address. 

  • Help on IS-VMS

    Helo all, We are working on a persuit, where we have to present an artifact on Vehicle management system. Basics are available on SAP. But can anybody suggest a good source to study a cycle (mainly distribution-vehicle movements) in VMS and its mappi

  • PIR Migration

    Hello, We are planning a PIR migration exercise, where we found that in the source system, some PIR's are flagged for deletion in EINA( General Data) and some in EINE( P Org Data), The list of PIR's is mutually exclusive. Should we be just avoiding a