Reg Creating Document with predefined content and it should be send by mail

Hello Friends,
I created one report containg Customer Realted Info.
Requirement:
now when user click or select one customer no then that time one document will be generated with predifined format having that selected customer no and address
and that document will be sent by mail to 4 persons. ( like automailers ).
so plz tell how to create that document with predefined letter content and how can i send that document via mail ????
Thanks in advance.
Marmik

Hi
<b>Here is custom sample code for E-mail purpose</b>
*& Report  ZSEND
report zsend .
tables: kna1.
data for send function
data doc_data  like sodocchgi1.
data object_id like soodk.
data objcont   like soli occurs 10 with header line.
data receiver  like somlreci1 occurs 1 with header line.
select * from kna1 where anred like 'C%'.
  write:/ kna1-kunnr, kna1-anred.
send data internal table
  concatenate kna1-kunnr kna1-anred
                         into objcont-line separated by space.
  append objcont.
endselect.
insert receiver (sap name)
  refresh receiver.
  clear receiver.
  move: sy-uname to  receiver-receiver,
        'X'      to receiver-express,
        'B'      to receiver-rec_type.
  append receiver.
insert mail description
  write 'Sending a mail through abap'
                 to doc_data-obj_descr.
call function 'SO_NEW_DOCUMENT_SEND_API1'
     exporting
          document_data              = doc_data
     importing
          new_object_id              = object_id
     tables
          object_content             = objcont
          receivers                  = receiver
     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.
Hope this will help.
Please rewards suitable points.
Regards
- Atul

