Retreive mail id's from sap programs

Hi,
i am trying to get the list of mail id's used in abap programs(all kind of programs).
is anyone done before like this? 
if so, share some info of tables to look into and if got the code of it please pass to me.
haha only if conditions not else though

hi,
simple write this code.
u will get the email address and user name.
data: begin of itab_email occurs 0,
      bname like usr01-bname,
      email like adr6-smtp_addr,
      end of itab_email.
  select Single adr6~smtp_addr usr21~bname into table itab_email  from usr21
              inner join adr6
                 on  usr21~addrnumber = adr6~addrnumber
                and usr21~persnumber = adr6~persnumber
  loop at itab_email.
    write:/ itab_email-bname,
     itab_email-email
  endloop.
regards
Anver

Similar Messages

  • BASIS Configuration needed to send an external mail from SAP Program

    Can you please help me about the BASIS configuration needed to send an external mail from SAP Program?
    Regards,
    Subhasish

    Hi Subhasish,
    Please go thru the below link.
    Re: SCOT Configuration--for external mail
    Regards,
    Lakshman.

  • Need to start a program in Oracle System (External) from sap program

    Hi guys,
         I need to start a program in another oracle based system from sap program by writing native sql statements.
    Does anyone have idea how to do this.
    Rgds,
    Ram

    Hi,
    Here is another sample for procedures.Kindly reward points by clicking the star on the left of reply,if it is useful.
    Code Sample for writing a procedure with input and output parameters
    REPORT zzz_jaytest.
    * Getting the regno and total as input parameters
    PARAMETERS : p_regno(10) TYPE c DEFAULT 'R1000',
                               p_total     TYPE i.
    data : v_total type i.
    * In this procedure, we are updating the total of a regno given as input.
    * Here two parameters used in the procedure are input parameters.
    * We are updating the record of regno entered in selection screen and
    * adding the total entered to the already existing total. We have to give semicolon
    * for the statement inside procedure.
    exec sql.
    CREATE or replace PROCEDURE PROC1 ( p_regno in char, p_total in number )
    IS
        BEGIN
          UPDATE stu_det SET total = total + p_total where regno = p_regno;
        END;
    endexec.
    * This is the code to execute the procedure for update.
    * While executing the procedure, the parameter variable should be
    * preceded with colon  :
    EXEC SQL.
      EXECUTE PROCEDURE PROC1 ( in :p_regno, in :p_total )
    ENDEXEC.
    * In this procedure, we are selecting the details for the regno entered
    * as input. Here p_regno is input parameter and v_total is used as output
    * parameter. So that we can use the retrieved value of v_total in our
    * ABAP program
    exec sql.
    CREATE or replace PROCEDURE PROC2 (p_regno in char, v_total out char)
    IS
        BEGIN
          select total into v_total from stu_det
                             where regno = p_regno;
        END;
    endexec.
    * This is the code to execute second procedure.
    EXEC SQL.
      EXECUTE PROCEDURE PROC2 ( in :p_regno, out :v_total )
    ENDEXEC.
    write : / 'Total of ', p_regno, ' is ', v_total.

  • Unable to send mails to outlook from sap system through workflow

    Hi ,
    Iam unable to send mails to outlook from sap system through work flow .Actually we r able to send mails from sap inbox to outlook successfully.But when trying with workflow we r not able to send.Please guide me that is  there any configurations required from BASIS side for work flow.Actually we configured everything like default domain .
    Please find the errors belows that  traced from sost t code
    02/13/2012     17:50:12     0380 MIME_MESSAGE_GENERATE     G     Error when generating MIME flow
    02/13/2012     17:50:12     0382 MIME_MESSAGE_GENERATE     G     Required 'From' header is initial
    02/13/2012     17:50:12     0167 SO_OBJECT_MIME_GET     G     Error during MIME Generation
    02/13/2012     17:50:12     0777 UPDATE_SOSC     G     Cannot process message in SAP System
    Regards
    RAGHAVENADAR

    Hello,
    Actually i checked the mail ID for WF-BATCH  using su01 .But i didnt find any mail ID for WF-BATCH then i added the email address of the user.Then we tried sending mail it was successfull.
    But later i removed the email address what i entered in WF-BATCH user .Even after removing the email address also iam able to send the mails through workflow.
    So iam confused whether it needs an mail address or not.But now we are able to send a mail to outlook through work flow but not able to send mails to GMAILor yahoo.For that we need to do any settings.
    ABAPer is sending mails through work flow.
    Regards
    RAGHAVENDAR M

  • Calling Non SAP programe from SAP program

    Hi Experts...
    Can we cal Non SAP programs Like Windows EXE programs from ABAP programs ?
    If yes Then How .....
    Regards ...
    ..Ashish

    Hi Ashish ,
    Ya we can call a non SAP program from SAP program.
    For example we can call a EXE program from the SAP program using the RFC connection created in SM59.
    In Sm 59 you can create a TCP/IP connection and give the path of the executable there.

  • How to produce beep sound from sap program?

    Hello all,
    Can anybody help me to produce beep sound from sap program.
    I dont want to play a WAV file.
    I just want to produce a BEEP sound.
    Your help is highly appreciated.
    Thanks n Regards
    chandu

    Hi
    Thanks for the quick response.
    I tried the code in ur reply.
    Its not producing any beep sound.
    type-pools: ole2.
    data: return type i,
    sapinfo type ole2_object.
    data: begin of command,
    command(12) type c value 'cmd /c echo ',
    hex07(1) type x value '07',
    end of command.
    create object sapinfo 'SAPINFO' no flush.
    call method of sapinfo 'EXEC' = return
    exporting
    #1 = command
    #2 = 0.
    free sapinfo.
    Is there anyother way??
    Thanks

  • Work flow mails not processing from SAP Outbox to Approvers

    Hello,
    We are working on the implementation of Work flow for Purchase orders.
    Work flow customization is completed and even work flow is triggering when ever I create Purchase Order.
    Even Agent assignment also completed for work flow tasks via T code PTFC_CHG.
    Problem here is Work flow mails are not processing out of SAP Outbox to approvers even also after executing the program RSWUWFML2.
    If I check in SOST,I will not see any of the entries related to work flow mails.
    For eg:If I creates a Purchase order it will trigger Release Strategy and I can see the message to Approvers,like "Please Approver PO..."
    Only above I can see in my SAP Outbox.
    So how can I Process these messages to approvers SAP Inbox.
    Any Pre Setting I have to do?
    With regards,
    SPK

    Hi SP,
    I may be wrong, but on reading ur thread, I feel u r mis interpreting SAP Outbox with Outlook.
    Is it so, because u have mentioned about RSWUWFML2 and SOST, which comes into picture only if u r using an external mail like Outlook.
    If its Outlook, then there is no doubt that ur work item would get deleted from SAP Inbox and would be present only in Outlook.
    If its SAP Outbox, then u r not supposed to get ur work item in ur Outbox unless it is processed or executed thru ur SAP Inbox.
    Hope it helps.
    Aditya
    Edited by: Aditya Varrier on May 23, 2008 1:52 PM

  • No mail is sent from SAP Workflow

    Hi
    We are sending mail from SAP Workflow to Lotus notes email. We have made the correct configuration in su01d for users whom we are sending by mentioning email address and communication method as email. We have also checked that program RSCONN01 is running periodically. We checked the SCOT transaction and no entries has been registered from SAP Workflow. we have defined SMTP node as required but still nothing happens.
    I have also tried to send mail from SBWP but no entries is registered. Can you tell me what is the problem. I think it might be the issue between linkage between SAP and mail server. Can anyone tell me what needs to be checked here. I have done config for SICF Tcode also.
    Thanks
    Arghadip

    > I have also tried to send mail from SBWP but no entries is registered.
    Are you still not able to send mail from SBWP? You need to fix this problem first, then you can start worrying about the workflow mail-sending capability.The user which sends e-mail needs to have an e-mail address defined in the user record.
    Try defining an e-mail address for your own user and send an e-mail from SBWP. This should show up in SCOT, either as waiting in the queue, or (if you have bad luck with your timing) as sent e-mail. If the e-mail doesn't even show up in SCOT, ask Basis to help you figure out what is wrong.

  • Sending mail to OUTLOOK from SAP when error encountered in MM creation

    Hi ,
    I am able to send a message to SAP inbox which i can view from SBWP. But as well i need to send mail to the OUTLOOK  .How can i send this OUTLOOK .
    I have configured the mail id in SCOT.
    Even i configured in SCOT with BASIS team i m not able to send mail to outlook.I even checked in SOST their is no entry in that .
    Is their a need for writing separate logic for sending mail to OUTLOOK as well?
    Regards,
    Ranjith ,
    +91-8431858286.

    HI  Modak,
    Please help me in getting out of this error encountered during a sample workflow thing.
    Here is the requirement I need to send a OUTLOOK mail from SAP.If the user accepts the workflow task then mail  need to send a recipient ,stating that he accepthed the request.
    Below I designed  that task.
    In send Mail step I added the recipent thing as stated below.But I was unable to send mail to OUTLOOK .In this I am not even  getting notification in my SBWP  in SAP INBOX.

  • PO mail to vendor from sap

    Hi all,
    I did all setting as per the note provided in sap - 191470
    When using external mail, the following basic settings are required:
    1. You must maintain an e-mail address in the address in the vendor
    master.
    2. The same applies to your own user master. You also have to specify an
    e-mail address there in order to identify the sender.
    o Note that it is not possible to change the e-mail address of the
    vendor via the SAP purchase order transaction (ME21N, ME22N, and so
    on).
    o You can only make a permanent change using the vendor master
    transactions XK02 or MK02.
    o You can use a temporary email address in Transaction ME21N.
    3. For the output type for default values, a communication strategy needs
    to be maintained in the Customizing that supports the e-mail. You can
    find the definition of the communication strategy in the Customizing
    via the following path: (SPRO -> IMG -> SAP Web Application Server ->
    Basic Services -> Message Control -> Define Communication Strategy).
    As a default, communication strategy CS01 is delivered. This alreadycontains the necessary entry for the external
    communication. Bear in
    mind that without a suitable communication strategy it is not possible
    to communicate with a partner via Medium 5 (external sending).
    4. Use the standard SAP environment (program 'SAPFM06P', FORM routine
    'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
    5. In the condition records for the output type (for example, Transaction
    MN04), use medium '5' (External send).
    6. You can use Transaction SCOT to trigger the output manually. The
    prerequisite for a correct sending is that the node is set correctly.
    This is not described here, but it must have already been carried out.
    7. To be able to display, for example, the e-mail in Outlook, enter PDF
    as the format in the node.
    But at the time of po saving mail is not getting trigger to vendor,
    your suggestion/ guidance is required.

    hi
    chek xk02 here u hae given the email address properly and the STD COMMUNICATION method as EMAIL
    then check user master in su01
    u have to maintain proper email address  and communication method
    http://www.sap-basis-abap.com/mm/sending-po-by-mail-to-vendor.htm
    regards
    kunal

  • Mail to vendor from sap

    Dear Friends,
    I would like to know , how the Mail functionalty in sap for a client.
    I determine Output type (mail ) and maintain Cdn records .
    But how it works and what NEXT ?

    Hi,
    Please approach any of the ABAPer from your team he will manage this.
    If you know some of the settings from SOST T code you can do this also.
    For your reference please see the below link useful for me and might be for you also.
    http://wiki.sdn.sap.com/wiki/display/ABAP/SendMessagetoExternalemailidandSAPUseridvia+ABAP
    Regards,
    Ninad Kshirsagar

  • E-mail a report from SAP

    Hai Friends,
    The following is my selection screen.
    Sales Office: (Parameters)
    Month/Year: (Parameters)
    Customer: (Select Options)
    All the fields are mandatory. i enter the Sales Office as '5001' and Month/Year as '03/2009' and Customer as 100640 to 100650 and execute and send it to spool request. the report will be skipped for each customer in the smartforms and we used to take the prints.
    Now my requirement is i have to execute the report and the report for each Customer should be sent to his e-mail inbox. we use Lotus mail and we have integrated Lotus and SAP. (i.e.) the report of customer 100640 should go to his e-mail and so on..........
    how can i do this?. each of our dealer is having the e-mail id.

    Hi,
    Check this link..https://wiki.sdn.sap.com/wiki/display/ABAP/SmartformSendvia+Email
    [ Any sample ABAP code to send Lotus Notes email to a list of people?|Any sample ABAP code to send Lotus Notes email to a list of people?]

  • Can Mail integrate accounts from previous program with Mail's accounts?

    I had several accounts in Thunderbird & when they were imported into Mail, they were all put into an Imported folder. Is there any way to integrate the old accounts with the new accounts created by Mail so that I don’t have recreate the subfolders for each account?
    Also, if I look at Sent mail for the imported accounts, it shows who they were from (me) but not who they were written to. Is there any way to change the settings so that there’s a column which shows who the email was sent to?
    TIA,
    Elllen

    I haven't seen a way to do that on my MBP, iMac or iDevices...it seems to be all or nothing with Mail.
    There are times it would certainly be nice to not have all loading down the InBox.

  • Send External mail with Attchment from SAP

    Hi All,
    OUR REQUIREMENT: We need to send EXTERNAL MAIL with ATTACHMENT(Excel) form SAP .
    We have developed a function module which converts the internal table data into Excel Format and sends it as an attachment to External Mail.
    ISSUE : But our issue is we are unable to open that document using GOOGLE DOCS Could any one help me how to do this.
    it was thriughing error like
    Error log is .
    ''Sorry, we are unable to generate a view of the document at this time. Please try again later.
    You can also try to download the original document by clicking here. Alternatively, you can view the plain HTML (automatically redirecting).
    Regards
    Venkat .
    Edited by: venkata pradeep on Mar 5, 2012 10:26 AM
    Edited by: venkata pradeep on Mar 5, 2012 10:28 AM

    Is the excel file recognized by MS Excel? If not, then issue is you have wrongly converted your attachment and/or your FM to create an excel file was wrongly coded or you have passed it wrongly to your mail code.
    If you consider an OOP approach in sending external mail, refer to this link:
    http://wiki.sdn.sap.com/wiki/display/Snippets/SendingmailwithattachmentusingObjectOriented+Approach

  • Collect Error Message from SAP program to BSP Page

    Hi Experts,
    I am displaying an error message in the form of pop-up Message  in a Screen based on a condition using BADI on R/3 screen , but when i am calling the screen from Portal (BSP PAge) I am unable to see the Error Message which is being displayed as a pop-up in r/3..
    How to catch the error and display in BSP Page.....
    I have searched the forum but didnt find any suitable replies....
    Plz help
    Regards,
    Srikar

    Hi Srikar,
    It depends.
    Generally though you display a message in SAPGUI it does not display automatically in BSP.
    Some times you have to manually write some code to populate and display a message in BSP.
    First you need to find the BSP page and write some code to display error messages in the same..
    Regards,
    Sreekanth

Maybe you are looking for