Send Email with diff user id .

hello experts ,
                  i have a program which can send mails to other user but it by default takes my used id as sender's mail id . This program is working fine , but is there any way possible to hide my sender's mail id and show some other mail id in sender to the recipients?
thanks in advance

Hello,
Either change it in SU01 or use this code to temporarily change it
These are the parameters
P_FNAME     TYPE     AD_NAMEFIR  " first name
P_LNAME     TYPE     AD_NAMEFIR  " surname
PX_NAME     TYPE     XFLAG             " name will only be changed if this flag is set
P_FROM     TYPE     AD_SMTPADR " sender email id
PX_FROM     TYPE     XFLAG             " sender email id will only be changed if this flag is set
* populate sender name if specified
  data: lv_persnumber type AD_PERSNUM.
  data: lv_ADDRNUMBER type AD_ADDRNUM.
  data: lv_oldemail type AD_SMTPADR.
  data: lv_oldfname type AD_NAMEFIR.
  data: lv_oldlname type AD_NAMELAS.
  data: lv_oldfullname type AD_NAMTEXT.
  data: lv_newfullname type AD_NAMTEXT.
  if px_from = 'X' or px_name = 'X'.
    select single PERSNUMBER ADDRNUMBER from usr21
      into (lv_persnumber, lv_addrnumber)
      where bname = sy-uname.
    if px_from = 'X'.
      select single SMTP_ADDR from adr6
        into lv_oldemail
        where ADDRNUMBER = lv_ADDRNUMBER
          and PERSNUMBER = lv_PERSNUMBER.
      update adr6
        set SMTP_ADDR = p_from
        where ADDRNUMBER = lv_ADDRNUMBER
          and PERSNUMBER = lv_PERSNUMBER.
    endif.
    if PX_NAME = 'X'.
      concatenate p_fname p_lname into lv_newfullname
        separated by space.
      select single NAME_FIRST NAME_LAST NAME_TEXT from adrp
        into (lv_oldfname, lv_oldlname, lv_oldfullname)
        where PERSNUMBER = lv_PERSNUMBER.
      update adrp
        set name_first = p_fname
        name_last = p_lname
        NAME_TEXT = lv_newfullname
        where PERSNUMBER = lv_PERSNUMBER.
    endif.
    commit work.
  endif.
after calling your FM, don't forget to change it back
* reset email id and name back to old value if set earlier
    if px_from = 'X'.
      update adr6
        set SMTP_ADDR = lv_oldemail
        where ADDRNUMBER = lv_ADDRNUMBER
          and PERSNUMBER = lv_PERSNUMBER.
    endif.
    if PX_NAME = 'X'.
      update adrp
        set name_first = lv_oldfname
        name_last = lv_oldlname
        NAME_TEXT = lv_oldfullname
        where PERSNUMBER = lv_PERSNUMBER.
    endif.
    if sy-subrc = 0 and ( px_from = 'X' or px_name = 'X' ).
      commit work.
    endif.
Edited by: Kris Donald on Jun 19, 2009 1:02 PM