Similar Messages

  • How can I exchange my pc created documents on Excel, Word, and PowerPoint with my mac and my Pages, Numbers and Keynote created content with my pc?  I need to create and edit between both.

    How can I exchange my pc created documents on Excel, Word, and PowerPoint with my mac and my Pages, Numbers and Keynote created content with my pc?  I need to create and edit and exchange between both types of operating systems.

    Your Windows system will not open any Pages, Numbers or Keynote documents. No applications exist for Windows that can open those formats. You will need to export your documents in Word, Excel and PowerPoint formats, respectively, before you'll be able to view and edit the documents on your Windows system. The iWork documents can natively open Word, Excel and PP documents, though there are limitations on what can be imported (for instance, Numbers does not support all possible Excel functions). Consult the documentation for the relevant iWork application for details on importing and exporting.
    If you are asking how to get the documents from one system to the other, then there are several ways to do that, including file sharing, using an external drive (hard drive, USB flash drive), or emailing the documents to yourself. Which would be best for your situation I can't say without more details about your usage.
    Regarsd.

  • My iWork (pages and keynote) are not communicating with the iCloud. I haven't changed anything and all of the sudden there is no sync happening.  My iCloud account is fine as i can create documents on my iPad and they appear on iCloud.

    my iWork (pages and keynote) are not communicating with the iCloud. I haven't changed anything and all of the sudden there is no sync happening.  My iCloud account is fine as i can create documents on my iPad and they appear on iCloud. However, when i change documents on my mac (documents that are supposed to be in the iCloud), the changes do not sync with my other devices nor with iCloud.  Even when i create new documents on my mac and save them to iCloud, all seems okay and i can access them from my mac, however they do not show up in the iCloud and i can't access them with my other devices.
    Most recent version of mountain lion updated over a month ago.  New iPad in use for over a month.
    thanks

    The same thing is happening to me, Mail was fine about an hour ago and now is rejecting correct password.  Typical when today I'm waiting some important emails!

  • OCR with WebCenter Content and Imaging

    Hi,
    I'm searching for some information about OCR with webcenter content and imaging.
    I've seen that there are two solutions :
    - WebCenter Capture
    - Webcenter Forms Recognition
    But I can't find if any of that product use lexical post-correction of OCR results. Is anyone have this information?
    Thanks,
    David

    David:
    Both products will use print (vs handwritten) character recognition to identify "tokens" from the image of a document with text. Capture usage focuses mainly on zonal recognition of information - what I would call structured forms processing. Forms Recognition is for information capture from semi-structured documents - say invoices, where you know that many fields are present, but their location differs from example to example. It can use patterns, text locators, etc to find the field. Both benenfit when there exists a reference DB of acceptable values, but that is not a requirement.
    Lexical correction (as I understand it to mean) is not a feature of either. They are not going to try to validate extracted tokens based upon language analysis. I would try to use them to extract all of the tokens and then add some tool to do lexical analysis. You could do that as a separate, post OCR process, or try to see if you can fit it into an FR post-extraction EP.
    Might I ask what the business problem you are trying to solve is?
    Bernard

  • Create Documents with any Currency

    Hi,
    it´s possible create documents with SDK objects in any currency?
    I need create a invoice in Local Currency or System Currency depending the source.

    Hi Victor,
    Yes, you can create marketing documents through the DI API and set any currency code (...well, any currency code that already exists in the company setup). The Documents object has a DocCurrency and DocRate property for defining the currency.
    Kind Regards,
    Owen

  • I can create documents in Mavericks Pages and Keynote. When I attach them to an email and send to others also using Mavericks, they can't open the attachments. Why might this be?

    I can create documents in Mavericks Pages and Keynote. When I attach them to an email and send to others also using Mavericks, they can't open the attachments. Why might this be?

    The new Pages v5 (Mavericks) uses a new file format with the same extension name (.pages). Older versions of Pages cannot open these documents unless you first export them as Word (.docx) and send these as Mail attachments. The same is true if you originate an IOS Pages v2.01 .pages document.
    You may be sending to people who chose not to install Pages v5 on Mavericks and continue to use Pages ’09 v4.3 instead — especially for the superset of features that are presently not in Pages v5.

  • HT4859 I have an iPhone 5 and have just set up the iCloud for it. I also have an iPad with different content and I also want to connect it to iCloud. Will I lose everything that's on my iPad or iPhone or do they sync together without losing anything?

    I have an iPhone 5 and have just set up the iCloud for it. I also have an iPad with different content and I also want to connect it to iCloud. Will I lose everything that's on my iPad or iPhone or do they sync together without losing anything?

    The problem is that all services are bundled with your Apple ID ([email protected]):
    Your iCloud account (Mail, Contacts, Calendars, Reminders, Notes, Backups, etc.),
    also iTunes & App Store purchases (Music, Movies, TV Shows, etc.),
    and the iTunes Match services.
    (I guess that all your devices - yours and your wife's are connected to one iTunes library, right?)
    If you want that your wife gets her own iCloud account for Mail, Contacts, Calendars, etc. but gets also access to your media then you have two set up two things on her device:
    iCloud (Settings > iCloud) with her account (e.g. [email protected])
    and
    iTunes & App Stores (Settings > iTunes & App Stores) with your account (e.g. [email protected]).
    In this case she gets access to your library and could use the same iTunes Match account.
    (See also: Using one Apple ID for iCloud and a different Apple ID for Store Purchases http://support.apple.com/kb/HT4895)

  • To show document with  Extension  *.docx   and    *.xlsx  loaded on AS

    I have Up loaded a document with extension .XLSX and .DOCX on Application Server using webutil_file_transfer.client_ to_ AS_with_progress .
    The Problem : Unable To Viiew the document using SHOW_DOCUMENT.
    What changes to be made in Source code to view these documents.
    Note :The form is loaded on WEB designed on Oracle Developer Suit (Backend : Oracle 10g)

    metalink note 564492.1 fixes this

  • How do I import an old home movie on DVD into iMovie with video_ts content and .vob files

    Hi, as a new mac user I would appreciate any help to use imovie to import an old home movie on DVD with movie_ts content and .vob

    You need to convert the VOB files in the TS-Folder of the DVD back to DV which iMovie is designed to handle. For that you need mpegStreamclip:
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html
    which is free, but you must also have the  Apple mpeg2 plugin :
    http://store.apple.com/us/product/D2187Z/A/quicktime-mpeg-2-playback-component-f or-mac-os-x
    (unless you are running Lion in which case see below))
    which is a mere $20.
    Another possibility is to use DVDxDV:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.overview.htm
    which costs $25.
    For the benefit of others who may read this thread:
    Obviously the foregoing only applies to DVDs you have made yourself, or other home-made DVDs that have been given to you. It will NOT work on copy-protected commercial DVDs, which in any case would be illegal.
    And from the TOU of these forums:
    Keep within the Law
    No material may be submitted that is intended to promote or commit an illegal act.
    Do not submit software or descriptions of processes that break or otherwise ‘work around’ digital rights management software or hardware. This includes conversations about ‘ripping’ DVDs or working around FairPlay software used on the iTunes Store.
    If you are running Lion or later:
    From the MPEG Streamclip homepage
    The installer of the MPEG-2 Playback Component may refuse to install the component in Lion. Apple states the component is unnecessary in Lion onwards, however MPEG Streamclip still needs it. See this:
    http://support.apple.com/kb/HT3381
    To install the component in Lion, please download MPEG Streamclip 1.9.3b7 beta above; inside the disk image you will find the Utility MPEG2 Component Lion: use it to install the MPEG-2 Playback Component in Lion. The original installer's disk image (QuickTimeMPEG2.dmg) is required.
    The current versions of MPEG Streamclip cannot take advantage of the built-in MPEG-2 functionality of Lion. For MPEG-2 files you still need to install the QuickTime MPEG-2 Playback Component, which is not preinstalled in Lion. (The same applies to Mountain Lion and Mavericks even though they have it preinstalled.) You don't have to install QuickTime 7.

  • My iphone 4 was crushed on the road.  Bought a 4 replacement tried to restore it in itunes to get my contact info and it said there was a problem with my phone and I should contact mean

    My iphone 4 was crushed on the road.  Bought a 4 replacement tried to restore it in itunes to get my contact info and it said there was a problem with my phone and I should contact apple store.  What does that mean please?

    Is the replacement exactly the same as the original ie same memory size & same version? If so it may require updating the OS software before trying to restore your stuff from the backup.

  • Creating documents with SCMS_DOC_URL_CREATE in SAP Content Server

    Hi there,
    I have a Problem here  with the Knowledge Provider concerning SCMS_DOC_URL_CREATE and hope anyone could help me out.
    For a SAP Records Management document I am calling BAPI_SRM_DOC_CREATE and get a LOIO and a PHIO ID for my new document. The PHIO-ID I pass to SCMS_DOC_URL_CREATE which then creates the URL to put the file on a SAP Content Server with a 3rd party tool. That works totally fine and I can see the file on the Content Server with its metadata,
    Unfortunately SAP Records Management doesn't recognize that a file has been uploaded. When I open the file in the transaction ORGANIZER it has no content and no components.
    Is there any function call I am missing to tell the Records Management document that I have uploaded something?
    All is working fine when I get the uploaded content into NetWeaver with SCMS_GET... and call BAPI_SRM_CHECKIN_DOCUMENT. But of course this is not what I want (transferring the file directly in the local network area where the content server stands, then getting it back to NetWeaver and back again to the content server).
    Any help would really be appreciated.
    Thank you
    Marcus

    Answer: because SCMS_DOC_URL_CREATE is not remote enabled by default.

  • Creating document with content from a remote system

    Any sample code that I have seen for creating a new document requires that the file (the content) of the document resides on the Server machine.
    What is the best way to create a document with content that comes from a remote file?

    The Java code which is trying to load a file into IFS must have access to the file to load it.
    If the file you are trying to load is in a remote location from the Java code, then you would need to use some remote access protocol, such as NFS, to ensure the file was accessible to the Java code.

  • CV01N - create document with template - path length

    Hi all,
    i want to create a document from a template document with an original file.
    A popup is displayed and i specify the new path for the new original file.
    --> Error when copying from ... <directory>
    Only 50 characters of the directory string are displayed in the message box???
    Any ideas?
    regards

    hi,
    go to trasaction dc30
    If you are using word file, then select it and click on define template for original file. Make new entry, define all things
    like  Document Type
    Applic.
    Language
    No
    Description
    Copy from...............
    this way you can maintan the template for original file.
    create new document, cleck on create original.
    once you click it, there is a button create with template.
    in dc20 ,click Define data carrier type "server, front end".
    if you are not using content server , then say default entry.
    regards
    nitin
    Award point if useful.

  • HT204394 who can i share document with loosing content

    I have document in iCloud that if i open now i will loose content, how do get that document with out loosing?  I want to share in Word format but i'm required to open in beta pages first which removes the content.  this document was created before beta pages.
    The same thing happens when i open with pages 5.1.  do have to load an older version of page on my mac?

    If you had iWork '09 on your Mac then that version of Pages.app should still be there in the /Applications/iWork folder.  You can launch it from there and export any documents to Word.

  • Error while creating document with attachment.

    Hi,
    I am getting an error "An error occured while creating the original attribute for PDF"
    I tried with out file attachment, it works as you know it is simple....
    I tried with various types of attachments like .TXT and .WRD (changed both wsapplication and docfile parameters), however i get the same error. I tried both from presentation and application server (by providing   pf_ftp_dest                = 'SAPFTPA'    pf_http_dest               = 'SAPHTTPA' )
    Any idea on how to solve this?
    All i need is create a DMS document with a PDF attachment from application server. Are there any other ways to solve this issue?
    ws_docdata-documenttype = 'ARE'.
    ws_docdata-description = 'BAPI DMS'.
    ws_docdata-statusextern = 'CR'.
    ws_file-storagecategory = 'DMS_C1_ST'.
    ws_file-wsapplication   = 'PDF'.
    ws_file-description = 'Job output'.
    ws_file-docfile = 'C:\CAD Integ BAPIS_46.pdf'.
    append ws_file to it_files.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
         documentdata               = ws_docdata
    IMPORTING
         return                     = v_ret
    TABLES
         documentfiles              = it_files   .
    BREAK-POINT.
    IF v_ret-type CA 'EA'.
      ROLLBACK WORK.
      WRITE : v_Ret-message.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = '5'.
    ENDIF.
    Thanks
    Pavan

    Hi,
    I found that it is due to document type = 'ARE'. I changed hte document type to one of hte standard type 'TST'. It works for presentation server, but does not work for application server. Any ideas? Any help is appreciated with points.
    ws_docdata-documenttype = 'TST'.
    ws_docdata-description = 'BAPI DMS'.
    ws_docdata-statusextern = 'CT'.
    ws_docdata-documentnumber = 'ZNG-10000000017'.
    ws_file-storagecategory = 'DMS_C1_ST'.
    ws_file-wsapplication   = 'PDF'.
    ws_file-description = 'Job output'.
    ws_file-docfile = p_file.
    append ws_file to it_files.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
        documentdata               = ws_docdata
       pf_ftp_dest                = 'SAPFTPA'
       pf_http_dest               = 'SAPHTTPA'
    IMPORTING
       documentnumber             = v_docnum
       documentpart               = v_docpart
       documentversion            = v_docver
       return                     = v_ret
    TABLES
       documentfiles              = it_files   .
    IF v_ret-type CA 'EA'.
      ROLLBACK WORK.
      WRITE : v_Ret-message.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = '5'.
    ENDIF.
    Thanks
    Pavan

Maybe you are looking for

  • Table for Changes done to Vendor Bank Details

    Hei ,      Please let me know the table which stores the old data when the Bank Key Or a Bank Account is changed for a particular Vendor. Thanks . Best Regards  om prakash ..

  • XI post installation check

    hi there! I'vo got a problem when performing XI installation check on the stage Checking the Connection Parameters in the Exchange Profile When opening http://<host>:<Java_port>/exchangeProfile an error has occured Application error occurred during r

  • Shuffle not appearing in itunes

    i got a 2nd gen shuffle ive had since february and its only had a couple problems where i had trouble getting songs onto it but for about the past two weeks every time i plug it into the usb it blinks a green light then orange three times, then stops

  • IDM with EP

    Hello Experts, I want to setup the Enterprise portal with IDM 7.1 (Newly) Identity Management for SAP System Landscapes  Configuration Guide -> 3.4.3 Setting up the SAP NetWeaver Portal Environment Use Case says The AS Java that is running the portal

  • Multiple Colored Links in Dreamweaver CS4??

    Hi all, I have gone through a million articles and can't find the answer I'm looking for so hopefully someone here will help me.  I have an existing style sheet for my website, I know how to change the page preferences so that all the links can have