Which functiuon module we have to use  to send mail afetr finishing the job

hi gurus
can anyone suggest me
how to send a mail after finishing the job
which function module we have to use
in reports
in scripts
in smartforms
in bdc

Hi Kalyan
check this simple code to understand the logic:
Convert spool to HTML and Email it.
data: list type table of  abaplist with header line.
data: htmllines type table of w3html with header line.
data: maildata   like sodocchgi1.
data: mailtxt    like solisti1 occurs 10 with header line.
data: mailrec    like somlrec90 occurs 0  with header line.
start-of-selection.
* Produce a list
  do 100 times.
    write:/ sy-index, at 30 sy-index, at 50 sy-index.
  enddo.
* Save the list
  call function 'SAVE_LIST'
       tables
            listobject         = list
       exceptions
            list_index_invalid = 1
            others             = 2.
* Convert the list
  call function 'WWW_LIST_TO_HTML'
       tables
            html = htmllines.
* Send mail
  maildata-obj_name = 'TEST'.
  maildata-obj_descr = 'Test Subject'.
  loop at htmllines.
    mailtxt = htmllines.
    append mailtxt.
  endloop.
  mailrec-receiver = '[email protected]'.
  mailrec-rec_type  = 'U'.
  append mailrec.
  call function 'SO_NEW_DOCUMENT_SEND_API1'
       exporting
            document_data              = maildata
            document_type              = 'HTM'
            put_in_outbox              = '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.
  if sy-subrc  0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.

