Need to get the number of messages displayed

Dear All,
I need to know whether the message area is having any messages or not. If messages are there then i need to get the exact number of the messages. I found the count in the class CL_WDR_MESSAGE_AREA. But the count is the private attribute. Is there any methods available to get the count of the number of mesages.
Thanks & Regards,
Raghuram K.R.

Hi raghuram
below is the code snippet to get the count of message displayed ..
other than this what is your looking for Exactly. pls be clear so that we can help you out .
*   get message manager
  DATA lo_api_controller     TYPE REF TO if_wd_controller.
  DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
  DATA :lt_messages_mgr TYPE if_wd_message_manager=>ty_t_messages,
        lv_string1 TYPE string ,
        lv_string2 TYPE string,
        lv_count TYPE i .
*Message Manager Reference  
  lo_api_controller ?= wd_this->wd_get_api( ).
  lo_message_manager = lo_api_controller->get_message_manager( ).
*   report 2  message
  lv_string1 = lo_message_manager->report_success( message_text  = 'test 1').
  lv_string2 = lo_message_manager->report_success( message_text  = 'test 2').
*  get the list of message
  lt_messages_mgr = lo_message_manager->get_messages( ).
*  count the no of message
  DESCRIBE TABLE lt_messages_mgr LINES lv_count.
Regards
Chinnaiya P
Edited by: chinnaiya pandiyan on Oct 19, 2011 1:17 PM

