Distinguishign QueueSession from TopicSession given JMSSession?

The Question:
          Is there a way to distinguish between a QueueSession and a TopicSession, if one has a JMSSession object? Is there a way to distinguish between a Queue and a Topic if one has a DestinationImpl object?
          Unexpected Behavior #1 That Leads to the Question:
          In pre-existing code I've inherited, I find that a call to TopicSession.createTopicSession() returns a weblogic.jms.client.JMSSession object instead of the expected TopicSession reference (though the value returned from the call is cast to a TopicSession and assigned to a TopicSession reference).
          That TopicSession reference is then passed to a function as a Sesson parameter. The function performs instanceof operations to determine whether it is a QueueSession or a TopicSession. The instanceof operation upon that JMSSession object reference that was thus passed in returns true for BOTH a QueueSession AND a TopicSession.
          Unexpected Behavior #2 That Leads to the Question:
          Similarly, after a JNDI lookup() call on the topic / destination name, a weblogic.jms.common.DestinationImpl object is returned instead of the expected Queue or Topic. Subsequent 'instanceof' checks in the code that check for a Queue versus a Topic similarly BOTH succeed for that returned object. So a similar mechanism is operating there.
          My Ignorant Guesswork:
          I'm speculating that the DestinationImpl class acts as a proxy implementing both the Queue and Topic interfaces, and that the JMSSession class similarly implements both the QueueSession and TopicSession interfaces. This doesn't seem like a good thing to do, since one can no longer distinguish between 'em, but hey, surely someone must've had a reason to do so (or to do something like it).
          FYI:
          I have limited Java experience, and am just now learning to work with EJB and WebLogic, with NO other folks around me who know the language or the framework. Help, insight, and a gentle push in the right direction will be sincerely appreciated.

A-HA! Answering my own question, here, so ignore my topic. I found two old newsgroup archive references to apparently the exact same problem. The following captures the response found there --
          Yes, the weblogic.jms.common.DestinationImpl class implements both javax.jms.Queue and javax.jms.Topic, and yes, this creates a problem distinguishing them. BEA provides a work-around API:
          ((weblogic.jms.common.DestinationImpl)dest).isQueue()
          "The next release will deprecate the work-around
          in favor of an extension interface, which will be very
          similar - something like:
          ((weblogic.jms.extensions.WLDestination)dest).isQueue()

