How to check email in abap?

Hi experts,
I want to check email (xxx@ company.com,MS exchange server) in my ABAP program. If there are 3 new emails, I need to loop to read the sender/subject/body information.
Can ABAP do this?
Thanks.

Hi Michaeltrans
Please go through the following
*& Report  ZRS_WEBPAGE
*& Author : Renuka
*& Title     : HTML Viewer using Class
REPORT  zrs_webpage.
DATA :  html_control  TYPE REF TO cl_gui_html_viewer,
        web_container TYPE REF TO cl_gui_custom_container.
DATA :  t_events      TYPE TABLE OF  cntl_simple_event.
DATA :  x_events      TYPE           cntl_simple_event.
DATA :  ok_code     TYPE           sy-ucomm.
DATA :   v_code       TYPE           sy-ucomm,
        v_url(2048)  TYPE           c.
*--Event Handler Dfinition For Web page Navigation--
CLASS cl_events_handle DEFINITION.
  PUBLIC SECTION.
    METHODS navigation
            FOR EVENT navigate_complete OF cl_gui_html_viewer
            IMPORTING url.
ENDCLASS.                    "cl_events_handle DEFINITION
DATA: event_receiver TYPE REF TO cl_events_handle.
START-OF-SELECTION.
  SET SCREEN 200.
*&      Module  STATUS_0200  OUTPUT
      text
MODULE status_0200 OUTPUT.
  SET PF-STATUS 'WEBPF'.
  SET TITLEBAR 'WEBTT'.
  IF web_container IS INITIAL.
    CREATE OBJECT web_container
      EXPORTING
   parent                      =
        container_name              = 'HTML'
   style                       =
   lifetime                    = lifetime_default
   repid                       =
   dynnr                       =
   no_autodef_progid_dynnr     =
      EXCEPTIONS
        cntl_error                  = 1
        cntl_system_error           = 2
        create_error                = 3
        lifetime_error              = 4
        lifetime_dynpro_dynpro_link = 5
        OTHERS                      = 6
    CASE sy-subrc.
      WHEN 0.
      WHEN OTHERS.
        RAISE cntl_error.
    ENDCASE.
    CASE sy-subrc.
      WHEN 0.
      WHEN OTHERS.
        RAISE cntl_error.
    ENDCASE.
  ENDIF.
  IF html_control IS INITIAL.
    CREATE OBJECT html_control
      EXPORTING
   shellstyle         =
        parent             = web_container
   lifetime           = lifetime_default
   saphtmlp           =
   uiflag             =
   name               =
   saphttp            =
   query_table_disabled = ''
      EXCEPTIONS
        cntl_error         = 1
        cntl_install_error = 2
        dp_install_error   = 3
        dp_error           = 4
        OTHERS             = 5
    IF sy-subrc <> 0.
      RAISE cntl_error.
    ENDIF.
    x_events-eventid = html_control->m_id_navigate_complete.
    x_events-appl_event = 'X'.
    APPEND x_events TO t_events.
    CALL METHOD html_control->set_registered_events
      EXPORTING
        events                    = t_events
      EXCEPTIONS
        cntl_error                = 1
        cntl_system_error         = 2
        illegal_event_combination = 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.
    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->navigation
        FOR     html_control.
    PERFORM home_page.
  ENDIF.
ENDMODULE.                 " STATUS_0200  OUTPUT
      text
-->  p1        text
<--  p2        text
FORM home_page .
  DATA: doc_url(80).
  CALL METHOD html_control->load_html_document
    EXPORTING
      document_id          = 'HMPG'
   document_textpool    =
   document_url         =
   as_compressed_data   = 'X'
   language             =
    IMPORTING
      assigned_url         = doc_url
CHANGING
   merge_table          =
    EXCEPTIONS
      document_not_found   = 1
      dp_error_general     = 2
      dp_invalid_parameter = 3
      OTHERS               = 4
  doc_url = 'www.applexus.com'.
  IF sy-subrc EQ 0.
    CALL METHOD html_control->show_url
      EXPORTING
        url = doc_url.
  ENDIF.
ENDFORM.                    " HOME_PAGE
*&      Module  USER_COMMAND_0200  INPUT
      text