Similar Messages

  • Which planning function i have to use and how to write this planning fucnti

    Hi Bi Guru's,
    I have rolled out  BW SEM-BPS Planning Layout's for the Annual Budget in my organistaion.
    There are two levels of layout given for the each sales person.
    1)  Sales quantity to be entered Material and  country wise for all 12 months ( April 2009 to March 2010)
    2)  Rate per unit and to entered in second sheet, Material and country wise for the total qty entered in the first layout.
    Now i need to calculate the sales vlaue for each period and for the each material.
    Which planning function i have to use and how to write this planning fucntion.
    Please suggest me some solution ASAP.
    Thanks in Advance,
    Nilesh

    Hi Deepti,
    Sorry to trouble you...
    I require your help for the following scenario for caluclating Sales Value.
    I have Plan data in the following format.
    Country   Material    Customer    Currency    Fiscyear    Fiscper           Qty         Rate        Sales Value
    AZ          M0001      CU001          #             2009          001.2009        100.00                        
    AZ          M0001      CU002          #             2009          001.2009        200.00                        
    BZ          M0001      CU003          #             2009          001.2009        300.00
    BZ          M0001      CU003          #             2009          002.2009        400.00
    BZ          M0002      CU003          #             2009          002.2009        300.00
    AZ          M0001       #               USD          2009             #                                 10.00
    BZ          M0001       #               USD          2009             #                                 15.50
    BZ          M0002       #               USD          2009             #                                 20.00
    In the Above data the Rate lines are entered in the Second Layout, Where the user enters on the Country Material Level with 2009 value for FISCYEAR.
    I am facing problem with this type of data. 
    I want to store the sales value for each Material Qty.
    Please suggest some solution.
    Re
    Nilesh

  • Hi when i am giving credit card number in payment gatway it should change to password dots , how it is possible, which plug in i have to use

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/891259]]</blockquote>
    Hi when i am giving credit card number in payment gatway it should change to password dots , how it is possible, which plug in i have to use for this feature...

    Hi vishwanath123-
    Most websites when asking for your credit card do encrypt your password, but it is not based on a plugin. The website is responsible for securely receiving and storing your data. If you do not trust the website is secure, be careful with your data.

  • I have a footage recorded in p2 dvc pro 25, which sequence preset i have to use in premiere cs 6 dv

    I have a footage recorded in p2 dvc pro 25, which sequence preset i have to use in premiere cs 6 dv pal 25 or dvc pro 50?

    For CS5 and later, the easy way to insure that your video and your project match
    See 2nd post for picture of NEW ITEM process http://forums.adobe.com/message/3776153
    -and a FAQ on sequence setting http://forums.adobe.com/message/3804341
    Also, The tutorial list in message #3 http://forums.adobe.com/message/2276578 may help

  • Which data types I have to use.

    hi all,
    I was using DEC '9' for a variable.
    ie., tunni type DEC of length 9. For smaller values like 000000488225584 is ok.
    But for larger values like 000001048988458000000513871057 is going to dump.
    Please suggest me which data type I have to use.
    It should not be effect the performance.
    Thanks in advance.

    Hi,
    Try use numerical character (TYPE N).
    Regards,
    Charles

  • In my ipad email address which I am using for sending mail is appearing differently in the receipents mail box ! how to resolve that

    in my ipad email address which I am using for sending mail is appearing differently in the receipents mail box ! how to resolve that

    while sending a email in my ipad it is showing the correct email address([email protected]) in the ""from"" field but in receipients inbox ""from"" field it is showing another email id ([email protected])

  • [svn:fx-trunk] 11080: To cover cases where there are filters in the ancestry chain, we have to use our MatrixUtils sledgehammer to acquire the correct concatenated matrix .

    Revision: 11080
    Author:   [email protected]
    Date:     2009-10-22 06:37:39 -0700 (Thu, 22 Oct 2009)
    Log Message:
    To cover cases where there are filters in the ancestry chain, we have to use our MatrixUtils sledgehammer to acquire the correct concatenated matrix.
    QE notes: None
    Doc notes: None
    Bugs: SDK-23155
    Reviewer: Chet
    Tests run: Checkin
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23155
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as

    FYI - This regression has been filed here: http://bugs.adobe.com/jira/browse/SDK-31989

  • What if i have a used macbook air and it has the password of the old person to logout?

    what if i have a used macbook air and it has the password of the old person to logout?

    You need to completely repartition the drive and install a suitable version of OS X that you own. What is the exact year and model of this MBA you have? Did it come with installer discs? If it's a 2010 or later model you can accomplish this using Internet Recover: About OS X Recovery.
    Install Mavericks, Lion/Mountain Lion Using Internet Recovery
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    Boot to the Internet Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND-OPTION- R keys until a globe appears on the screen. Wait patiently - 15-20 minutes - until the Recovery main menu appears.
    Partition and Format the hard drive:
    Select Disk Utility from the main menu and click on the Continue button.
    After DU loads select your newly installed hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed. Quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion. Mavericks: Select Reinstall Lion/Mountain Lion, Mavericks and click on the Install button. Be sure to select the correct drive to use if you have more than one.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    This should restore the version of OS X originally pre-installed on the computer.

  • Which Mobile Networks Operator could be used to send SMS through SKYPE in China?

    Which Mobile Networks Operator could be used to send SMS through SKYPE in China?

    I actually found a workable solution, based off of your suggestion.
    Sprint has partnered with Google to integrate native Google Voice onto the iPhone, using your existing Sprint phone number, for free. The only downside is, you loose visual voicemail. But, you can set Google Voice to transcribe my voicemails and send them via email, which I hear can be quite funny when it gets it wrong.
    But, not being a fan of Google's "all or nothing" approach, where they take over all your sms, voicemail, and calls, I opted to set up a free account and use Google Hangouts app to make outgoing calls. Using it this way, with out applying for a Google Voice number, or switching  my Sprint number over to Google, the caller ID just says "No Caller ID", which is ideal, since having an additional phone number pop up, might lead to confusion as to which one to use to contact me.
    So, thanks for pointing me  in  the right direction.  It's not perfect, as I imagine many friends will kick me over to voicemail when the see "no caller ID" pop up on  their phones, but it'll get the job done.
    Problem solved.

  • At work we have many who travel with train alot, where the internet is very unstable at best. And  they have trouble getting their e-mails. So the question is if there is a way to increase the mail cache in iOS 7, to lower the dependence of internet.

    At work we have many who travel with train alot, where the internet is very unstable at best. And  they have trouble getting their e-mails.
    So the question is if there is a way to increase the mail cache in iOS 7, to lower the dependency of a very poor internet connection.

    I don't think so. Unless it's in the settings, there's not much that can be done.
    are they using wifi on the train? If so, maybe switching to cellular. There are devices like the Mifi, which is a battery operated portable wifi hotspot that they can connect their device to.
    If the wifi on the train is solid, I know I've had issues using certain hotspots. For example, my yahoo mail simply will not pull down via the mail app if I'm on some AT&T hot spots. But if I go in via safari then it works. So if the signal is good, maybe using a different way can help.
    Or maybe looking for a mail interface that isn't apple's. There are others in the app store that may have better function or more control.

  • Using ODI send mail tool in procedure

    Hi,
    I want to use an ODI send mail option in procedure when certain condition is met.
    for example:
    I have one table "Dummy_table" as
    Dummy_table
    PRODUCTID
    PRODTYPE
    PRODCODE
    11111
    A
    11111
    22222
    A
    22222
    33333
    B
    33333
    00000
    A
    00000
    And a procedure which is trying to insert records in above table. In this procedure i want to add validation and when the validation is true, need to send mail.
    Mail to be triggered:
    If PRODUCTID already exists in table then do not insert record with same PRODUCTID in table. Instead of that, call an ODI send mail tool from the procedure which is trying to insert duplicate entry.
    Let's say my procedure is trying to insert record with PRODUCTID = "22222" . In this case, i dont want an entry to be inserted as it is already present. I want a mail to be triggered saying that this record is already present.
    Any help would be highly appreciated.
    Thanks in advance.
    Shilpa

    Sure, please follow the steps:
    1) First import one CKM to your project. If you are working with Oracle then you could use "CKM Oracle";
    2) Open your Interface and go to "Controls" tab and select your "CKM Oracle" in CKM Selector combo box. Pay attention to the CKM options and change them accordingly to your needs;
    3) Go to "Models" tab and search for your "Dummy_table" model;
    4) Expand "Dummy_table" model and right click "Constraints" -> New Condition
    5) Give it a name, select Type = "Oracle Data Integrator Condition" and then write down a SQL that will indicate which are the valid values that should be loaded to your target table. In your example, it should be something like this (DUM being the model table alias):
    DUM.PRODUCTID NOT IN (SELECT T1.PRODUCTID FROM Dummy_table T1)
    This query is telling ODI that only the rows with PRODUCTID that does not exists in the target table are valid. All the rest (in this case all rows that already exists in the target table) should be logged in E$ table.
    Please let me know if it worked.
    Thanks.

  • Alias address from iCloud alias address cannot be used to send mails via iPad

    Alias address from iCloud alias address cannot be used to send mails via iPad

    If you still have this concern: You can only use the alias address linked to the main iCloud account that you backup your iPad to. You can check that going to Setting-iCloud and check the Account email address.
    I think this restriction is rather rediculous. I don't see why we can't configure an alias from a different iCloud account the same way we do for a Gmail account. I hope Apple fixes this in iOS 6.

  • I want to upgrade(iOS 8.1.1) iphone 4S. A code is asked. I entered my sim code... wrong. Which code do I have to use?

    I have an iphone 4S... and not enough space to make the upgrades.
    Getting started, using iTunes. My iphone asked my code. I gave in the sim code.. wrong. First wrong code... so I don't try anymore, because I'm afraid my iphone will not work anymore if I give 3 wrong codes...
    Can anybody tell me which code I have to use?

    hito1956 wrote:
    I have an iphone 4S... and not enough space to make the upgrades.
    Getting started, using iTunes. My iphone asked my code.
    What is the exact message you are getting when it asks for a code?

  • Which function module or class is used to import UNICODE files

    Hello all,
    Does anyone know which function module or global class is used to import files when the UNICODE check for the FILE port is ON?
    Thanks
    Ed Baker

    Hi,
    According to your requirement, you can prepare report through S_PH0_48000513 - Ad Hoc Query , you can get percentage from IT0007 in Ad Hoc query. first decide how many fields you want and then choose in selection criteria and generate the report.
    Thanks,
    Nirali P.

  • Which authorization object we have to use for direct cube request ?

    Hello,
    In Analyser,  when we would like to request directly to Cubes, whe have 'No authorisation' message.
    Do you know wich authorisation objet we have to use for that ?
    Thanks in advance for you help.
    Best regards
    Nicolas Trinquand

    Hi Nocolas,
    Authorizations are two levels one is object level means if you want to access cubes, infoareas etc.
    second is data level, for this you need to create datalevel auth objects at RSSM.
    If you want to give authorization to queries relating to cube
    Use S_RS_COMP and give which cube you want.
    If you want to give authorizations to cube use
    S_RS_ICUBE .
    IF you have anyauthorization object ( Customized) data level select the infoprovider on which you want to activate this object at RSSM.then give permissions in your role.
    Check link
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6859e07211d2acb80000e829fbfe/content.htm
    Hope it is clear now.
    Assign points if you felt it is useful.
    Regards,
    Vijay.
    Message was edited by:
            Vijay G