Similar Messages

  • How to get period date of for a given month from a given date in mdx for SSRS report (mm/dd/yyyy)

    I have a situation,  where i need to write expression Period to date(PTD). i want to know how to get the period date. i want you to help in writing Period date or else is there any function to get period date for a given date(the  date is given
    from the parameter dynamically) in MDX for SSRS report
    ram

    Hi ram,
    Per my understanding that you want to get the period date based on the month selected and the given date, right?
    Could you please provide details information below to help us better understanding your requirements, thus we will be more effective to provide an solution:
    What is the format of the period date you want to get, is this date in the DB and you want to filter it based on the month and the given Date?
    Did the month and given date are two parameters in the report? if possible, could you please provide some sample data in the DB and also the snapshot of the report structure
    I assume you want to get the period date(mm/dd/yyy) between the select month(e.g:Feb) and the given date (10/1/2014) and you should get the date between(02/01/2014-10/1/2014).
    If so,and you also have two parameter "Month","EndDate"(EndDate is the given date), please reference to details information below:
    You can create an new parameter "BeginDate" (Date/Time) which is the begin date of the period, you can use the expression to get the value based on the value of the month and the year value from the given date,finally hide this parameter:
    Specify the available value:
    Label:=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value)
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Specify the default Value:
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Add filter to the dataset as below:
    Preview you will get all the date in the given Period:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Functional module to get the File from a given Directory

    Hi all,
    I am using a FM name 'subst_get_file_list' to get the file from a given directory but it is accepting only 40 Character length file only my requirement is to accept file name other than 40 char,
    give me good sugestion
    regards
    paul

    Hi Paul,
    Check the Function Module Gayathri has given. ie. 'SO_SPLIT_FILE_AND_PATH'.
    In the exporting parameter FULL_NAME , give the path name and in the importing parameter stripped_name , you will get the filename.
    Check this code.
    REPORT ZSHAIL_SPLITFILE.
    data: it_tab type filetable with header line,
          gd_subrc type i.
    tables: rlgrap.
    data: path type string,
          file_name type string.
    parameters file_nam type rlgrap-filename .
    data: user_act type i.
    at selection-screen on value-request for file_nam.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
      EXPORTING
        WINDOW_TITLE            = 'select a file'
       DEFAULT_EXTENSION       = '*.txt
        DEFAULT_FILENAME        = ''
        FILE_FILTER             = '*.txt'
        INITIAL_DIRECTORY       = ''
        MULTISELECTION          = abap_false
       WITH_ENCODING           =
      CHANGING
        file_table              = it_tab[]
        rc                      = gd_subrc
        USER_ACTION             = user_act
       FILE_ENCODING           =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 4
        others                  = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if user_act = '0'.
    loop at it_tab.
    file_nam = it_tab-filename.
    endloop.
    endif.
    path = file_nam.
    CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
      EXPORTING
        full_name           = path
    IMPORTING
       STRIPPED_NAME       = file_name
      FILE_PATH           =
    EXCEPTIONS
      X_ERROR             = 1
      OTHERS              = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    at selection-screen.
    message i001(zmess) with file_name.
    Regards,
    SP.

  • Fetch Table name and field name from a given entry

    Hi ,
    i know the entry which is present in the database .But i don't know the table name and field name which has that entry .
    i have to fetch the table name and field name from a given entry .
    Can anyone suggest me how will  i fetch the table name and field name for a given entry .
    thanks in advance.

    Hi ,
    i know the entry which is present in the database .But i don't know the table name and field name which has that entry .
    i have to fetch the table name and field name from a given entry .
    Can anyone suggest me how will  i fetch the table name and field name for a given entry .
    thanks in advance.
    Few more options to scan specific text in entire DB:
    http://www.mssqltips.com/sqlservertip/1525/scan-a-sql-server-database-for-objects-and-columns-containing-a-given-text-value/
    http://solutioncenter.apexsql.com/quickly-search-for-sql-database-data-and-objects/
    Cheers,
    Vaibhav Chaudhari
    [MCTS],
    [MCP]

  • Number of Days from a given Date

    How can one calculate the number of days in a month from a given date?
    Ex: If I pass 07/12/2008 it should return 31

    But your example doesn't meet the OP request. The OP wanted the number of days in a month where the month is determined by a specified date (paraprhased).
    DimaCit gave two credible solutions that met that requirement. Yours just counts the number of days between two apparently arbitrary dates.

  • Download a website from a given URL

    hai
    my task is
    "download a website from a given URL ,it must download all the pages from that website.
    it should take the depth of retrial from the user input.all the files/pages must be stored in a folder"
    how is it possible to download entire website
    thanks
    katta vijay

    Capturing the content of a web page from a given URL is relatively straight forward using Java sockets. However, in order to follow, recursively, all the links to other pages etc I think you will need to develop a reasonable sophisticated parser to extract the links and then follow them as well.

  • Nearest Monday from a given date - how do I do this?

    Hello:
    We have a requirement to find the nearest Monday from a given date.
    Can anyone help me with this query?
    Thanks!

    This?
      1  with t as (select trunc(sysdate)-3 + level dt
      2  from dual connect by level <=20
      3  )
      4  select dt,round(dt,'iw') nearest_monday
      5* from t
    SQL>/
    DT                   NEAREST_MONDAY
    Sunday    19/09/2010 Monday    20/09/2010
    Monday    20/09/2010 Monday    20/09/2010
    Tuesday   21/09/2010 Monday    20/09/2010
    Wednesday 22/09/2010 Monday    20/09/2010
    Thursday  23/09/2010 Monday    20/09/2010
    Friday    24/09/2010 Monday    27/09/2010
    Saturday  25/09/2010 Monday    27/09/2010
    Sunday    26/09/2010 Monday    27/09/2010
    Monday    27/09/2010 Monday    27/09/2010
    Tuesday   28/09/2010 Monday    27/09/2010
    Wednesday 29/09/2010 Monday    27/09/2010
    Thursday  30/09/2010 Monday    27/09/2010
    Friday    01/10/2010 Monday    04/10/2010
    Saturday  02/10/2010 Monday    04/10/2010
    Sunday    03/10/2010 Monday    04/10/2010
    Monday    04/10/2010 Monday    04/10/2010
    Tuesday   05/10/2010 Monday    04/10/2010
    Wednesday 06/10/2010 Monday    04/10/2010
    Thursday  07/10/2010 Monday    04/10/2010
    Friday    08/10/2010 Monday    11/10/2010

  • Query to display alphabets from a given string ....

    hi......
    how to disply only the alphabets from the given pattern below
    “A,C&B$.@D”
    tanx

    SQL> select regexp_replace('A,C&B$.@D','[^a-z]*','',1,0,'i') from dual;
    REGE
    ACBD
    with tab as
    (select 'A,C&B$.@D' col0 from dual union all
    select 'a,.cl;:@=y623' from dual
    select Col0,
    translate(Col0,'Z'||translate(lower(Col0),'Aabcdefghijklemnopqrstuvwxyz','A'),'Z')
    from tab
    COL0          TRANSLATE(COL0,'Z'||TRANSL
    A,C&B$.@D     ACBD
    a,.cl;:@=y623 acly

  • HT1270 can we improve graphics in macbook pro from 354mb(given),if so,upto _ mb

    can we improve graphics in macbook pro from 354mb(given),if so,upto _ mb

    Not really, some machine if you add more RAM you will get slightly more VRAM allocation but it's not going to make much of a difference really.
    You bought a 13" it has no 3D graphics chip, only the 15" does.
    Install/upgrade RAM or storage drive in Mac's

  • Find Address from a given LAT/LONG

    Hi All,
    I need your help in finding an address from a given co-ordinates(Latitude,langitude). Please let me know your ideas.
    Thanks

    I don't know if I am missing something but requirement seems to be simple, you want to know the 30 week alter date...
    in a week you have 7 days so 30 weeks will have 30*7 = 210
    select to_date('20080114','YYYYMMDD') + 210 from dual
    Try this...
    If above is not the solution then then pls pur your input and output....

  • Install all packages from a given repository?

    Is there a way to install every package from a given repository? For example, say I wanted to install every package from core (or at least every non-conflicting package, since systemd-sysvcompat is an issue)? I thought maybe something like '# pacman -S core' might do it, but it didn't.
    Back when AIF was still around, I could do this by checking everything at install time, but now it's a multi-step process to collect all the packages and then install them.

    For me, I found I was using most of what was in [core] and it was easier for me to just install everything in it than to weed out the handful that I didn't need. Yes, I know there are _that_ many packages in [core], I'm just _that_ lazy.
    In another scenario, I could see someone wanting to have an uber-system with absolutely everything possible and available installed. I used to do this a few years back with distros like Fedora where I would do a complete install.

  • Selecting Missing Days from a given range of Date  from a table

    Dear Oracle Guru's
    Consider the following table
    txndetails
    Rundate date
    Txncnt Number
    userid varchar2(100)
    Data will be as follows
    Rundate txncnt userid
    17-Nov-2009 4 admin
    18-Nov-2009 7 admin
    21-Nov-2009 3 admin
    23-Nov-2009 4 admin
    We populate this table on the basis of txn generated. This is supposed to run daily based on the transactions. Certain days there wont be any transaction at all. hence there will be no entry on this table .
    At any given point of time , we would like to know the days on which there is no entries in this table
    In the above sample data, there is no entries on 19th, 20th and 22nd
    we have to list out those days
    I got confused while trying some methods
    Kindly guide me in this regard
    with warm regards
    Ssr

    Hi,
    As Centinul and Bhushan said, you need a list of all the possible dates; "CONNECT BY LEVEL <= x" is an efficient way to generate such a list in Oracle SQL.
    Once you have the list of all days, you can use MINUS, like Centinul or Bhushan did. You can also use an outer join, as shown below.
    WITH  extrema     AS
         SELECT     TRUNC (MIN (rundate))     AS start_date
         ,     TRUNC (MAX (rundate))     AS end_date
         FROM     txndetails
    all_days     AS
         SELECT     start_date + LEVEL - 1     AS a_date
         ,     start_date + LEVEL        AS next_date
         FROM     extrema
         CONNECT BY     LEVEL <= 1 + end_date - start_date
    SELECT     a.a_date
    FROM          all_days     a
    LEFT OUTER JOIN     txndetails     t     ON     t.rundate >= a.a_date
                                     AND     t.rundate <  a.next_date
    WHERE   t.rundate     IS NULL
    ;Remember that all DATEs include hours, minutes and seconds. In the list of all days that you generate, the hours, minutes and seconds will probably be 00:00:00; be careful if the hours, minutes and seconds in your actual DATEs are not always 00:00:00.
    The query above shows missing dates between the first date that is actually in the table and the last date in the table.
    In practice, most people are interested in a deffierent range, such as all dates between two given parameters, or all dates within the last year.
    If that's the case, you don't need the sub-query extrema; you can use the paremters (or compute the values) in all_days, based on dual.
    For example, to get the most recent 365 days:
    WITH     all_days     AS
         SELECT     TRUNC (SYSDATE) + LEVEL - 365     AS a_date
         ,     TRUNC (SYSDATE) + LEVEL - 364       AS next_date
         FROM     dual
         CONNECT BY     LEVEL <= 365
    SELECT     a.a_date
    ...          -- Same as beforeEdited by: Frank Kulash on Nov 23, 2009 10:54 AM

  • How to create a standard SOAP request message from a given WSDL file?

    Hello,
    If I have a WSDL file (either from a .net web service or from the famous Amazon web services), what is the best way to generate a SOAP compliant request message?
    I am having trouble understanding the role of WSDL file in a given web service.
    Question 1:
    If I have a web service that is implemented using jaxm, how do I create/publish a WSDL file that describes the web service?
    Assuming I can generate a wsdl file, can I recreate the SOAP request message from the WSDL file automatically (that matches the original request, which is hand build by me?)
    Question 2:
    If I have a web service that is implemented using JAX-RPC, based on the WSDL file, can I simply generate a valid SOAP message (by some JAVA api) and get the response message directly?
    thanks...

    I have the same question ("Assuming I can generate a wsdl file, can I recreate the SOAP request message from the WSDL file automatically (that matches the original request, which is hand build by me?)")
    Have you already found an answer to this?

  • Finding an idoc number from a given sales document

    hi,
           please send me the code for the finding idoc number for a given sales document.
    it is urgent............
    thanks in advance..........

    I written the code to find the idoc number for given Purchase order number,so you can change the code depends on your requirement
    TYPE-POOLS: slis.
    tables : edid4 , edidc ,edids ,lfa1,teds2.
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    DATA: s_layout TYPE slis_layout_alv.
    DATA: text11 LIKE E1EDP02.
    DATA: text111 LIKE E1MBXYI.
    DATA: s_keyinfo TYPE slis_keyinfo_alv.
    DATA: v_repid TYPE syrepid.
    DATA: V_MSGNO LIKE T100-MSGNR.
    *DATA: V_TEXT(90).
    DATA : WA_EDIDS TYPE EDIDS.
    data : begin of itab_edids occurs 0,
       user like edids-UNAME,
       date like edids-CREDAT,
       time like edids-cretim,
       idoc like edids-docnum,
      MESSAGETYPE like edidc-MESTYP,
      VENDOR LIKE EDIDC-SNDPRN,
      name like lfa1-name1,
      icon(1),
       EXPAND TYPE C,
    end of itab_edids.
    data : itab type edid4.
    data : begin of itab_edidc occurs 0,
         doc_num like edidc-docnum,
         MESSAGETYPE like edidc-MESTYP,
       IDOCTYPE like edidc-DOCTYP,
       PARTNERNUMBER like edidc-RCVPRN,
       PARTNERTYPE like edidc-RCVPRT,
      MESSAGECODE like edidc-MESCOD,
      VENDOR LIKE EDIDC-SNDPRN,
      data like edidc-credat,
    *include structure edidc.
      end of itab_edidc.
    data : begin of itab_status occurs 0,
    idoc like edids-docnum,
    date_stauus like edids-logdat,
    status_counter like edids-countr,
    staTus like edids-status,
    *descrp like teds2-descrp,
    DESCRP(70),
    ponumber like  ekpo-ebeln,
    MESS LIKE edidc-MESTYP,
    *appdoc like edids-stapa1,
    end of itab_status.
    data : text like edid4-sdata.
    DATA: text1 LIKE E1EDK01.
    data : begin of itab_teds1 occurs 0.
            include structure teds1.
    data end of itab_teds1.
    *selection-screen begin of block sb with frame title text-001.
    *select-options:
       s_rsdat for edidc-CREDAT.
    *selection-screen end of block sb.
    DATA: f_fieldcatalog TYPE slis_fieldcat_alv.
    selection-screen begin of block sb with frame title text-001.
    parameters:
           p_su radiobutton group gp1,
           p_re radiobutton group gp1,
           p_al radiobutton group gp1.
    select-options:
        s_rsdat for edids-creDAT,
        s_user for edids-uname.
    selection-screen end of block sb.
    initialization.
    PERFORM INITIALIZATION.
    start-of-selection.
    PERFORM DATA_RETRIVAL.
    PERFORM DATA_BASED_SELECTION.
    PERFORM PASSING_ALV.
    *select docnum mestyp doctyp rcvprn rcvprt mescod credat into
    *table itab_edidc from edidc
    *where credat in s_rsdat.
    *CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    *EXPORTING
    *i_program_name = v_repid
    *I_INTERNAL_TABNAME = 'ITAB_STATUS'
    *CHANGING
    *ct_fieldcat = t_fieldcatalog.
    *CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    *EXPORTING
    *i_program_name = v_repid
    *I_INTERNAL_TABNAME = 'ITAB_EDIDS'
    *CHANGING
    *ct_fieldcat = t_fieldcatalog.
    s_LAYOUT-ZEBRA = 'X'.
    *s_LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL'.
    *s_LAYOUT-TOTALS_TEXT = 'TOTAL'.
    *&      Form  INITIALIZATION
          text
    -->  p1        text
    <--  p2        text
    FORM INITIALIZATION.
    V_REPID = SY-REPID.
      s_keyinfo-header01 = 'IDOC'.
      s_keyinfo-item01 = 'IDOC'.
    *s_layout-subtotals_text = 'SUBTOTAL TEXT'.
    *s_layout-key_hotspot = 'X'.
    *s_layout-expand_fieldname = 'EXPAND'.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name         = V_REPID
                I_INTERNAL_TABNAME     = 'ITAB_STATUS'
                I_INCLNAME = V_repid
           CHANGING
                ct_fieldcat            = T_fieldcatalog
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name         = V_REPID
                I_INTERNAL_TABNAME     = 'ITAB_EDIDS'
                I_INCLNAME = V_repid
           CHANGING
                ct_fieldcat            = T_fieldcatalog
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
    f_fieldcatalog-just = 'L'.
    MODIFY t_fieldcatalog FROM f_fieldcatalog
    TRANSPORTING just
    WHERE  ( fieldname = 'IDOC' OR FIELDNAME = 'STATUS_COUNTER' ).
    f_fieldcatalog-SELTEXT_L = 'Status Message'.
    MODIFY t_fieldcatalog FROM f_fieldcatalog
    TRANSPORTING SELTEXT_L
    WHERE  fieldname = 'DESCRP'.
    f_fieldcatalog-TECH = 'X'.
    MODIFY t_fieldcatalog FROM f_fieldcatalog
    TRANSPORTING TECH
    WHERE  fieldname = 'EXPAND'.
    f_fieldcatalog-REPTEXT_DDIC = 'Vendor Name'.
    MODIFY t_fieldcatalog FROM f_fieldcatalog
    TRANSPORTING REPTEXT_DDIC
    WHERE  fieldname = 'NAME'.
    *f_fieldcatalog-REPTEXT_DDIC = 'V Code 32122'.
    *MODIFY t_fieldcatalog FROM f_fieldcatalog
    *TRANSPORTING REPTEXT_DDIC
    *WHERE  fieldname = 'VENDOR'.
    ENDFORM.                    " INITIALIZATION
    *&      Form  DATA_RETRIVAL
          text
    -->  p1        text
    <--  p2        text
    FORM DATA_RETRIVAL.
    select  uname credat cretim docnum into  table
    itab_edids from edids
                   where credat in s_rsdat and
                          uname in s_user and
                          countr = ' '.
    select  uname credat cretim docnum from edids
    *APPENDING CORRESPONDING FIELDS OF TABLE itab_edids
                  where logdat in s_rsdat and
                         uname in s_user.
                         SELECT budat hkont belnr shkzg wrbtr FROM bsas
    *APPENDING CORRESPONDING FIELDS OF TABLE it_temp WHERE hkont = w_glacct
    *"wa_cb-gl_account
    *AND bukrs IN (so_bukrs-low)
    *AND budat < so_date-low.
      delete  adjacent duplicates from itab_edids.
      if not itab_edids[]  is initial.
         select docnum mestyp doctyp rcvprn rcvprt mescod SNDPRN credat into
        table itab_edidc from edidc for all entries in itab_edids
        where docnum = itab_edids-idoc.
      endif.
    LOOP AT ITAB_edids.
       READ TABLE ITAB_EDIDC WITH KEY  DOC_NUM = ITAB_EDIDS-IDOC.
       itab_edids-messagetype = ITAB_EDIDC-MESSAGETYPE.
       itab_edids-VENDOR = ITAB_EDIDC-VENDOR.
       MODIFY ITAB_EDIDS.
       CLEAR ITAB_EDIDS.
       ENDLOOP.
    DELETE ITAB_EDIDC WHERE MESSAGETYPE = 'ORDERS'.
    loop at itab_edids.
    read table itab_edidc with key doc_num  = itab_edids-idoc.
    if sy-subrc ne 0.
    delete itab_edids.
    endif.
    endloop.
    select docnum logdat countr status into table itab_status from edids for
       all entries in itab_edidc where docnum = itab_edidc-doc_num.
       LOOP AT ITAB_STATUS.
       READ TABLE ITAB_EDIDC WITH KEY  DOC_NUM = ITAB_STATUS-IDOC.
       ITAB_STATUS-MESS = ITAB_EDIDC-MESSAGETYPE.
       MODIFY ITAB_STATUS.
       CLEAR ITAB_STATUS.
       ENDLOOP.
      loop at itab_status.
        clear : text ,text1 , text11, text111, itab.
       select single descrp from teds2 into itab_status-descrp
                              where status = itab_status-STATUS AND
                                   LANGUA = 'E'.
       select single sdata into text from edid4 where
         DOCNUM =  itab_status-idoc and
         segnam = 'E1EDK01'.
    *MOVE: text        TO text1,
         text1-BELNR TO itab_status-ponumber.
          itab_status-ponumber = text1-belnr.
       move text+83(30) to itab_status-ponumber.
       MODIFY ITAB_STATUS.
       clear itab_status.
    IF itab_status-MESS = 'WMMBXY'.
       select single * from edid4  INTO ITAB where segnam = 'E1MBXYI' AND
                     HLEVEL = '02' AND DOCNUM = itab_status-idoc.
    MOVE  : ITAB-SDATA  TO TEXT111 ,
    text111-EBELN TO itab_status-ponumber.
    **text1-BELNR TO ponumber.
    ELSE.
    select single * from edid4  INTO ITAB where segnam = 'E1EDP02' AND
                     HLEVEL = '03' AND DOCNUM = itab_status-idoc.
    MOVE  : ITAB-SDATA  TO TEXT11 ,
    *text1-EBELN TO ponumber.
    text11-BELNR TO itab_status-ponumber.
    endif.
        MODIFY ITAB_STATUS.
        clear itab_status.
      endloop.
    ENDFORM.                    " DATA_RETRIVAL
    *&      Form  PASSING_ALV
          text
    -->  p1        text
    <--  p2        text
    FORM PASSING_ALV.
    s_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
    DATA: t_events TYPE slis_t_event.
    DATA: s_events LIKE LINE OF t_events.
    s_events-form = 'TOP_OF_PAGE'.
    s_events-name = 'TOP_OF_PAGE'.
    APPEND s_events TO t_events.
    s_layout-lights_fieldname = 'ICON'.
    sort itab_status by status_counter descending. " -
    mod3
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
           EXPORTING
                i_callback_program = v_repid
                is_layout          = s_layout
                it_fieldcat        = t_fieldcatalog
                i_callback_user_command = 'USER_COMMAND'
                i_tabname_header   = 'ITAB_EDIDS'
                i_tabname_item     = 'ITAB_STATUS'
                IT_EVENTS          = t_events
                is_keyinfo         = s_keyinfo
           TABLES
                t_outtab_header    = itab_EDIDS
                t_outtab_item      = itab_STATUS
           EXCEPTIONS
                program_error      = 1
                OTHERS             = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " PASSING_ALV
    *&      Form  DATA_BASED_SELECTION
          text
    -->  p1        text
    <--  p2        text
    FORM DATA_BASED_SELECTION.
    if p_su eq 'X'.
    *loop at itab_status where status = '53'.
    *select single stapa1 from edids into itab_status-appdoc
    where  docnum = itab_status-idoc and status = '53'.
    *delete itab_status where status ne '53'.
    *modify itab_status.
    *endloop.
    delete itab_status where status ne '53'.
    loop at itab_edids.
    read table itab_status with key idoc = itab_edids-idoc binary search.
    if sy-subrc ne 0.
    delete itab_edids.
    ELSE.
    *SHIFT ITAB_EDIDS-IDOC LEFT  DELETING LEADING '0'.
    MODIFY ITAB_EDIDS.
    endif.
    endloop.
    LOOP AT ITAB_STATUS WHERE MESS NE 'WMMBXY'.
    SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
    AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
    IF  WA_EDIDS-STATXT CA '&'.
    V_MSGNO = WA_EDIDS-STAMNO.
    IF V_MSGNO NE '000'. "----mod3
    CALL FUNCTION 'MESSAGE_PREPARE'
    EXPORTING
    msg_id = WA_EDIDS-STAMID
    msg_no = V_MSGNO
    MSG_VAR1 = wa_edids-stapa1
    MSG_VAR2 = WA_EDIDS-STAPA2
    MSG_VAR3 = WA_EDIDS-STAPA3
    MSG_VAR4 = WA_EDIDS-STAPA4
    IMPORTING
    MSG_TEXT = itab_status-descrp.
    CONDENSE ITAB_STATUS-DESCRP.
    ENDIF."---- mod3
    ELSE .
    ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
    ENDIF.
    *SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    *SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    MODIFY ITAB_STATUS.
    ENDLOOP.
    LOOP AT ITAB_STATUS WHERE MESS EQ 'WMMBXY'.
    SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    ITAB_STATUS-DESCRP = 'APPLICATION DOCUMENT POSTED'.
    MODIFY ITAB_STATUS.
    ENDLOOP.
    delete adjacent duplicates from  itab_edids comparing idoc.
    elseif p_re eq 'X'.
    loop at itab_status where status = '53'.
    delete itab_edids where idoc = itab_status-idoc.
    endloop.
    loop at itab_status.
    read table itab_edids with key idoc = itab_status-idoc binary search.
    if sy-subrc ne 0.
    delete itab_status.
    endif.
    endloop.
    LOOP AT ITAB_STATUS.
    SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
    AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
    IF  WA_EDIDS-STATXT CA '&'.
    V_MSGNO = WA_EDIDS-STAMNO.
    IF V_MSGNO NE '000'. "----mod3
    CALL FUNCTION 'MESSAGE_PREPARE'
    EXPORTING
    msg_id = WA_EDIDS-STAMID
    msg_no = V_MSGNO
    MSG_VAR1 = WA_EDIDS-STAPA1
    MSG_VAR2 = WA_EDIDS-STAPA2
    MSG_VAR3 = WA_EDIDS-STAPA3
    MSG_VAR4 = WA_EDIDS-STAPA4
    IMPORTING
    MSG_TEXT = itab_status-descrp.
    CONDENSE ITAB_STATUS-DESCRP.
    endif. "-----mod3
    ELSE .
    ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
    ENDIF.
    SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    MODIFY ITAB_STATUS.
    ENDLOOP.
    LOOP AT ITAB_EDIDS.
    SHIFT ITAB_EDIDS-IDOC LEFT  DELETING LEADING '0'.
    MODIFY ITAB_EDIDS.
    ENDLOOP.
    delete adjacent duplicates from  itab_edids comparing idoc.
    elseif p_al eq 'X'.
    delete adjacent duplicates from  itab_edids comparing idoc.
    LOOP AT ITAB_STATUS." WHERE MESS NE 'WMMBXY'.
    SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
    AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
    IF  WA_EDIDS-STATXT CA '&'.
    V_MSGNO = WA_EDIDS-STAMNO.
    IF V_MSGNO NE '000'. "----mod3
    CALL FUNCTION 'MESSAGE_PREPARE'
    EXPORTING
    msg_id = WA_EDIDS-STAMID
    msg_no = V_MSGNO
    MSG_VAR1 = WA_EDIDS-STAPA1
    MSG_VAR2 = WA_EDIDS-STAPA2
    MSG_VAR3 = WA_EDIDS-STAPA3
    MSG_VAR4 = WA_EDIDS-STAPA4
    IMPORTING
    MSG_TEXT = itab_status-descrp.
    CONDENSE ITAB_STATUS-DESCRP.
    endif. "----mod3
    ELSE .
    ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
    ENDIF.
    *SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    *SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    MODIFY ITAB_STATUS.
    ENDLOOP.
    endif.
    LOOP AT ITAB_EDIDS.
      if p_su EQ 'X'.
      itab_edids-icon = '3'.
      elseif p_re eq 'X'.
       itab_edids-icon = '1'.
       ELSE.
       read table itab_sTATUS with  key idoc = itab_EDIDS-idoc
                                   STATUS  = '53' ."binary search.
       IF SY-SUBRC EQ 0.
        itab_edids-icon = '3'.
       ELSE.
       itab_edids-icon = '1'.
       ENDIF.
       ENDIF.
    select single name1 from lfa1 into itab_edids-name where
                lifnr = itab_edids-vendor.
    SHIFT ITAB_EDIDS-IDOC LEFT  DELETING LEADING '0'.
    MODIFY ITAB_EDIDS.
    clear itab_edids.
    ENDLOOP.
    loop at itab_status.
    SHIFT ITAB_STATUS-IDOC LEFT  DELETING LEADING '0'.
    SHIFT ITAB_STATUS-STATUS_COUNTER LEFT  DELETING LEADING '0'.
    if itab_status-descrp is initial.
    select single descrp from teds2 into itab_status-descrp
                               where status = itab_status-STATUS AND
                                    LANGUA = 'E'.
    endif.
    MODIFY ITAB_STATUS.
    clear itab_status.
    endloop.
    sort itab_status by idoc.
    sort itab_edids by idoc.
    ENDFORM.                    " DATA_BASED_SELECTION
    *& Form TOP_OF_PAGE
    text
    FORM TOP_OF_PAGE.
    SKIP.
    ULINE.
    IF P_SU EQ 'X'.
    WRITE : / 'TITLE : SUCCESSFULLY POSTED IDOC', 50 'DATE :', SY-DATUM..
    ELSEIF P_RE EQ 'X'.
    WRITE : / 'TITLE : REJECTED IDOCS'  ,50 'DATE :', SY-DATUM.
    ELSEIF P_AL EQ 'X'.
    WRITE : / 'TITLE : ALL IDOCS' ,50 'DATE :', SY-DATUM.
    ENDIF.
    WRITE  :/9 'Successful-Green light  Unsuccessful-Red Light'.
    format color COL_TOTAL intensified on.
    WRITE : / 'NOTE  : DOUBLE CLICK TO SEE CORREPONDING IDOC AND PO'.
    WRITE :/9 'DOUBLE CLICK IDOC NO ON HEADER LIST'.
    WRITE :  'AND PO NUMBER ON DETAIL LIST'.
    format color off.
    ULINE.
    SKIP.
    ENDFORM. "TOP_OF_PAGE
    FORM user_command *
    --> UCOMM *
    --> SELFIELD *
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
    DATA: WA_IDOC9 LIKE EDIDC-DOCNUM.
    DATA: SELTAB     TYPE TABLE OF RSPARAMS,
          SELTAB_WA  LIKE LINE OF SELTAB.
    RANGES : R_DATE FOR EDIDC-CREDAT." SY-DATUM.
    IF ucomm = '&IC1'.
    if SELFIELD-SEL_TAB_FIELD = 'ITAB_EDIDS-IDOC'.
    READ TABLE itab_edids INDEX selfield-tabindex.
    IF sy-subrc = 0.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = ITAB_edids-IDOC
    IMPORTING
    OUTPUT = WA_IDOC9.
    *r_date-low = itab_edids-date.
    *r_date-high = itab_edids-date.
    *r_date-SIGN = 'I'.
    *r_date-OPTION = 'BT'.
    *append r_date.
    SUBMIT RSEIDOC2  WITH DOCNUM = wa_idoc9
    WITH CREDAT in R_DATE[]  AND RETURN.
    ENDIF.
    ELSEIF SELFIELD-SEL_TAB_FIELD = 'ITAB_STATUS-PONUMBER'.
    READ TABLE itab_STATUS INDEX selfield-tabindex.
    IF sy-subrc = 0.
    SET PARAMETER ID 'BES' FIELD itab_sTATUS-PONUMBER.
    CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDFORM..
    Thanks
    Seshu

Maybe you are looking for

  • Can't connect to local web server

    I'm not quite sure when this happened; I think it was upgrading to iPhoneOS 3.x but I can't swear to that (currently running 3.1). Anyway, the problem is that, whether from my app or even simply using Safari, I can't connect to a local webserver. If

  • How do you install the JDBC-OCI patch for a Windows NT4 IFS Installation?

    I am about to install IFS on a Windows NT4 Server. I dont understand the instructions for installing the JDBC-OCI patch. How do you install the JDBC-OCI drivers? Do I install them after installing Oracle 8.1.6? and before installing IFS? Is it necess

  • Count(1) vs count(*)

    Hey once again the same old question: Whats the difference between count(1) vs count(*) I have read this through many forums and looks like there's no difference and more specifically with latest version of database Optimizer is smart enough to trans

  • I want to use my old iphone 3GS

    Basically i restore my old iphone 3gs and i want to use it as a ipod touch. However i need to activate it. I read another post where you can use an old sim card to activate it but when i did it said it canot be used to be activated. Im not sure becua

  • Forreign currency valuation in FI-CA

    Hello Everybody, its me again. does anybody know the foreign currency valuation in FI-CA (not the one in FI Classic)? Does anybody know, if there is a possibility to fill the "trading partner" field in the created documents? The created postings have