MODULE user_command_0200 INPUT.
  v_code = ok_code.
  CLEAR ok_code.
  CASE v_code.
    WHEN 'REFRESH'.
      CALL METHOD html_control->do_refresh.
      CALL METHOD html_control->get_current_url
        IMPORTING
          url = v_url.
    WHEN 'BKWD'.
      CALL METHOD html_control->go_back.
      CALL METHOD html_control->get_current_url
        IMPORTING
          url = v_url.
    WHEN 'BACK'.
      IF NOT html_control IS INITIAL.
        CALL METHOD html_control->free.
        FREE html_control.
      ENDIF.
      IF NOT web_container IS INITIAL.
        CALL METHOD web_container->free
          EXCEPTIONS
            OTHERS = 1.
   IF sy-subrc <> 0.
        MESSAGE E002 WITH F_RETURN.
   ENDIF.
        FREE web_container.
      ENDIF.
      LEAVE PROGRAM.
    WHEN 'NEXT'.
      CALL METHOD html_control->go_forward.
      CALL METHOD html_control->get_current_url
        IMPORTING
          url = v_url.
    WHEN 'REFRESH'.
      CALL METHOD html_control->do_refresh.
      CALL METHOD html_control->get_current_url
        IMPORTING
          url = v_url.
    WHEN 'OK'.
      IF NOT v_url IS INITIAL.
        CALL METHOD html_control->show_url
          EXPORTING
            url                  = v_url
          EXCEPTIONS
            cnht_error_parameter = 1
            OTHERS               = 2.
        IF sy-subrc GE 2.
          RAISE cntl_error.
        ENDIF.
      ENDIF.
    WHEN 'CANCEL'.
      IF NOT html_control IS INITIAL.
        CALL METHOD html_control->free.
        FREE html_control.
      ENDIF.
      IF NOT web_container IS INITIAL.
        CALL METHOD web_container->free
          EXCEPTIONS
            OTHERS = 1.
        IF sy-subrc <> 0.
        MESSAGE E002 WITH F_RETURN.
        ENDIF.
        FREE web_container.
      ENDIF.
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0200  INPUT
      CLASS cl_events_handle IMPLEMENTATION
CLASS cl_events_handle IMPLEMENTATION.
  METHOD navigation.
    v_url = url.
  ENDMETHOD.                    "on_navigate_complete
ENDCLASS.                    "cl_events_handle IMPLEMENTATION}
Edited by: renu1ece on Dec 30, 2010 8:00 AM