Similar Messages

  • When send email with emoticons to a pc user, emoticons show as an empty box. Also, email content has a symbol on every line. How to stop this from happening?

    When send email with emoticons to a pc user, emoticons show as an empty box. Also, email content has a > symbol on every line. How to stop this from happening?

    Dear Mr. Toad (my all-time favorite ride at Disneyland ;-) ..
    Thanks so much for your detailed reply.. my netbook is in the bedroom, turned off.. I (so far) only use it in the evening, in the bedroom.. I've saved your response, and will try your suggestions, and let you know if they solve the problem I described. I really appreciate you taking the time to post such a detailed reply..
    I can't answer your Thunderbird "configuration" questions, because I'm in the living room, using the crap Vista laptop, on which I plan to install Thunderbird, and then take Windoze Mail out in the street and drive over it a few times.. I'll get back to you one way or the other, and let you know if your instructions solved the problem, or not..
    I don't understand why Thunderbird "out of the box", so to speak, simply doesn't forward HTML emails with embedded graphics, (like Outlook Excess, and Winblows Mail do).. without having to go through those steps. I personally HATE HTML email, but over the years, it's become more and more prevelant.. so it's a problem I must fix..
    Thanks again..
    Harv..

  • Help with sending emails to multiple users.

    Currently we have a process to send mail to muliple users by looping through the list of users and sending each individual an email
    <Action id='1' name='sendEmail' application='com.waveset.provision.WorkflowServices'>
    <Argument name='op' value='notify'/>
    <Argument name='template' value='$(template)'/>
    <Argument name='toUser' value='$(tuser)'/>
    <Argument name='catch' value='notificationException'/>
    </Action>
    The variable tuser contains a single email address.
    Is there any way to setup tuser to contain multiple email addresses?
    I have tried passing a list and a string separated by colons (ex: <s>[email protected]; [email protected]</s>) and neither one works.
    Question 2
    Is it a bad idea to try and send email to up to 50000 users at once using IDM? Besides the fact that I would need to search for specific users and get their email addresses based on their capabilities.

    Hi,
    For sending emails to multiple users, use to instead of toUser. Put the names in comma seperated values
    <Action id='0' application='com.waveset.provision.WorkflowServices'>
    <Argument name='op' value='notify'/>
    <Argument name='template' value='$(template)'/>
    <Argument name='to' value='$(to)'/>
    <Argument name='cc' value='$(cc)'/>
    <Argument name='catch' value='notificationException'/>
    </Action>
    You can use IDM to send emails.
    it will be a good idea to break down the email that you are sending into groups/batches. If possible, you can send email to DL s
    Else, you can segregate the users based on roles and send emails. This will reduce the load. Hope it helps
    Regards
    Arjun
    Edited by: arjun.sengupta on Dec 4, 2012 3:26 AM

  • Send email from PA30 user exit

    When I try to send an email from user exit in ZXPADU02 it never makes it to SOST.  WIll always go to SBWP outbox if I set the flag but never gets sent to receiver address.
    If I paste the following code into a report it works fine.  Is there some other parameter for this FM or some additional process needed to send email from a user exit?
        DATA: maildata TYPE sodocchgi1.
        DATA: mailtxt  TYPE TABLE OF solisti1 WITH HEADER LINE.
        DATA: mailrec  TYPE TABLE OF somlrec90 WITH HEADER LINE.
          CLEAR maildata.
          REFRESH: mailtxt, mailrec.
          maildata-obj_name = 'SRVC_EMAIL'.
          maildata-obj_descr = 'Email test'.
          maildata-obj_langu = sy-langu.
          mailtxt-line = 'Test line from user exit'.
          APPEND mailtxt.
          mailrec-receiver = '[email protected]'.
          mailrec-rec_type  = 'U'.
          APPEND mailrec.
          CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
            EXPORTING
              document_data              = maildata
              document_type              = 'RAW'
              put_in_outbox                = 'X'
              commit_work                  = 'X'
            TABLES
              object_header                = mailtxt
              object_content               = mailtxt
              receivers                       = mailrec
            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.

    Put the function call 'SO_NEW_DOCUMENT_SEND_API1'
    in a report Program & SUBMIT that report from ZXPADU02.
    Arya

  • Unable to send email to the users from Project Server Workflow

    Hello all,
    I am facing issues in sending emails to the users from the workflow in SharePoint Designer 2013.
    I am trying to send emails to valid users in a Project server 2013 Workflow by Email action.
    I have set up the SMTP server successfully, I have configured SMTP server successfully in IIS manager 6.0
    I have configured the outgoing e-mail settings in Central Administration successfully,
    I have configured the SMTP email settings for my web app in IIS manager as well.
    I have configured and synced the User Profile App with the eMail addresses from Active Directory as well.
    I have configured the Alerts and Reminders in Operational Policies of PWA settings as well.
    I can send the emails to the users successfully through Powershell.
    But when I am trying to Start a Task Process with a user in the workflow, the task process starts but it never sent an email notification. So I tested by using the Action Email, that also the user is unable to receive any email. But the Workflow is not giving
    any error also. The email sending is successful, but the user is unable to receive it. The workflow succeeds to next phase without any errors.
    So to cross verify I tried 'Alert Me' option on a list, but that also is not sending(or might be sending but the user is not receiving) the mail.
    What else should I do to solve this issue.
    Please help me.
    Thanks,
    Shanky

    Hello Paul,
    I tried editing the PWA instance as you said, but that also didn't help :(
    I even restarted the Project Server Service, but nothing is changed. 
    I tried creating a new workflow for a List and used send email there, but that also is not sending the mail :(
    How do I check where the issue is from ? I mean, whether the workflow is sending the mail and the mail server is not receiving? or whether the workflow is not sending the mail itself? how do I check this? Is there any way to log these details?
    Please help me regarding this issue, I am totally clueless how to proceed.
    Thanks,
    shanky

  • Send email to external user using fm 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    Hi friends,
    I wrote this code to send mail to external user from sap.
    It did not work properly can anyone help me to send email to extenal user.
    The return code after executing the function module is 2.
    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.
    Creating the document to be sent
    DOC_CHNG-OBJ_NAME = 'OFFER'.
    DOC_CHNG-OBJ_DESCR = 'abcd'.
    OBJTXT = 'aaaaaaaaaaa:'.
    APPEND OBJTXT.
    OBJTXT = 'bbbbbbbbbb'.
    APPEND OBJTXT.
    OBJTXT = 'ccccccccccccc.'.
    APPEND OBJTXT.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    RECLIST-RECEIVER = mail address.
    RECLIST-REC_TYPE = 'U'.
    RECLIST-COM_TYPE = 'INT'.
    RECLIST-NOTIF_DEL = 'X'.
    RECLIST-NOIF_NDEL = 'X'.
    APPEND RECLIST.
    Creating 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.
    Creating the document attachment
    (Assume the data in OBJBIN are given in BMP format)
    OBJBIN = ' \O/ '. APPEND OBJBIN.
    OBJBIN = '     '. APPEND OBJBIN.
    OBJBIN = ' / \ '. APPEND OBJBIN.
    DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    OBJHEAD = 'picasso.bmp'. APPEND OBJHEAD.
    Creating 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   = 'BMP'.
    OBJPACK-OBJ_NAME   = 'ATTACHMENT'.
    OBJPACK-OBJ_DESCR = 'Reproduction object 138'.
    OBJPACK-DOC_SIZE   = TAB_LINES * 255.
      APPEND OBJPACK..
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
         EXPORTING
              DOCUMENT_DATA = DOC_CHNG
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK   = '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.
    IF SY-SUBRC NE 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    Hi,
    Check in SCOT t-code whether it has been properly configred to send the mails
    Regards,
    siva chalasani.

  • To send email with editable PDF/XLS attachment

    Hi All,
      Is it possible to send editable PDF/XLS attachment in a mail to the customer via SAP, if yes how?
    Please Help! Urgent

    hi,
    *Sending mail with attachment
    * This program will allowed you to send email with attachment.
    * First, specify the attachment file from your local hardisk and execute.
    * Next, specify the sender email address and click the send button.
    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   = 'sap-img.com testing by program'.
    g_document-folrg   = 'O'.
    *g_document-okcode   = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes =  'sap-img.com 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.
    *-- End of Program  
    Hope this helps, Do reward.

  • Can I use DeliveryManager just to send email with no document?

    Can I use "oracle.apps.xdo.delivery.DeliveryManager" to just send email without any document attached? or
    Is this only used to deliver the documents by email?
    I just want to use DeliveryManager just to send email with content in the body of the email. I am using BI Publisher API.
    Can any of you provide sample input for the above?

    Hi,
    You can use iMovie to record the message and save it as an email sized item and send the file as email like before.
    For those iChat AV users without a Cam and the AIM users without a cam you can do One-Way Viedo chats.
    Once you have a recorded Video file you can also drop the file on any Buddies name in you iChat Buddy list rather than using email.
    For those using other services you can set up a Jabber account and enable the required Transport/Gateways and send the files that way.
    http://www.jabber.org.au/ichat = Australian Page
    AllForces
    These are the two main information pages on how iChat can connect to the other IM services.
    Jabber Public Server list
    That would appear to be everybody.
    Ralph

  • Outlook 2010 wont send emails with attachments

    Hello
    I was starting to write the question when we found out what the problem was. So I thought I would share our resolution in here, in case someone fall in the same issue.
    One of my user with Outlook 2010 cannot send emails with attachments of some size. +-50 kb files works fine.
    But when we try a file of 1mb, the mail goes in the Outbox, Exchange status swith from Connected to Disconnected and the email stay there.
    The user is in a remote location, connected through VPN with the network where the Exchange 2013 server is
    Here is what I did:
    1. Re-create Outlook profile: wont work
    2. Re-create Windows profile: wont work
    3. Check ip settings: fine
    4. Try in OWA: wont work
    5. Look at Exchange settings for outgoing email size: 10mb
    6. Load my user's Outlook profile on another LAN: works fine
    That last point made me thought about a potential problem on the remote user's lan. So I did
    7. Check VPN config between the remote site and IT site: fine
    After googling the problem, I found that website (http://community.spiceworks.com/topic/396793-outlook-2010-client-suddenly-showing-disconnected-from-2013-exchange-server) that suggest to change the DNS setting on the client. However, the DHCP of my remote
    user was the router itself, which is giving a DC as primary DNS, and ISP DNS as secondary. I changed the secondary DNS for another DC in our organization, and guess what? Voila! Problem is gone!
    Thinking about it that make not much sense, as the primary DNS is always up the secondary shouldn't be queried. But that's what resolved our problem.
    Hope it helps someone!
    Martin

    Hi Martin,
    Thanks for your sharing:)
    If you have any question about Microsoft Office, welcome to contact us and feel free to post your issue on Office forum.
    Regards,
    Winnie Liang
    TechNet Community Support

  • TS3276 Mac Mail won't send emails with signatures

    My Mac Mail won't send emails with signatures. I get the "whoosh" sound and they show in sent mail, but the recipient doesn't receive them until I take off the signature and resend the email. Without a signature, it is received. It never used to be a problem, but started this past month. Please advise!

    Did Earthlink have you try using their authenticated SMTP server?
    If not, try changing Earthlink's SMTP server settings to the following:
    SMTP Server: smtpauth.earthlink.net
    Server Port: 25 or 587. Assuming Earthlink is your ISP, 25 should work.
    Use Secure Sockets Layer (SSL): Off or not selected.
    Authentication Type: MD5 Challenge-Response. Not sure if this authentication type is available with 10.2 and if not, select Password.
    User Name: Your entire Earthlink email address.
    Password: The password for your Earthlink email account - the same password used to check the incoming mail server for new messages.

  • Cannot send Emails with Attachemen​ts

    Hello
    i have problems sometime i can not send Emails with Attachements.
     This Problem is still for everybody on the User the are on the Blackberry Server and the Problem is for Z10 and Q10 also Z30 with the latest Firmware also with the old Firmware
    I have tryet this
    http://supportforums.blackberry.com/t5/BlackBerry-​Z10/Cannot-send-some-attachments-or-pictures-red-c​...
    but it doesnt help.
    is there any solution for the Problem ?
    Thanks a lot

    It am trying to send email with attachments they just won't send. I can receive attachment no problem.
    I try sending pictures that were taking with the phone. I tried sending attachment that I have been sent but they won't send
    either. Any help on this would be great.
    Thanks
    Mark

  • Problem sending email with attachment by android

    Good Morning, I'm Luca.
    I have this problem:
    through a smartphone with Android system,
    synchronized via ActiveSync, the user
    is unable to send emails with attachments.
    While you can receive them and
    open them without problem.
    We have a server with Exchange 2010.
    Is there any authorization that I have to give
    you?
    Other devices, always with Android system,
    with other accounts of course,
    does not have the same problem.
    Thank you very much
    Best regards

    Luca, if one user is able to send attachments, the other should be able to as well.  However, if an attachment is too large, it won't be delivered.  
    Agreed, This does sound like a size limitation issue.
    Have the person try to send the same file from his outlook on his PC and see if he can send it out, that should be a good indication.

  • Send Email with Multiple Attachment

    Hi,
    How do you send an email with multiple attachment of different types thru SO_NEW_DOCUMENT_ATT_SEND_API1?
    Please help.
    Tyken

    Hi,
    Try this code.
    This program will allowed you to send email with attachment.
    First, specify the attachment file from your local hardisk and execute.
    Next, specify the sender email address and click the send button.
    Written by : SAP Basis, ABAP Programming and Other IMG Stuff
                   http://www.sap-img.com
    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   = 'sap-img.com testing by program'.
    g_document-folrg   = 'O'.
    *g_document-okcode   = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes =  'sap-img.com 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.
    *-- End of Program
    Reward pts if usefull.
    Regards,
    Dhan

  • Send email with XMl attachment

    Hi All,
    My requrement are, to send emails to particular person "PDF" attachment and "XML" attachments.
    i did pdf by using convert spool to pef and send email to that vendor.its working .
    But i dnt know how to send email with XML attachment.Is there any function for convert spool to xml and email to that vendor.Please send me code ASAP.
    i have to sumbit this object soon.Please help me regarding this issue.
    Abhi...

    Hi,
       Try this out.
    ISR_FI_SEND_EMAIL
    ISR_FI_SEND_EMAIL_NEW_USER
    SLS_CUST_SEND_EMAIL_TOOL
    OR
    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 = 'sap-img.com testing by program'.
    g_document-folrg = 'O'.
    *g_document-okcode = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes = 'sap-img.com 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.
    *-- End of Program
    Also check this links as well.
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    Hope this will help.
    Regards

  • Send emails with attachments residing in the network

    Hi All,
    My requirement is to send email with attachments. I am using javamail and it works fine only if the attachment resides in the local machine.
    If the attachment resides in the network [the folder is shared by the user], the application gives me IOException.
    Please help. Let me know if I am not clear.

    Please find the trace below . Also I am able to browse the share but haven't tried writing a test app.
    javax.mail.MessagingException: IOException while sending message
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:595)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at SendEmail.sendMail(SendEmail.java:66)
    at FetchDetails.fetchResultSet(FetchDetails.java:69)
    at FetchDetails.<init>(FetchDetails.java:36)
    at Index.main(Index.java:3)
    Caused by: java.io.FileNotFoundException: \xxx.xxx.xx.xxx\dinesh\dialog.gif (The
    system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at javax.activation.FileDataSource.getInputStream(FileDataSource.java:80
    at javax.activation.DataHandler.writeTo(DataHandler.java:287)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1248)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:747)
    at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:361)
    at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:85
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:83
    9)
    at javax.activation.DataHandler.writeTo(DataHandler.java:295)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1248)
    at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1673)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:555)
    ... 6 more
    Cant send mail. IOException while sending message

Maybe you are looking for

  • SSRS Subscription Problem

    Hi, I have scheduled some report in SSRS ( SQL Server 2008 R2) , reports are generated at midnight and saved in a shared folder. It works fine generally, but  On some days it fails,  Job history shows success, but, files are not saved in shared folde

  • Link records management with SRM

    Hello, I'm trying to integrate RM and SRM and i could see that in S_AREA_CMG exists some service provider specifics for SRM objects, like "Record for SRM and R/3 Purchasing Documents" (/SAPPSPRO/SP_RECORD), SP for SRM Quotations (/SAPPSPRO/SP_SRM_QUO

  • When I try turn-off the MBAir freeze

    When I use ITunes and I try turn-off or reebot the system is freeze. appear error unmount of/home failed (45) unmount of/net failed (45) I check and repair disk permissions but the problem persist.

  • I recently continued my subscription. Where do a get an invoice for my payment from?

    I recently continued my subscription. Where do a get an invoice for my payment from?

  • What is the best set up for video editing?

    What is the best computer? The best software? The best external storage? The best ram? 3D editing? Everything!!!!!! Running full HD and 720p at 60 fps videos. Clips ranging from a few seconds to 10-30 minutes. Cost isn't an issue. What is the best se