Need to attavh a file with email message

Hi All,
I need to attach a file to the email message, for the same I am using the function module SO_OBJECT_SEND.
but coudl not succeed.
Can any one have insight over the function module that how I can use it for a attching a mail to email message.
Please suggest your thoughts on the same.
Thansk,
Sandy.

Try with FM SO_NEW_DOCUMENT_ATT_SEND_API1
Sample code
  data: IS_DOCDATA   type SODOCCHGI1,
        IS_RECEIVERS type SOMLRECI1,
        IS_RECEIVERS_COPY type SOMLRECI1,
        IT_RECEIVERS type table of SOMLRECI1,
        IS_CONTENT   type SOLISTI1,
        IT_CONTENT   type table of SOLISTI1,
*500369789+
        l_txt(255)    type c,
        lt_objpack    TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
        lt_objhead    TYPE TABLE OF solisti1   WITH HEADER LINE,
        lt_objtxt     TYPE TABLE OF solisti1   WITH HEADER LINE,
        l_tab_lines TYPE i,
        l_att_type  LIKE soodk-objtp.
*500369789+
  IS_DOCDATA-OBJ_NAME = 'MAIL'.
  IS_DOCDATA-PRIORITY = 5.
  IS_DOCDATA-OBJ_LANGU = SY-LANGU.
  IS_DOCDATA-NO_CHANGE = 'X'.
  IS_DOCDATA-OBJ_DESCR = SY-CPROG.
  loop at IT_MESSAGE into IS_MESSAGE.
    clear : IS_CONTENT, l_txt.  "500369789+
    move is_message-line to l_txt. "500369789+
   move IS_MESSAGE-LINE to IS_CONTENT-LINE. "500369789-
    move l_txt to IS_CONTENT-LINE. "500369789+
    append IS_CONTENT to IT_CONTENT.
  endloop.
*---select_email_address
  select single
         EMAILADDR
         CCEMAILADDR
    into (IS_RECEIVERS-RECEIVER, IS_RECEIVERS_COPY-RECEIVER)
    from ZGL_EMAILCTRL
   where IDENT = ''
     and ZPROGRAM = 'Z_L_SO_CREA'
     and ACTIVE = 'X'.
  if IS_RECEIVERS-RECEIVER is not initial.
    IS_RECEIVERS-REC_TYPE = 'U'.
    IS_RECEIVERS_COPY-REC_TYPE = 'U'.
    IS_RECEIVERS_COPY-COPY = 'X'.
    append IS_RECEIVERS to IT_RECEIVERS.
    append IS_RECEIVERS_COPY to IT_RECEIVERS.
*500369789+
   lt_objhead-line = 'USA Order Report'.
   append lt_objhead.
   DESCRIBE TABLE lt_objhead LINES l_tab_lines.
   CLEAR lt_objpack-transf_bin.
   lt_objpack-doc_size = STRLEN( lt_objhead ).
   lt_objpack-head_start = 1.
   lt_objpack-head_num = 1.
   lt_objpack-body_start = 1.
   lt_objpack-body_num = 1.
   lt_objpack-doc_type = 'RAW'.
   APPEND lt_objpack.
   l_att_type = 'RAW'.
  DESCRIBE TABLE it_content LINES l_tab_lines.
  READ TABLE it_content into is_content INDEX l_tab_lines.
  lt_objpack-doc_size = ( l_tab_lines - 1 ) * 255.
  lt_objpack-doc_size = lt_objpack-doc_size + STRLEN( is_content ).
  lt_objpack-transf_bin = 'X'.
  lt_objpack-head_start = 1.
  lt_objpack-head_num = 2.
  lt_objpack-body_start = 1.
  lt_objpack-body_num = l_tab_lines.
  lt_objpack-doc_type = l_att_type.
  lt_objpack-obj_name = 'ATTACHMENT'.
  concatenate 'Usa' SY-DATUM6(2) SY-DATUM4(2) into
  lt_objpack-obj_descr.                   "#EC *
  APPEND lt_objpack.
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
     EXPORTING
      document_data              = IS_DOCDATA
      commit_work                = 'X'
    TABLES
      packing_list               = lt_objpack
    object_header              = lt_objhead
      contents_txt               = lt_objhead
      contents_bin               = it_content
      receivers                  = it_receivers
    EXCEPTIONS
      too_many_receivers         = 1
      document_not_sent          = 2
      document_type_not_exist    = 3
      operation_no_authorization = 4
      parameter_error            = 5
      x_error                    = 6
      enqueue_error              = 7
      OTHERS                     = 8.