Similar Messages

  • How to check email received

    In my program, I need to check emails. If an email is the one that responses to my application's action (the address tells), I will do something. I need to read the contents of the email, selectively delete or keep the email.
    Please forward instruction.
    Thanks.

    Thanks for the reply.
    I found the Javamail examples with mail.jar+Activation.jar

  • How to check emails of all email account in one Inbox Folder?

    I have more than one email account, If I setup my gmail, yahoo, Hotmail, ymail accounts in Mozilla Thunderbird Email Client, then I see separate inbox for each account, and to check email I have to go inbox of each account for checking email of that account.
    Is it possible that I see all emails of my all email account in one inbox window, as well one sent folder for all email account, one spam / one trash / one delete / one important folders etc.... for all email account.
    pls adv.

    There is a quick method.
    * View >Folders > Unified.
    This will show eg:One Inbox containing all account inbox emails. It will also show the various account Inboxes shown as sub folders, so that you can also see the various Inboxes individually.
    If you have Pop mail accounts, then they can be amalgamated into one Local Folder Inbox.
    Go into 'offline' mode - (do not synchronize - that is for IMAP accounts.) This stops any further downloading to Pop mail account.
    You would need to move all of your emails into Local Folder Inbox and other Local Folder folders.
    Then change the type of account.
    * Tools -> Account Settings -> Server Settings
    * click on the "Advanced" button.
    * select 'Global Inbox (Local Folders Account)'
    * click 'OK'.
    Exit Thunderbird and restart before you download anything.
    there are other options mentioned at this link, plus info on Global Account.
    * http://kb.mozillazine.org/Global_Inbox

  • How to check email?

    Wow. All of the hype about FireFox... how do I check my email? I was using Windows Mail with IE8. I am about to uninstall FireFox if it can't do something so simple...?
    == This happened ==
    Every time Firefox opened
    == Cant find icons, etc for email

    The "get mail" feature was removed from Firefox years ago, because Microsoft never fixed the internals of Windows so that function worked properly for all users - it seems that 20 to 25% of users had problems.
    Try this extension, which adds that feature to Firefox:
    http://webdesigns.ms11.net/getmail.html
    Quite honestly, if that's all it takes for you to want to go back to IE, you'll be totally frustrated when you find other "simple things" that don't meet your expectations. Basically, Firefox is a lean browser and when you want a feature that isn't in the basic package, you add it via an extension.

  • How to check frequency of ABAP program usage

    Dear Experts,
    How to find out the frequency of ABAP programs executed by users? the reason is because we want to do a housekeeping on all the ABAP reports that we have developed over the years, we want to deactivate those reports that are no longer executed by the user within 1 year. Anyone can give suggestion?
    I already tried using SM36, but this is only for those programs scheduled in background or immediate, how about those programs running on foreground?

    Hello,
    You can use the trxn SM20N. But bear in mind some prior config needs to be in place for the logging to be active (trxn SM19).
    For further details on SM20 read this: [Security Audit Log|http://help.sap.com/SAPhelp_nw70/helpdata/en/2c/c59d37d373243de10000009b38f8cf/frameset.htm]
    @Sap Fan: STAD can be used in case the audit log is not available (e.g., due to missing config) but afaik there is a limitation on the date range you can provide.
    BR,
    Suhas
    Edited by: Suhas Saha on Sep 7, 2010 9:39 AM

  • If  I know authority object is 'S_OC_SEND', how to check it in ABAP code ?

    Can i find if people in other place check the authority 's_oc_send'.
    Best regards,

    Hi Blake,
    Check program RSUSR060
    Thanks
    Lakshman

  • How to get email  as ABAP report through SAP.

    hi all,
    here i am getting one error. i run the program in foreground i am getting mail. but when i run the report in back ground i get mail but contents no data??
    whot could be the reason??

    do you use fm gui_download /-upload in your prg.?
    A.

  • How to check apple mail

    hollo, everyone. m a new client of apple.
    i wonder how to check email inbox of apple mail

    Are you trying to read @me.com mail?
    In iPhone > Mail > Mailboxes > iCloud.
    Or https://www.icloud.com

  • In ecatt - how to check at database level using ABAP

    Hi,
    How to check at database level using ABAP in Ecatt tool.
    say,for example I want to check a particular sales order is invoiced or not ,at the database level and if it is invoiced I have stop proceeding to invoicing of that sales order number.
    Could anybody suggest on this with an example?
    thanks.

    Hi,
    you can use the command GETTAB to access single db records.
    Full specified or partitial specified keys can be use at GETTAB. It will return always only one record, also if a couple could match your selection.
    For more advanced scenarios you can also use eCATTs Inline ABAP. In a block between the commands ABAP. ENDABAP. you can code ABAP statements, e.g. SELECT ... INTO TABLE ...
    eCATT script parameters of type 'V' defined in that script using ABAP/ENDABAP will be transfered into the ABAP block and back to script after ABAP perform.
    Best regards
    Jens

  • How often is email checked?

    I have an E6 and I periodically send test emails.  I noticed that sometimes I receive my test emails instantly. 
    Other times I receive them after a good while. 
    On past phones I was able to set how often to check email, but on my E6 for some reason I cant. 
    Can anyone explain the inconsistency?

    Hi there!
    I noticed on my E6 that "Soonest" means the phone is in sync all the time. You can see a green circule appear at the left top corner of e-mail app. It should send/receive directly (push mail). It works good, didn't notice any disturbances.
    I wouldn't recommend to choose that option otherwise you're really in need of that because it will draw your battery down. My recommendation is 30 minutes max to 1 hour in comparison with usability and energy saving.
    By the way, you should check at your home screen options menu if your widgets are at "On-line" mode. It's omportant too if you want your mails displayed soonest.
    Nokia E6-00

  • How to check syntax errors in ABAP Queries

    HI Guys,
    How to check syntax errors in ABAP queries, Can please provide the T-Codes.
    Advande thanks to everybody.
    Thanks,
    Gourisankar

    Hi
    with these you can check syntax errors and performance points
    Hi
    these all are doing t he same thing that is checking the program for better performance
    Tools for Performance Analysis
    Run time analysis transaction SE30
    SQL Trace transaction ST05
    Extended Program Check (SLIN)
    Code Inspector ( SCI)
    Run time analysis transaction SE30 :This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    SQL Trace transaction ST05: The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on a particular database table of the ABAP program would be mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Extended Program Check
    This can be called in through transaction SE38 or through transaction SLIN. This indicates possible problems that may cause performance problems.
    Code Inspector (SCI)
    You can call the Code Inspector from the ABAP Editor (SE38), the Function Builder (SE37), the Class Builder (SE24), or as a separate transaction (SCI).
    The Code Inspector indicates possible problems. However, note that, especially with performance issues: There is no rule without exception. If a program passes an inspection, it does not necessarily mean that this program will have no performance problems.
    reward if usefull

  • How to check during logon if an SAP ECC6.0 (ABAP) user is in Microsoft ADS

    Hello
    How to check during logon if an SAP ECC6.0 (ABAP) user is in Microsoft Active Directory Services.
    I would like to prevent logon to ABAP system for users not present in Microsoft Active Directory Services
    Thank you in advance

    Have you looked at setting the SNC functionality for lookups against AD? Here's a link that might be helpful: [Secure Network Communications |http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e6/56f466e99a11d1a5b00000e835363f/frameset.htm]
    [Configuring SNC on AS ABAP  |http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e6/56f466e99a11d1a5b00000e835363f/frameset.htm]
    Hope that is helpful.
    J. Haynes

  • How to check Adobe Live Cycle Designer version in ABAP Workbench ?

    Hi,
    Please advise how to check Adobe Live Cycle Designer version in ABAP Workbench ? Currently i am using NW 7.0 SP18 (ABA,BASIS).
    Thank You and Best Regards
    Fernand Lesmana

    There are 3 ways you can check which version of ALD you have installed on your machine.
    1. Go to transaction SFP (Forms Builder) transaction and enter a form name. Select Layout and it should open Adobe LiveCycle Designer. From ALD select Help --> About section and it should give you version details.
    2. Go to SE80 and open an Interactive form application. Select the InteractiveFormUI element and click edit. This will open the ALD. From ALD select Help --> About section and it should give you version details.
    3. A more simpler way is just go to C:\Program Files\Adobe on your machine and there should be Designer folder there for e.g. Designer 7.1 / Designer 8.0 / Designer 8.1
    Chintan

  • How to use transaction SOST & SCOT for checking Email performance ?

    How to use transaction SOST & SCOT for checking Email performance ?
    what exactly as CRM Functional we have to do in above transaction .
    Please guide me . what is significance of these transaction ?
    Regards,
    Anup Reche

    Hi Anup,
    Transaction SOST is used to view the status of the sent mails from SAP.
    You cna filter the mails sent by a particular user, on a specified date range and time.
    You can list the mails in the status Waiting, Error, Sent or Transmitted.
    You can also go to the log of the mail and see its details and can also open the mail sent by the user.
    You can add the filters as per your requirement.
    Transaction SCOT is SAP Connect used to make connections from SAP to external applications.
    You cna configure sending of external mails in SCOT by specifying the SMTP host and port to be used.
    Hope this gives you a basic idea of the 2 transactions.
    Regards,
    Saumya

  • How to check Integration Server Client and ABAP stack Client?

    How to check Integration Server Client and ABAP stack Client? How to check,,pls tell in detailed steps???
    Points would be awarded.
    Arnab

    hi,
    Must be the server has different clients,one declared as application server ie abap stack client and the other declared as Integration server ie XI. U might be trying to open idx5 in application server client, in which idx5  exists but you cant open the screen even, that can be achieved through we02.
    000 is the default client when  XI server is installed .We can create separate clients on the system through sccl tcode.
    As told we can find the client  on sap logon screen.
    Logon to sxmb_adm and check whether the client is declared as an application system(r/3) or Integration server(xi).Try idx5 in xi not r/3
    Edited by: NagaDurga Nannapaneni on Aug 28, 2008 11:36 AM

Maybe you are looking for

  • Help in abap object

    HALLOW i have this metod and when i set just CARRID its work o.k. but when i wont to set also CONNID i have eroor i new with this topic (oo) regards METHOD wddoinit .   DATA:     node_flightinfo                     TYPE REF TO if_wd_context_node,    

  • I can't import a layered photoshop file anymore

    I don't know what happened, but my photoshop (vs.7) files, which are in layers, come in as if it were a png file.  The file is in RGB 16 bit... I am using Final Cut 7.0.3 I would love any suggestions!!  Thanks so much!

  • *** glibc detected *** double free or corruption

    Hello This is an extension of the following thread but brings up problems of its own. PANIC: fatal region detected, run recovery I wrote a Python script to upload all my XML files to a container. Earlier I was adding the document without transaction

  • Printing Alarms On LPT

    My client have purchased DEll T100 System.Unfortunately This System Does not have any Parallel Port (LPT1). I want to connect my EPSONLQ 300 Printer with Dell T100. Printer Connection Via USB Port is not applicable for me because I am Printing Alarm

  • ITunes 10.4 can't put album art

    Ever since I have updated my iTunes to 10.4 on Windows, it won't let me put album art on my songs or get it from iTunes either. It just shows a white or black box. Anyone know what the problem is?