Similar Messages

  • How to get the number of messages consumed by a MDB ??

    Hi all,
    How to get the number of messages consumed by a MDB displayed in OEM in a Java Application ???
    DMS ??? what use DMS ???
    tanks

    ok.
    Well using DMS is one way to get at these sorts of stats in a programmatic manner.
    There's a Java API you can use, or you could call out to the Spy servlet to query the DMS stats in either text or XML form.
    I don't have an MDB published so I can't show you specifiically, but here's the sort of query you can use to extract the data.
    http://localhost:8888/dms0/Spy?format=raw&table=oc4j_ejb_stateless_bean&recurse=children
    Which produces a table of the TEXT form:
    <DMSDUMP version='9.0.4' timestamp='1163456821185 (Tue Nov 14 08:57:01 CST 2006)' id='8888' name='OC4J'>
    <statistics>
    /oc4j [type=n/a]
    /oc4j/default [type=oc4j_ear]
    /oc4j/default/EJBs [type=oc4j_ejb]
    /oc4j/default/EJBs/jmsrouter_ejb [type=oc4j_ejb_pkg]
    /oc4j/default/EJBs/jmsrouter_ejb/AdminMgrBean [type=oc4j_ejb_stateless_bean]
    pooled.count:     11     ops
    pooled.maxValue:     1     count
    pooled.minValue:     0     count
    pooled.value:     0     count
    ready.count:     11     ops
    ready.maxValue:     1     count
    ready.minValue:     0     count
    ready.value:     0     count
    session-type.value:     Stateless     
    transaction-type.value:     Bean     
    /oc4j/default/EJBs/jmsrouter_ejb/EnqueuerBean [type=oc4j_ejb_stateless_bean]
    pooled.count:     11     ops
    pooled.maxValue:     0     count
    pooled.minValue:     0     count
    pooled.value:     0     count
    ready.count:     11     ops
    ready.maxValue:     0     count
    ready.minValue:     0     count
    ready.value:     0     count
    session-type.value:     Stateless     
    transaction-type.value:     Bean     
    /oc4j/default/EJBs/jmsrouter_ejb/TimerHandlerBean [type=oc4j_ejb_stateless_bean]
    pooled.count:     11     ops
    pooled.maxValue:     0     count
    pooled.minValue:     0     count
    pooled.value:     0     count
    ready.count:     11     ops
    ready.maxValue:     0     count
    ready.minValue:     0     count
    ready.value:     0     count
    session-type.value:     Stateless     
    transaction-type.value:     Bean     
    </statistics>
    </DMSDUMP>
    Or produces an XML document of the form:
    http://localhost:8888/dms0/Spy?format=xml&table=oc4j_ejb_stateless_bean&recurse=children
    You can use the Spy console to find the table that contains the details for MDB and then take it from there.
    This is not what you specifically want to do, but it does provide a good overview of how DMS is used.
    http://www.oracle.com/technology/pub/notes/technote_dms.html
    -steve-

  • How do I get the number of messages shown in the current MessageArea

    Hi there,
    I try to display the messages at the top of the screen in a MessageArea inside a scrollable Container which shows only one message to save space.
    In case that there are more than one message I would like to show a hint, that there are more than the displayed message.
    Is there an possiblity to get the count of messages shown in the current MessageArea? I already tried to get the MessageArea and had a look at the properties of the object: No Luck
    Afterwards I got the MessageManager but there was no apropriate method

    Hi ,
    Looks like there is no such an API !!! How about implementing on our own
    Take a int variable or valueAttribute "count" and increment the count after calling reportwarning or reportsuccess methods on the MessageManager.
    This will give count of the exceptions that you are handling in your code.
    @All, Correct me if there is such an API exists
    Regards, Anilkumar
    Message was edited by:
            Anilkumar Vippagunta

  • How to get the Number of lines displayed in  table control in bdc

    Hi,
    when we write a  bdc for a standard transaction, if we encounter a table control, we fill the values for each record like field(01), and the second record field(02) .......and so on..
    if only 3 records are displayed in the screen and if we have 5 records to be filled in the table control, how to write the logic for that?
    how to track of how many lines are getting displayed in the table control .. again it depends on the screen resolution i think..
    useful answers will be rewarded
    shekhar

    Hi,
    Here is the solution code for this :-
    data for controlling paging on screen 0102 
    DATA: W_MAXLINES(2) TYPE N, 
    W_NEXT_LINE(3) TYPE N, 
    W_PAGE(1), "y = page forward, n otherwise 
    W_SCRLEN(2) TYPE I, 
    W_SCRLINE(2) TYPE I. 
    DATA: BEGIN OF W_HDR. 
    INCLUDE STRUCTURE D020S. 
    DATA: END OF W_HDR. 
    DATA: BEGIN OF W_FLD OCCURS 100. 
    INCLUDE STRUCTURE D021S. 
    DATA: END OF W_FLD. 
    DATA: BEGIN OF W_LOG OCCURS 20. 
    INCLUDE STRUCTURE D022S. 
    DATA: END OF W_LOG. 
    DATA: BEGIN OF W_MC OCCURS 20. 
    INCLUDE STRUCTURE D023S. 
    DATA: END OF W_MC. 
    DATA: BEGIN OF W_DYNPRONAME, 
    PROGRAM(8) VALUE 'SAPMM60X', 
    DYNPRO(4) VALUE '0102', 
    END OF W_DYNPRONAME. 
    FORM GET_MAX_LINES. 
    set w_maxlines to the number of var-loop occurrences on the screen so 
    that we know when to page forward on screen 0102 
    also initialise w_next_line to zero for GET_NEXT_LINE 
    this subroutine caters for all cases - including screens without loops 
    CLEAR: W_MAXLINES, 
    W_NEXT_LINE. 
    IMPORT DYNPRO W_HDR 
    W_FLD 
    W_LOG 
    W_MC 
    ID W_DYNPRONAME. 
    LOOP AT W_FLD WHERE LTYP EQ 'L'. 
    MOVE W_FLD-LINE TO W_SCRLINE. "first var-loop line 
    MOVE W_FLD-LBLK TO W_SCRLEN. "depth of loop block 
    EXIT. 
    ENDLOOP. 
    IF SY-SUBRC EQ 0 
    AND W_SCRLEN NE 0. 
    sy-srows = total no of lines on screen 
    w_scrline = actual first line of loop so that 
    w_scrline - 1 = number of heading lines (before loop) 
    4 = no of lines at top of screen - command line, pushbuttons, 2 ulines 
    3 = no of lines after loop - uline & Page count 
    w_scrlen = no of lines in loop block 
    w_maxlines = sy-srows - ( wscrline - 1 ) - 4 - 3 
    and then 1 less but not sure why! 
    W_MAXLINES = SY-SROWS - W_SCRLINE - 1 - 4 - 3. 
    W_MAXLINES = W_MAXLINES - 1.
    W_MAXLINES = W_MAXLINES DIV W_SCRLEN. 
    ELSE. 
    MOVE 99 TO W_MAXLINES. "this required if no screen loop 
    ENDIF. 
    ENDFORM. 
    FORM GET_NEXT_LINE. 
    set w_page if page forward is required 
    W_NEXT_LINE = W_NEXT_LINE + 1. 
    IF W_NEXT_LINE GT W_MAXLINES. 
    W_NEXT_LINE = 1. 
    W_PAGE = 'Y'. 
    ELSE. 
    W_PAGE = 'N'. 
    ENDIF. 
    ENDFORM. 
    Hope it helps.
    reward if helpful.
    Regards,
    Sipra

  • How to get the number of elements in a tilelist

    I'm writing test cases for a flex application using FlexSelenium and I need to get the number of elements displayed in the tilelist.
    I know that that the tilelist is fed by an array. but i can't access that array from my test case.
    Can anyone tell me how I can get the number of elements in a tilelist on the application? which property of the tilelist can provide that number?

    try tileList.dataProvider.length;

  • Everytime I want to update the latest iTunes or iPhone software I get the following error message "Cannot open the URL" please help?

    I need to update my iTunes and my iPhone 3GS to the latest version and evertimes I click on "update" I get the following error message displayed - "cannot open URL".  I have checked the permissions on my windows firewall and iTunes is not blocked.  PLease can anyone give me some other suggestions as its really frustrating and I want to download ringtones etc but can't do so without the latest software versions of iOS etc.  Please help?  Thank you

    Try temporarily disabling your firewall and antivirus software and try again...
    See here for Connection Issues
    http://support.apple.com/kb/TS1379
    From Here
    http://www.apple.com/support/itunes/troubleshooting/

  • To get the Number of workign days in a period

    Hi All.....I have a requirements where in I need to get the number of working days in a period and also the dates with it. Say there are 28 days in a period ...then the working days would be 20 say...I need to get all the working dates......I know there is a FM "RKE_FACTORY_SELECT_DAYS" which does not exist in my systm.....So whats the other alternative for this......Please reply soon....
    Thank you.
    Madhukar.

    Have the code that is inside the FM.
      DATA: L_V_AKTDAT LIKE SCAL-DATE.
      DATA: L_V_INDICATOR LIKE SCAL-INDICATOR.
      CLEAR  : ETH_DATS.
      REFRESH: ETH_DATS.
      L_V_AKTDAT = I_DATAB.
    * do it for all days in space of time
      WHILE L_V_AKTDAT <= I_DATBI.
        CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
             EXPORTING
                  DATE                         = L_V_AKTDAT
                  FACTORY_CALENDAR_ID          = I_FACTID
             IMPORTING
                  WORKINGDAY_INDICATOR         = L_V_INDICATOR
             EXCEPTIONS
                  CALENDAR_BUFFER_NOT_LOADABLE = 1
                  CORRECT_OPTION_INVALID       = 2
                  DATE_AFTER_RANGE             = 3
                  DATE_BEFORE_RANGE            = 4
                  DATE_INVALID                 = 5
                  FACTORY_CALENDAR_NOT_FOUND   = 6
                  OTHERS                       = 7.
       IF SY-SUBRC NE 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
                 RAISING DATE_CONVERSION_ERROR.
       ENDIF.
    * indicator is space if actual day is a working day
    * if indicator is not space the actual day isn't a working day
        IF L_V_INDICATOR EQ SPACE.
          CLEAR ETH_DATS.
          ETH_DATS-PERIODAT = L_V_AKTDAT.
          APPEND ETH_DATS.
        ENDIF.
        L_V_AKTDAT = L_V_AKTDAT + 1.
      ENDWHILE.

  • How to get the number of current active external modes?

    hi all,
    I need to get the number of currently active external modes. This can be done by calling function THUSRINFO. But this only works propperly, if you are logged on only once. If you are logged on more than one time then the function returns several entries in the parameter USR_TABLE. The entries mainly differ in the first parameter TID (type UTID, INT4) "terminal-identification" but how can I know which is the valid one for my current session. Functions TERMINAL_ID_GET, SPH_TERMINAL_IDENTIFY and SPH_TERMINAL_ID_GET dont work.
    Or is there another way to get the number of active external sessions?
    Thanks in advance,
    Michael

    Hi,
    tables: usr02, usr41.
    data: OPCODE_MODE_COUNT(1) TYPE X VALUE 3,
          modes like sy-index,
          u_MODES LIKE MODES.
    select * from usr02.
      select * from usr41 where BNAME = usr02-bname.
        CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_MODE_COUNT
          ID 'TID' FIELD usr41-TERMID
          ID 'MODES' FIELD MODES.
        IF SY-SUBRC = 0.
          u_MODES = u_MODES + MODES.
        ENDIF.
      endselect.
      if sy-subrc = 0.
        write:/ usr02-bname, u_MODES.
      endif.
      clear u_modes.
    endselect.

  • Getting the number of active connections in a connection Pool

    Hi,
    I have an application deployed on jboss. DB used is db2. For monitoring purpose i need to get the number of active and idle connections at any point of time. I am trying to use commons-dbcp jar to get this data using BasicDataSourceClass. Following is the piece of code.
    Context initialContext;
    try {
         initialContext = new InitialContext();
         DataSource ds = (DataSource) initialContext.lookup(myjndiname);
         logger.info("************CONNECTION POOL DATA->" + ds.getClass().getName() + "************" + ds.getClass() + "**************");
         BasicDataSource bds = (BasicDataSource) datasource;
              logger.info("************CONNECTION POOL DATA-> ACTIVE CONN=" + bds.getNumActive() + " IDLE CONN=" + bds.getNumIdle() + " INIT SIZE=" + bds.getInitialSize());
    catch (NamingException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
    This code gave a class cast exception at the point datasource is cast to BasicDataSource. The class name returned by ds is WrapperDataSource. I have few queries on this:-
    1. What configurations do i need so that datasource returned by InitialContext is BasicDataSource? FYI i tried to add the BasicDataSourceFactory in db2-ds.xml. But it still didnt work
    2. Is there any other way to find the number of active connections in a connection pool? I dont want any server specific solution.
    Pls help.
    Thanks

    user13642196 wrote:
    Hi,
    I have an application deployed on jboss. DB used is db2. For monitoring purpose i need to get the number of active and idle connections at any point of time. I am trying to use commons-dbcp jar to get this data using BasicDataSourceClass. Following is the piece of code.
    Context initialContext;
    try {
                 initialContext = new InitialContext();
                 DataSource ds = (DataSource) initialContext.lookup(myjndiname);
                 logger.info("************CONNECTION POOL DATA->" + ds.getClass().getName() + "************" + ds.getClass() + "**************");
                 BasicDataSource bds = (BasicDataSource) datasource;
              logger.info("************CONNECTION POOL DATA-> ACTIVE CONN=" + bds.getNumActive() + "  IDLE CONN=" + bds.getNumIdle() + "   INIT SIZE=" + bds.getInitialSize());
    catch (NamingException e) {
                 // TODO Auto-generated catch block
                 e.printStackTrace();
    }This code gave a class cast exception at the point datasource is cast to BasicDataSource. The class name returned by ds is WrapperDataSource. You can only cast an object to an interface it implements or to a class it extends (directly or indirectly).
    I have few queries on this:-
    1. What configurations do i need so that datasource returned by InitialContext is BasicDataSource? FYI i tried to add the BasicDataSourceFactory in db2-ds.xml. But it still didnt workhttp://commons.apache.org/dbcp/api-1.2.2/org/apache/commons/dbcp/package-summary.html#package_description

  • Problems with getting the number of hits in the document.

    I need to get the number of hits in the document.
    I use the query template for this porpose as:
    SELECT d.id, score(1)
    FROM document d
    WHERE contains(d.content,'<query>
    <textquery>SEARCHWORD</textquery>
    <score datatype="INTEGER" algorithm="COUNT"/></query>',1)>0
    AND d.id=1
    problems:
    1. If I have some synonyms associated with SEARCHWORD in OracleThesaurus and in case if document contains these synonyms they are not counted.
    2. could you explain the following results returned by query above:
    search query: word1 - numberOfHits=10
    search query: word2 - numberOfHits=8
    search query: word1 OR word2 - numberOfHits=10
    i suppose that numberOhHits=18 for a query: word1 OR word2

    Hi.<br><br>
    1.Synonyms (and generally thesaurus query extensions) cannot automatically uses in queries. You MUST expand you query using SYN function yourself. Query you write just applicable for only KEYWORD search.<br><br>
    2. Ask yourself. I'm not seen your data. ;)<br>
    Rgrds, Yuri.<br><br>
    PS. Just read Oracle Text Reference - you can find many answers here. ;)

  • User-Exit after saving VA01 to get the number of Sales Order.

    Hi everyone,
    I hope you all fine!
    I really need your help to get a user-exit or BADI for the VA01 transaction,  because after pushing the save button I need to get the number of sales order, so I can create a header text, but to use a Function Module to do that, I need the sales order first.
    I hope You can help me with this.
    Thanks for your time.
    Regards,

    Hi,
          Goto se38 ,
        1. Enter prog. name  "MV45AFZZ"
        2. Choose "Enhance"  from application tool bar,
        3. Edit>Enhanc.Operations>Show implicit Enhance...
        4.Right click>Enhancement Impliment> Create....,Before that,you have to choose which subroutine is suitable for your scenario...then you can code it .
       Also,try this user exit -->"V45E0001"
    I hope ,it will help you...
    <<=< Sharing Knowlede is a way to Innovative >>=>
    By,
      Yoga

  • TS3899 My mail is configured correctly.  When I go to view my inbox I get the 'Load More Messages...' with the number of messages showing.  I touch the display and nothing happens.  I have uninstalled and reinstalled the email account and restarted the de

    My mail is configured correctly.  When I go to view my inbox I get the 'Load More Messages...' with the number of messages showing.  I touch the display and nothing happens.  I have uninstalled and reinstalled the email account and restarted the device.  I can send mail fine as well as view my sent messages.  Very confusing.

    I have two yahoo accounts and I know as they 'improved' their servers I had periodic outages. It'd work fine on my webmail on  my computer, webmail on the iPad, but not via the mail app. And it was stuff on their end. It may be a case of wait and see and you may need to eventually remove/readd the account on your iPhone.
    When the issue is on their end, unfortunately there's not much for users to do beyond wait it out or find work arounds.

  • I'm getting an error starting Photoshop CS4.  Error number 148.3  Licensing for this product has stopped working.  I rebooted several times to no avail.  Still get the same error message everytime I try to start Photoshop.  I'm using Windows 7 -- 64 bit

    Error number 148.3  Licensing for this product has stopped working.  I rebooted several times to no avail.  Still get the same error message everytime I try to start Photoshop.  I'm using Windows 7 -- 64 bit

    If you can not use CS4 menu Help>Activate|Deactivate to get the install working again you may need to re-install CS4.

  • Created a song in Garageband 11.04 but now it won't open. Message that I need to get the latest Garageband. Anyone have this problem?

    Created a song in Garageband 11.04 but now it won't open. When I try to open the song, I get a message that I need to get the latest Garageband. Anyone have this problem?

    wsmith19 wrote:
    Created a song in Garageband 11.04
    you're going to have to check the version number again, there is no v11.04, the latest is v6.0.5

  • Upgraded to 5.4 when opening lightroom get a message "encountered an error when reading from its preview cache and need to quite" tried this several time but get the same eror message

    Upgraded to 5.4 when opening lightroom get a message "encountered an error when reading from its preview cache and need to quite" tried this several time but get the same error message.  Says Lightroom will attempt to fix the problem the next time it launches but that is not happening.  How do it fix this?

    Delete the preview cache using your operating system. It is a folder whose name ends with Previews.LRDATA. Do not delete the Lightroom catalog, which ends with .LRCAT

Maybe you are looking for

  • ABAP Client Proxy from ECC 6.0 to XI message irregular recieving

    Hi Gurus Any one has come across issue whereby the ECC 6 system trigger ABAP Client proxy to SAP PI 7.0. The first time the PI is able to recieve it in the SXI_MONITOR. But subsequent trigger from the ECC 6.0 system the SAP ABAP program to trigger th

  • Problem with adapter

    hello running a sync service and recieve this error. couldnt determine if this is XI problem or WS. if it is XI, how can I debug it?   <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Call Adapter   --> - <SAP:Error xmlns:SAP="http://

  • How to hide a tab, or why does have to be so complicated?

    Hi I have a tabNavigator, and I am trying to hide some of the tabs. I have tried the obvioius visible="false" //this did not work includeInLayout="false" visible="false" //and this did not work and finally var secondTab = tabNavigator.getChildAt(1);

  • Using HAL to extract and then load metadata

    hi! We are designing a process in which HAL is used to extract a dimension from Essbase and then loaded to another application using a load rule. We are struggling with our attributes extraction, we have multiple attributes to an entity and when we e

  • New tab dont operate in my firefox.

    i click on new tab but do not operate