Maybe you are looking for

  • How do you add calculation columns to a table Region by using the Footer?

    I have a requirement to add some aggregate metrics at the bottom of my "tableRegion". The "TotalValue" property value for the table is not going to work for me since I the data I'm calculating is more complicated then doing a simple "sum". My first t

  • Restore Oracle VM Manager 3.0.1 problem

    Hi, I backed up the OVM 3.0.1 in ovsbackup.dmp file with exp command like written in documentation. Then I installed OVM 3.0.1 on new machine, and tried to import .dmp file using imp command also from documentation. Import terminated successfully wit

  • Receiver determination for ALEAUD??

    Hi,     I have configured my ALEAUD for a (B2B partner) R3 -> PI (B2b) - > PI (local) - >  R3 (local) scenario... I have requested the partner PI system to map their systems to my business systems in their Receiver determination step - header mapping

  • Generating dynamic search query for search formular

    Hallo guys, a theoretical question I have there for you. I have a search form in HTML with several input fields, so the user can search for particular features in a db. My queiston: How can I generate a dynamic query, depending on which fields the us

  • 10g JSpell PJC does not work with latest JSpell version

    Looks like latest (10g) forms demo - Spell check with JSpell does not work with the latest version of the JSpell software (does not look like this demo been changed from the previous version). Does anybody has a success running this or have any sugge