Similar Messages

  • I need to open a file with an associated programm.

    I need to open a file with an associated programm.
    I'm looking for two solutions:
    1. for Linux/Solaris/Unix/...
    2. for Windows 95/98/Nt/2000
    For Windows I have done this with command line
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uSavePath);
    but it doesn't work on windows2000. We need an universal solution.
    For linux
    Process p = Runtime.getRuntime().exec("netscape openURL " + uSavePath);
    But may be anybody know better solution?

    You are right. For unix better solution is that my program to care about all association itself. As I undestend now it's a common solution for unix applications.
    But for windows it will be ugly enough. I've found another way for windows
    Win2000/NT: "cmd /C start filename /B"
    other Wins: start filename
    for linux I've stopped at doing this via Netscape.
    May be in future I'll make my property file.
    start filename - on Win95(may be 98/ME) returns -1 if file not assotiated with a programm, and doesn't shows openWith dialog. It solved using something like "rundll32 shell32, OpenWith filename"
    It's all for those how will solve this problem in future.

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

  • Password needed to access pdf file in email

    Ok Im trying to access a pdf file in a email, but when I click on the link a box pops up saying that it is PDF password protected. I have never set up a password, so where do I get this magical password b/c I need to view the email. I have a MAC if that makes a difference. THank you so much if you can help.

    It is not because you set a password for the file but the email sender. If you could not open the file with password protected, you will ask help from the pdf author. And if you could not copy or print. you can use PDF Password Remover to rip the restrictions.Best wishes.

  • How do I attach photo files to email message in iPhoto '11?

    Apple says, "If you want recipients to be able to use the photos you send, rather than simply view them, you can attach the photo files to your email message. (BUT HOW?) Recipients can then download the photos from the email message and print them, use them in their own projects, and so on."
    How do I attach these files when sending an email of photos using iPhoto? (I don't want to use AppleMail, I know how to do it in AppleMail) When I click to Share my photos via email in iPhoto, I do not see any option rbutton to add files to make the photos easily downloadable for the recipient.  Anyone know how to do this?  Thanks!

    Not sure why you can't deselect the option, but I would guess that yes, the files are being attached.
    Who are you sending to? iPhoto sends HTML emails and not every application on Windows or Mac knows how to deal with them, for instance, nor every user.
    Regards
    TD

  • How to attach files to email messages

    Is there any way to attach a file when sending an email message using Gmail or Hotmail? I can't find a way of sending a picture (taken with the Playbook) via email.

    You're using the gmail or hotmail webmail, not the Bridge email?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Need to generate excel file with different sheets

    Hi,
    I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files
    and my requirement is to generate this in a single excel file with diffrent sheets.
    Please help on this
    Thanks & Regards,
    Krishna Vyavahare

    I'm not able to realize how Oracle will help in the problem. You may probably want to look at some [.net forums|http://www.google.com.sg/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS280&q=.net+forums&btnG=Google+Search&meta=lr%3D] about this.
    Cheers
    Sarma.

  • Need help moving photoshop files with layers

    I have been having some trouble, when I attempt to move photoshop files with a CD-R disk, from my school pc to my home mac, only the top most image is moved. The layers are deleted, and I only receive the image on the background layer. I need the layers to continue working on the pieces. Would a flash drive transfer the whole file, or am I doing something wrong with the disk file?

    Yeah, time is a factor because the system is getting wiped in a few days. The school version is photshop 7 I believe, and I have photoshop CS3 extended here. What I did was save the file to the CD burner, I didn't change the format to my knowledge. I thought that the data would have transfered from computer to computer, but it didnt, its like it saved as a different file entirely. I assume that using a flash drive would preserve the info in its entirety. I guess your saying that the type of file its saved as changes whether its a photoshop layers file, or just a flat image. I'll try again tomorrow.

  • Problem in uploading xls/csv file with Email address through oracle forms

    Dear all,
    I've created an interface to upload data from xls
    and csv files to database tables.
    I'm sucessed in this. Now i'm facing an issue.
    If the xls/csv file having Email address,the
    upload activity is not working..junk characters is
    getting stored.
    I came to know that, xls .csv file having email
    address with hiperlink. so this may cause the
    issue (just guessing)..
    we can't restrict users to upload email without
    hiperlink.. so what is the alternative to do
    this..
    Email address
    [email protected]
    [email protected]
    [email protected]
    etc...

    Can you give some more information:
    What versions of Forms, database, Java, browser are you using?
    How are you uploading data? Please show us your code.
    What do you mean by "email with a hyperlink"?

  • Edits to To Dos associated with email messages don't persist

    Here are the steps to replicate this problem within Apple Mail (the latest version - 4.3 on OS X 10.6.4):
    1) Select some text in an email message, and click the to do button in the toolbar to turn it into a to do. This to do now appears in the list of to dos visible when you click 'To Do' under 'Reminders' in Mail's left hand sidebar.
    2) Return to the email message, and edit the to do visible at its top. The to do text has changed when you view it via the email message, but if you again look at the list of to dos via Mail's left hand sidebar it has not - only the original to do text is visible. And if you then return to the email message, the do has returned to its original text.
    Any help/pointers for investigation much appreciated

    Sorry no help just noting that I have excately the same problem. However I am still on Leopard with Mail V3.6. I suspect one of the recent "security" updates screwed the way how Todo notes are shared with Mail and Ical...
    I can also edit the Todo message with Ical and the changed text appears instantly in Mail. Just editing within a mail-message with the little yellow box above is not working. However I can change priority and due-dates but not the text....
    weird stuff.... anyone has an idea? Thanks. Emilia

  • Need help exporting ID file with TOC to EPUB.

    I've been troubleshooting a file created in ID CS5.5 and then moved to CC. When I export to EPUB the TOC ends up at the end of the file rather than at the point where I originally inserted the TOC. The vendor I'm sending the EPUB to won't accept a file with the TOC out of place. I tried exporting to an HTML editor and moving the TOC there. (I'm no whiz at HTML though.) Now I see no way to import the file back into ID to export it as EPUB ( and doubt that's the best way to deal with this anyway). I'd deeply appreciate any suggestions!

    First of all, a TOC is not only "The Toc". You need to distinguish between the dynamic Reader TOC and a optional TOC e.g. on page 3. While the first is generally required, the second is optional in most cases.
    You must also distinguish whether the export is EPUB 2 or EPUB 3.
    1. Assume you mean the dynamic TOC > InDesign will create the TOC on the right place, if you choose the TOC-Style during the export.
    2. Assume you mean the TOC on page 3 > Here the content- or article-order is important! If you have a threaded story from page 2-100 and your TOC as a single frame on page 3 > InDesign will first export the content on page 2 AND the content of all threaded frames and at least your TOC on page 3.
    3. Assume further your exported file is correct in most cases, you can change the order of your TOC in the EPUB directly in the content.opf file in the spine-area
    To give you more help, I must have a look at your file.
    Kai Rübsamen

  • No sound with email messages

    No sound with email messages

    Open the settings App > Notifications > Messages > Text tone. Make sure you have it set.
    If so, Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps from the tray before doing the reset.

  • Adding PDF File to Email Message

    When I attempt to add a PDF file to an email message (via Outlook) I get the following error message, after which the program shuts down: "The instruction at 0x6148f787 referenced memory at 0x00000000. The memory could not be read." Please Help!

    It runs in a Window titled Outlook all by itself. Guess I'm an idiot because I still can't find the version. Anyway, this problem only happens when I'm using IE. When I use Firefox, I can attach a PDF file to an email message just like I used to do using IE.
    [private data removed]

  • Need help to create file with name and current time stamp.

    I need to create .xlsx file exporting data from sql database and file name would be 'FileName' and current yyyymmdd. 
    I'm trying to use following code but it's keep saying  incorrect syntax near "+".
    EXEC p_CreateExcel 'sql64', 'NewFile', '\\hrfile1\Shared\Buying Report\NewFile'
    + CAST(YEAR(CURRENT_TIMESTAMP) AS VARCHAR)
    + RIGHT('00'+CAST(MONTH(CURRENT_TIMESTAMP) AS VARCHAR),2)
    + RIGHT('00'+CAST(DAY(CURRENT_TIMESTAMP) AS VARCHAR),2)+'.xlsx'

    This is what I have on EXEC p_CreateExcel
    USE [XePro01]
    GO
    /****** Object:  StoredProcedure [dbo].[p_CreateExcel]    Script Date: 02/26/2015 11:27:35 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER procedure [dbo].[p_CreateExcel]
            @db_name varchar(100),
            @table_name varchar(100), 
            @file_name varchar(100)
    as
    --Generate column names as a recordset
    declare @columns varchar(8000), @sql varchar(8000), @data_file varchar(100)
    select 
            @columns=coalesce(@columns+',','')+column_name+' as '+column_name 
    from 
            information_schema.columns
    where 
            table_name=@table_name
    select @columns=''''''+replace(replace(@columns,' as ',''''' as '),',',',''''')
    --Create a dummy file to have actual data
    select @data_file=substring(@file_name,1,len(@file_name)-charindex('\',reverse(@file_name)))+'\data_file.xls'
    --Generate column names in the passed EXCEL file
    set @sql='exec master..xp_cmdshell ''bcp "set fmtonly off select * from (select '+@columns+') as t" queryout "'+@file_name+'" -c -t, -T -S'''
    exec(@sql)
    --Generate data in the dummy file
    set @sql='exec master..xp_cmdshell ''bcp "set fmtonly off select * from XeProgst01.dbo.'+@table_name+'" queryout "'+@data_file+'" -c -t, -T -S'''
    exec(@sql)
    --Copy dummy file to passed EXCEL file
    set @sql= 'exec master..xp_cmdshell ''type '+@data_file+' >> '+@file_name+''''
    exec(@sql)
    --Delete dummy file 
    set @sql= 'exec master..xp_cmdshell ''del '+@data_file+''''
    exec(@sql)
    GO

  • TS3276 The Finder doesn't find ~/Library/Mail, or even "library". I need to do some experimenting to get my mail back and want to back up but can't even find a file with my messages in it.

    Trying to save my email prior to a wave of experimentation to get email working again but finder doesn't find "library". Has the library been omitted from Mountain Lion?

    Go to your Finder "Go" menu hold the option key to choose "Library".
    After that you can drag it to your sidebar for easy access.

Maybe you are looking for

  • Text is not saved in file...WHY ?

    Hi everyone, I made a simple text editor using Swing. It has only a JTextArea as the main text processor. I have added a File menu where I can open or save files with the JFileChooser class. The code I am using to save data from the JTextArea to a te

  • MacBook Pro - VGA Problem ?

    Hey there, I own an Apple MacBook Pro 13" i5 which i bought last year. Mountain Lion is running on it and everything works just fine. Today i wanted to show a presentation to my class. I connected the very old VGA Beamer via the VGA - Thunderbolt ada

  • HT1918 I have $0.15 left in my account and I want to change to south african store but it says I must finish my balance before I change...help please.

    I have $0.15 left in my account and I want to change to south african store but it says I must finish my balance before I change...help please.

  • Message mapping Segments concatenations at same level

    There are n number of segments repeating at the same level. We need to concatenate the all these fields and map it to the target field description.Right now only one segment text is displaying in the description field at target .

  • One file with different contents

    Hi, My scenario is idoc to jms. i want get a flat file from jms but header data it should be xml format and remaining part be fixed length format example of flat file TID96668718