Execute in order

I have stuck with a following problem for my system.
I have a CORBA server programmed in Java, which receives message from
other several applications. Lets say there are two applications(A and B) that send
message to my CORBA server. What CORBA server does it, it forwards
that message to other services.
Lets suppose A and B sends two messages to CORBA server called A1, A2 and B1 and B2.
I want A1 to execute first and then A2 but not A2 before A1.
But, B1 can execute at the same time as A1.
What i want to achieve is that if the message is from the same application
i want the message to be executed in the received order. That is A2 will
start executing after the execution of A1 is over. I can achieve this with
the use of threads. However I am stuck with how can i make my program
work so that if the message is from two different applications it can execute
at the same time, but if from the same applications i want it to order in
received order.
What i have in mind is making the instance of the class, that actually
does the processing , according to the application from which message
is received. But, I am stuck with how this can be achieved.
Can somebody give me hints or ideas to achieve above.
I hope i am clear.
Thanks a lot in advance.
the man in blues

I am still stuck.
Using named threads means that when the request from A is being processed
the class is blocked, that solves the problem of order for requests from A.
But i think it also prevents, the request from B to be processed in parallel.
I want the requests from B to be process in parallel with requests from
other applications, but requests from within the program must execute in
the received order? any ideas for thsis?
any help will be highly appreciated.

Similar Messages

  • CSS needs PHP to execute in order to render in Dreamweaver CS6

    When I view my web pages while in Dreamweaver, I need a piece of PHP code ( called ws_general.php ) to execute in order for the CSS to render.
    The pages do look fine when in a browser but I would like to solve this to better test my pages while in Dreaweaver.
    I have looked through various solutions but with no luck.
    I am using:  Windows 7 SP1
    Dreamweaver CS6, build 5842
    Thanks

    Murray,
    The raw code at the top of my page is as follows:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Jim Calvert Photographer - My Images</title>
        <meta name="description" content="Photography has been a modest pastime for most of my adult life but recently became a serious passion.  I feel very much at home outdoors in natural surroundings and enjoy the rewards of all-season photography">
        <meta name="keywords" content="Jim Calvert, wildlife, photography, landscapes, Mississauga, Canada ">   
        <meta http-equiv="content-language" content="en-ca">
        <meta name="copyright" content="Jim Calvert Photographer">
        <meta name="company" content="Lanmax Computer Solutions Inc.">
        <meta name="robots" content="index, follow">
        <meta name="Language" content="English">
        <link rel="stylesheet" type="text/css" media="all" href="ws_css/ws_general.php">                     <<<<<<<<<<<< this is the php that needs to run !
        <script type="text/javascript" src="ws_javascripts/rotator.js"></script>
    <style type="text/css">
    .style23 {
        font-size: 1.4em
    </style></head><body onload="rotateImage('RandPic')">
    <div id="wrapper">
        <div id="top">
    ......... etc, etc..
    And the ws_general.php code is:
    <?php
    Burning Foliage Colour Scheme
    Dark Green    #394635
    Green        #6D7D59
    MyGreen        #2AB305
    Light Green    #B8C39E
    Beige        #F1F2DB
    Light Beige    #ECD77A
    Light Brown    #CD9644
    Brown        #8A5823
    Dark Brown    #513311
    Very Dark Brown #1F1306
    header("Content-type: text/css");
    $main_bkgd = '#1F1306';
    $def_text = '#F1F2DB';
    $other_text = '#ECD77A';
    $link_text = '#2AB305';  /* 2010.08.23  */
    $borders = '#8A5823';
    $titles = '#CD9644';
    $def_menu = '#B8C39E';
    ?>
    /* Standard styles */
    body {
        position: relative;
        text-align: left;
        margin: 0;
        padding: 0;
        font:62.5%  Georgia, Lucida Grande, Lucida Sans Unicode, trebuchet ms, Arial,Helvetica,sans-serif;
        color: <?=$def_text?>;
        background-color: <?=$main_bkgd?>;
        background-position: top left;
        background-repeat: repeat-x;
    p {font-size: 1.2em; font-weight: normal; text-decoration: none; line-height: 1.7em; color:<?=$def_text?>; margin: 0; padding: 0 0 .7em 0; }
    h1, h2, h3 {font-weight: normal; }
    h1 {font-size: 1em; paddi..........etc, etc
    Does this help?
    Cheers

  • Do not execute - Maintenance Order ??

    Hi,
    There is an option before Release of MAintenance order called 'Do not execute ' , can we click that option if anyone have generated wrong maintenance order by change or by doing worng scheduling of Maintenance Plan. I think this option is for the same.
    Any suggestions.
    Thanks
    DM

    Hi,
    Yes, you could use that option.
    You just need to be aware that the function cannot be reversed.
    -Paul

  • Query taking 6mins to execute wityh order by clause, 3secs without orderby

    Dear All,
    The below query is taking nearly 6minutes time to execute (as i have order by clause in the query)
    /* Formatted on 2007/09/26 10:03 (Formatter Plus v4.8.0) */
    SELECT (SELECT DISTINCT grndate
    FROM fs_lg_grnhdr
    WHERE grnid = pl.grnid AND custwhid = pl.custwhid)
    grndate,
    pl.grnid,
    (SELECT DISTINCT vi.orderno
    FROM fs_lg_vendorinvoicehdr vi, fs_lg_grndtl gd
    WHERE gd.vendorinvoiceid = vi.vendorinvoiceid
    AND gd.custwhid = vi.custwhid
    AND gd.custwhid = pl.custwhid
    AND gd.grnid = pl.grnid
    AND gd.partid = pl.partid) orderno,
    pl.expirydate, pl.batchno, pl.packuom,
    NVL (pl.receiptqty, 0) receiptqty, pl.putawayid, pl.lineno,
    (SELECT customscontrolno
    FROM fs_lg_putawaydtl
    WHERE custwhid = pl.custwhid
    AND putawayid = pl.putawayid
    AND partid = pl.partid
    AND locationto = pl.locationid) cctrlno,
    (SELECT customspermitno
    FROM fs_lg_putawayhdr
    WHERE custwhid = pl.custwhid
    AND putawayid = pl.putawayid) cpermitno,
    (SELECT SUM (pdtl.pickqty)
    FROM fs_lg_pickticketdtl pdtl,
    fs_lg_picktickethdr phdr
    WHERE pdtl.custwhid = pl.custwhid
    AND pdtl.putawayid = pl.putawayid
    AND pdtl.putawaylineno = pl.lineno
    AND phdr.custwhid = pdtl.custwhid
    AND phdr.pickticketid = pdtl.pickticketid
    AND phdr.pickdate < '01-SEP-2007'
    AND pdtl.status = 'CM') previousoutqty,
    (SELECT SUM (pdtl.pickqty)
    FROM fs_lg_pickticketdtl pdtl,
    fs_lg_picktickethdr phdr
    WHERE pdtl.custwhid = pl.custwhid
    AND pdtl.putawayid = pl.putawayid
    AND pdtl.putawaylineno = pl.lineno
    AND phdr.custwhid = pdtl.custwhid
    AND phdr.pickticketid = pdtl.pickticketid
    AND phdr.pickdate BETWEEN '01-SEP-2007'
    AND '25-SEP-2007'
    AND pdtl.status = 'CM') presentoutqty,
    NVL ((SELECT SUM (qty)
    FROM fs_lg_internaltransdtl
    WHERE putawayid = pl.putawayid
    AND fromputawaylineno = pl.lineno
    AND custwhid = pl.custwhid),
    0
    ) toistqty,
    NVL ((SELECT SUM (qty)
    FROM fs_lg_internaltransdtl
    WHERE custwhid = pl.custwhid
    AND putawayid = pl.putawayid
    AND slno = pl.lineno),
    0
    ) fromistqty
    FROM fs_lg_partloads pl
    WHERE pl.partid = '2ERCH-2022'
    AND pl.custwhid = 'RNH-CSM'
    AND inventoryflag IN ('AVAIL','')
    AND pl.status = 'CM'
    AND pl.grndate <= '25-SEP-2007'
    ORDER BY grndate, pl.grnid, pl.putawayid, pl.lineno;
    But when i don't use the order by clause it is executing within 3 seconds. But i need to get the output in the sorted order as shown in the order by clause.
    Is there any way to avoid order by clause and to get the same output as with order by clasue, and i need to execute the query with less time.
    Please help me in this.
    Thanks in advance
    Mahi

    Dear Alok Kumar,
    When i execute sql>set autotrace traceonly statistics ;
    I am getting the below errors...
    SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
    SP2-0611: Error enabling STATISTICS report
    What could be the problem, how to resolve this to get the statistics?
    But when i use sql>set autotrace traceonly explain; i got the below output for the above query..
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE
    1 0 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_GRNHDR'
    2 1 INDEX (UNIQUE SCAN) OF 'SYS_C00293078' (UNIQUE)
    3 0 SORT (UNIQUE)
    4 3 NESTED LOOPS
    5 4 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_GRNDTL'
    6 5 INDEX (RANGE SCAN) OF 'SYS_C00293075' (UNIQUE)
    7 4 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_VENDORINVOICEH
    DR'
    8 7 INDEX (UNIQUE SCAN) OF 'PK_VENDORINVOICE' (UNIQUE)
    9 0 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_PUTAWAYDTL'
    10 9 INDEX (UNIQUE SCAN) OF 'SYS_C00293260' (UNIQUE)
    11 0 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_PUTAWAYHDR'
    12 11 INDEX (UNIQUE SCAN) OF 'SYS_C00293263' (UNIQUE)
    13 0 SORT (AGGREGATE)
    14 13 NESTED LOOPS
    15 14 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_PICKTICKETDTL'
    16 15 INDEX (RANGE SCAN) OF 'F_L_P_CWI_IND1' (NON-UNIQUE)
    17 14 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_PICKTICKETHDR'
    18 17 INDEX (UNIQUE SCAN) OF 'SYS_C00293202' (UNIQUE)
    19 0 SORT (AGGREGATE)
    20 19 NESTED LOOPS
    21 20 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_PICKTICKETDTL'
    22 21 INDEX (RANGE SCAN) OF 'F_L_P_CWI_IND1' (NON-UNIQUE)
    23 20 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_PICKTICKETHDR'
    24 23 INDEX (UNIQUE SCAN) OF 'SYS_C00293202' (UNIQUE)
    25 0 SORT (AGGREGATE)
    26 25 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_INTERNALTRANSDTL
    27 26 INDEX (RANGE SCAN) OF 'PK_INTERNALTRANSDTL' (UNIQUE)
    28 0 SORT (AGGREGATE)
    29 28 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_INTERNALTRANSDTL
    30 29 INDEX (RANGE SCAN) OF 'PK_INTERNALTRANSDTL' (UNIQUE)
    31 0 SORT (ORDER BY)
    32 31 TABLE ACCESS (BY INDEX ROWID) OF 'FS_LG_PARTLOADS'
    33 32 INDEX (RANGE SCAN) OF 'PK_PARTLOADS' (UNIQUE)
    Please advice me regarding this...
    Thanks in advance
    Mahi

  • Where do I execute the command in order to associate a protocol to an apllication?

    I need to associate a protocol ( shh) to an application ( putty).
    I found a knowledge base article that shows me the commands that I have to execute in order to do so, but it does not tell me where to do it from.
    so I need to know where to execute the following command:
    javascript:navigator.registerProtocolHandler('ssh','http://support.mozilla.com/value=%s','putty');
    I found this on the knowledge base article at:
    http://support.mozilla.com/en-US/kb/The+protocol+is+not+associated+with+any+program#Associate_the_protocol_with_a_program_in_Firefox

    On the Windows platform an application needs to create the correct registry keys to register a protocol. Then Firefox will find it via a registry scan. The other methods are for registering a protocol on other platforms like Linux and Mac.
    See http://kb.mozillazine.org/Register_protocol

  • Maintenance Plan - Tasks are not executing in the order they were created

    I've created a new maintenance plan to perform differential backups but the tasks I created don't necessarily seem to execute in order all the time.  These are the tasks and order assigned when I created the plan using the Maintenance Plan Wizard:
    Back Up Database (Differential)
    Clean Up History
    Maintenance Clean Up Task
    Here's the deal...When it executes in the order they were created (above), all my old backups are deleted successfully.  However, there have been instances where, for example, the Maintenance Clean Up task executes before the
    Clean up History task.  When this happens, only one of my backup files is deleted successfully but not the second (I have two .bak files needing to be removed).  Furthermore, I noticed that the backup that wasn't deleted when it should
    have gets deleted at the next increment when new backups are created.
    Again, this does not happen when the tasks run in the sequence shown above.  Only one old backup gets deleted (instead of two) when one of the above item is out of sequence.  Strange behavior to say the least.
    Any feedback on this will be appreciated!

    If you do not set up precedence constraints it runs all tasks at the same time.
    Please see "8. To define a workflow between tasks:"
    http://msdn.microsoft.com/en-us/library/hh710041.aspx

  • Transfer Order: discrepancies between GI and GR management

    Hi everybody!
    I'll appriciate your suggest to manage this critical scenarios:
    Transfer Order from Pant A to Plant B (both the plants belong to the same company)
    Case 1:
    for an item GI qty  is major than GE qty
    For an item  GI qty is less then GE qty
    Case 2:
    for an item the material code entered into STO and into Delivery and so registered at GI moment, is different from that effectively delivered and received at receiving plant.
    Which are the necessary material documents that have to be created  and so the necessary stock adjustements that  have to be executed in order to solve every one discrepancies above described?
    Many thanks
    Roberta

    Many thanks for the answers;
    I'll try to explain better than before the scenarios
    Case 1:
    for an item GI qty is major than GE qty
    --> do an addition Goods receipt for the remaining in-transit quantity.
    alternative cancel the goods receipt, cancel the goods issue, redo the case with correct quantities
    The case is that in the Delivery created against the STO the GI qty registered is major than that effectively receipt from the receipt plant; If I cancel the movements I've not traces if the discrepancies happened
    For an item GI qty is less then GE qty
    --> how can this be possible? anyhow, cancel the goods receipt and post it with the correct quantity.
    alternative : cancel the goods receipt, cancel the goods issue, redo the case with correct quantities
    The case is that in the Delivery created against the STO the GI qty registered is less  than that effectively receipt from the receipt plant ( the whareauser has made a mistake during the picking activity); If I cancel the movements I've not traces if the discrepancies happened
    Case 2:
    for an item the material code entered into STO and into Delivery and so registered at GI moment, is different from that effectively delivered and received at receiving plant.
    cancel the goods receipt, cancel the goods issue, redo in SAP with material that you shipped physically.
    If I cancel the movements I've not traces if the discrepancies happened

  • Sale Order change BAPI - Storage loc not updated

    Hi Everybody,
    Iam using "BAPI_SALESORDER_CHANGE", to change the sale order items.
    First iam calling above bapi with switch B, for new pricing & then second time for material change.
    When i change any material number, it is getting updated correctly.
    But the storage location, even though iam passing in the bapi it is not updated, & is blank - updation flag is also passed.
    When i execute sale order change again it is updated - ie, for any material change for first bapi call, storage loc is not updated - for 2nd bapi call storage loc is updation - for same input in both the cases.
    Is there any way to update the storage loc is first call of sales order change bapi.
    Below is the parameters iam passing in bapi :
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          SALESDOCUMENT      = LS_SALESDOCUMENT
          ORDER_HEADER_IN    = LT_HEADER_IN
          ORDER_HEADER_INX   = LT_HEADER_X
        TABLES
          RETURN                            = LT_RETURN
          ORDER_ITEM_IN               = LT_ITEMS
          ORDER_ITEM_INX             = LT_ITEM_X
          ORDER_CFGS_REF          = LT_CFGS_REF
          ORDER_CFGS_INST         =  LT_PARTS
          ORDER_CFGS_VALUE     = LT_VALUES
          ORDER_CFGS_BLOB        = LT_CUBLOB
          ORDER_CFGS_VK            = LT_CUVK
          ORDER_CFGS_REFINST   = LT_CUREF
          SCHEDULE_LINES            = LT_SCHEDULE_L
          SCHEDULE_LINESX         = LT_SCHEDULE_X
          ORDER_TEXT                   = LT_TEXT
          CONDITIONS_IN                = LT_CONDITION_L
          CONDITIONS_INX              = LT_CONDITION_X.
    Any help is appreciated.
    Regards,
    Nagarajan.J

    Hi,
    Storage location is updated only when same sale order bapi is called another time with required details.
    rgs,
    Nagarajan J

  • Commission Group not picking in sales order

    Hi
    We have created the Commission Group (ie. 6 ) in product master in R/3 and successfully downloaded in to CRM product master.  When we create the sales order in CRM the relevant commission is not being picked up in the order from the product master. When we check at the item level of the order under general tab by default the commission grp is taken as 1 instead of 6 which was maintained in the product master.
    All the other date like Vol rebate grp , Product group and product hierarchy has picked up correctly from product master. Only Commission grp is not getting picked as maintained in product master.
    Plz help.
    Rgds
    Praveen Raj

    Hi Dave,
    As you suggested first execute PP order settle to sales order which I have done. After that I have done RA on Sales Order through KKA3. It has saved the record and value flows correctly. After that while I am going to VA88 for Sales Order settlement it is asking for setlment rule which I doubt. If the Sales order is sender what will be its receiver ? During PP order settle to sales order it was PP order in sender and receiver category was material and reciver was Sales document Numeber. What will be its reciver when Sales order is sender.
    Kindly need your valuable suggestion ...
    Best Regards,
    Samrat Roy
    Edited by: Samrat Roy on Feb 10, 2012 2:49 AM

  • Automatic Batch Determination during Goods issue of Production Order

    Hi,
    Iam trying to set up automatic batch determination during Goods Issue against a production order. My requirement is system should automatically run the batch determination similar to the case in production order.
    I have set up all the required configs for batch determination. But to get the batch I need to click on the batch determination button. What I need is without clicking on anything. How can I do this. Whats the config needed
    Thanks and Regards
    Enrico

    Dear Enrico
    It is required lot of set up both in production order parameters and Batch Managemnet .I am providing you a summery of it .
    Configuration Required for your above issue are as follows :
    1.Activated Batch Management in the Material Master-MRP2 view and Work Scheduling view of the FG
    2.check material master MM02, tab MRP2 and set field "Batch Entry" to value 3 here
    4.You maintain a Search Procedure in OPL8 - Order Type Dependent parameters .Before that you should have Batch serach strategy :The sequence of steps are as follows -
    Create Condition Tables
    Create Access Sequences
    Create Strategy Types
    Batch Search procedure definition
    Batch Search procedure allocation and check activation
    Define Selection classes
    Define sort rules
    Maintain Batch Allocation Strategy Number Ranges
    All the above are available in the Path - SPRO --->Logistics-General ---> Batch Management ---> Batch Determination and Batch Check
    5.Maintain the setting in T.code OPKP (production scheduling profile). Select automatic batch creation on order creation.
    6.If u want to execute the batch determination for components in the component overview of production order , then u have to create batch search strategy at COB1
    7.If u want to execute during order confirmation u have to create batch search strategy at MBC1.
    Refer the below link for your farther reference :
    http://help.sap.com/saphelp_47x200/helpdata/en/25/28428b4f7811d18a150000e816ae6e/frameset.htm
    Hope this will be useful
    Regards
    JH
    Edited by: Jiaul Haque on Jun 22, 2010 11:28 PM

  • Sales Order in ATP in ECC

    Hi All,
    While executing Sale order in the R/3 system we are getting this message.
    Error in calling up function 'BAPI_APOATP_CHECK' in APO server 'xxxx':
    Exception condition "OM_ERROR" raised.
    In SMQ1 in ECC -- Outbound Queue
    blocked the 3 Queues for calling below functions
    /SAPAPO/CIF_CBASE_INB
    /SAPAPO/CIF_SHP_LOCK
    /SAPAPO/CIF_SL_DOC_INBOUND
    Error is Multi-level error propagation carried out.
    I have transfred material, plant, Class, BOM and Work center.
    Please give me the What master data need for ATP checks in Sales Order.
    Please help us in this issue.
    Thank you,
    Durga

    There could be various reasons for this error. Is your ATP check already working in simulation in APO? (TX: /sapapo/ac04). Check your logical system setup in R/3, also check the RFC destination to APO.

  • ORDER BY ON INDEX COLUMN IS TAKING MORE TIME

    Hi,
    The following SQL query when executed with ORDER BY is taking 3 mins. If we remove ORDER BY it is taking 32 secs. We have an index on ID which is used in ORDER BY clause. Can any one tell us what could be wrong? My assumption is ORDER BY on an index column should not take that much of time. Is there any configuration that we need to make or missing?
    We are on 11g R2.
    Query is
    SELECT * FROM (SELECT /*+ FIRST_ROWS */ a.*, ROWNUM rnum  FROM
    (SELECT DISTINCT ENTITYID AS a1, ENTITYCLASS AS a2, STARTDATE AS a3, ENDDATE AS a4, EXTERNALOBJECTID AS a5, LASTMODIFIEDUSER AS a6, ID AS a7, PARTITION AS a8,    DESCRIPTION AS a9, NAME AS a10, PERMISSIONS AS a11, CREATEDDATE AS a12, ACTIVITY AS a13, ENTITYVERSION AS a14, EXTERNALNAME AS a15, NOSPEC AS a16,
    ADMINSTATE AS a17, OWNER AS a18, LASTMODIFIEDDATE AS a19, EXTERNALARRANGEMENT AS a20, OBJECTSTATE AS a21, EXTERNALMANAGEMENTDOMAIN AS a22,
    CREATEDUSER AS a23, SPECIFICATION AS a24 FROM Service WHERE (ENTITYCLASS = 'SERVICEDAO') ORDER BY ID ASC)
    a WHERE ROWNUM <= 25) WHERE rnum > 0Here is the explain plan link
    https://stbeehive.oracle.com/content/dav/st/Rama%20%20Public%20Workspace/Public%20Documents/explainplan_13339959.JPG
    https://stbeehive.oracle.com/content/dav/st/Rama%20%20Public%20Workspace/Public%20Documents/explainplandetailed_13339959.JPG
    Thanks,
    Rama
    Edited by: user9954330 on Nov 8, 2011 1:16 AM

    user9954330 wrote:
    We replaced the hint with ALL_ROWS. With this change , we observed the query performed worse. Any other pointers? I will provide the other details as given in the template shortly.
    Thanks,
    RamaThread: HOW TO: Post a SQL statement tuning request - template posting
    HOW TO: Post a SQL statement tuning request - template posting

  • Problem with nested select in procedure and order by

    Hi,
    I have this procedure:
    CREATE OR REPLACE PROCEDURE Mkt_Flussi_Giornalieri2
    ( idGruppo IN VARCHAR2
    , dataInizio IN DATE
    , dataFine IN DATE
    , startRow IN NUMBER
    , endRow IN NUMBER
    , column_order in varchar2
    --, order_name in varchar2
    , recordsetCursor OUT SYS_REFCURSOR
    , countRow OUT NUMBER
    ) IS
    order_clause varchar2(200) := ' ';
    sql_stm varchar2(32000);
    BEGIN
    IF column_order IS NOT NULL
    THEN
    order_clause := column_order;
    ELSE
    order_clause := ' stato DESC ';
    END IF;
    dbms_output.put_line('clausola:'||order_clause);
    sql_stm:='
         SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || '' - '' || MKT_FLOW.flow_description || ''('' || temp.exec_seq || '')'' AS descrizioneFlusso,
    TO_DATE(temp.date_id,''yyyymmddhh24miss'') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''dd/mm/yyyy'')||'' h. ''||TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''hh24:mi'') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= :1
          AND TRUNC(end_time) <= :2
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=:3
      AND NVL (mkt_flow.fk_provider_id, '' '') =
                                                         NVL (mp.provider_id, '' '') )
      WHERE ROWNUM <= :4
      MINUS
      (SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || '' - '' || MKT_FLOW.flow_description || ''('' || temp.exec_seq || '')'' AS descrizioneFlusso,
    TO_DATE(temp.date_id,''yyyymmddhh24miss'') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''dd/mm/yyyy'')||'' h. ''||TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''hh24:mi'') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= :5
          AND TRUNC(end_time) <= :6
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=:7
      AND NVL (mkt_flow.fk_provider_id, '' '') =
                                                         NVL (mp.provider_id, '' '') )
      WHERE ROWNUM <= :8
      )  ) ORDER BY :9 ' ;
    dbms_output.enable(30000);
    dbms_output.put_line(sql_stm);
    OPEN recordsetCursor FOR sql_stm USING dataInizio, dataFine, idGruppo, endRow, dataInizio, dataFine, idGruppo, startRow, order_clause;
       SELECT COUNT(*) INTO countRow FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || ' - ' || MKT_FLOW.flow_description || '(' || temp.exec_seq || ')' AS descrizioneFlusso,
    TO_DATE(temp.date_id,'yyyymmddhh24miss') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,'yyyymmddhh24miss'),'dd/mm/yyyy')||' h. '||TO_CHAR(TO_DATE(temp.date_id,'yyyymmddhh24miss'),'hh24:mi') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= dataInizio
          AND TRUNC(end_time) <= dataFine
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=idGruppo
      AND NVL (mkt_flow.fk_provider_id, ' ') =
                                                         NVL (mp.provider_id, ' '));
    END Mkt_Flussi_Giornalieri2;
    /When I call the procedure, from java, I receive this error:
    >
    Caused by: java.sql.SQLException: invalid column index
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:385)
         at it.edison.markettracker.dao.spring.VistaFlussiGiornalieriDaoImpl.mapRow(VistaFlussiGiornalieriDaoImpl.java:155)
         at it.edison.markettracker.dao.spring.VistaFlussiGiornalieriDaoImpl.mapRow(VistaFlussiGiornalieriDaoImpl.java:1)
         at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
         at org.springframework.jdbc.core.JdbcTemplate.processResultSet(JdbcTemplate.java:1124)
         at org.springframework.jdbc.core.JdbcTemplate.extractOutputParameters(JdbcTemplate.java:1085)
         at org.springframework.jdbc.core.JdbcTemplate$5.doInCallableStatement(JdbcTemplate.java:997)
         at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:936)
         ... 26 more
    When I call the procedure from toad in this way:
    SET serveroutput ON
    DECLARE
    TROVATI SYS_REFCURSOR;
    NUMERO_TROVATI NUMBER;
    BEGIN
          DBMS_OUTPUT.ENABLE(30000);
          dbms_output.put_line('INIZIO');
          Mkt_Flussi_Giornalieri2(1, trunc(sysdate), trunc(sysdate), 100, 50, null, TROVATI, NUMERO_TROVATI);
          dbms_output.put_line('RECORD TROVATI:'||NUMERO_TROVATI);
    END; I don't receive any error messages but I don't see any message.
    Why this behaviour? I work on this procedure from the last monday. Please help me. I need to call the procedure from java.
    Thanks, bye bye.
    Edited by: Abdujaparov on Mar 5, 2009 3:44 PM

    Hi,
    I have solved the problem, I forgot a parameter in the select, so java tells the an error. But now I have another problem. The procedure doesn't execute the order by. I pass the couple column_name order_type in a string as ("provider_description desc") dinamically but the procedure doesn't execute the ordering. Why?
    The problem is in the dynamic query, I think:
    sql_stm:='
         SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, provider_link, log_info FROM
      (SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, provider_link, log_info FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || '' - '' || MKT_FLOW.flow_description || ''('' || temp.exec_seq || '')'' AS descrizioneFlusso,
    TO_DATE(temp.date_id,''yyyymmddhh24miss'') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''dd/mm/yyyy'')||'' h. ''||TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''hh24:mi'') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= :1
          AND TRUNC(end_time) <= :2
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=:3
      AND NVL (mkt_flow.fk_provider_id, '' '') =
                                                         NVL (mp.provider_id, '' '') )
      WHERE ROWNUM <= :4
      MINUS
      (SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, provider_link, log_info FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || '' - '' || MKT_FLOW.flow_description || ''('' || temp.exec_seq || '')'' AS descrizioneFlusso,
    TO_DATE(temp.date_id,''yyyymmddhh24miss'') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''dd/mm/yyyy'')||'' h. ''||TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''hh24:mi'') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= :5
          AND TRUNC(end_time) <= :6
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=:7
      AND NVL (mkt_flow.fk_provider_id, '' '') =
                                                         NVL (mp.provider_id, '' '') )
      WHERE ROWNUM <= :8
      )  ) ORDER BY :9' ;
    OPEN recordsetCursor FOR sql_stm USING dataInizio, dataFine, idGruppo, endRow, dataInizio, dataFine, idGruppo, startRow, order_clause;Where order_clause is defined so:
    IF column_order IS NOT NULL
    THEN
    order_clause := column_order;
    ELSE
    order_clause := ' stato DESC ';
    END IF;If I insert manually a name of a column and a type of ordering (asc or desc) the ordering is executed correctly. How can I solve this issue?
    Thanks, bye bye.

  • EDI1 Condition type not determined automaitcally in ORDERS process

    Hi Experts,
             We are in the process of creating the Sales order by receiving EDI data from customer and converting in to IDOC format and trying to create the sales order. While executing the ORDERS IDOC message type sales order is getting created successfully. But Condition type EDI1 is not getting activated even after maintaining the value in E1EDP01-VPREI.
                       During foreground mode, if we maintain the EDI1 condition type manually then, its accepting without any issue. But during IDOC process its not getting added automatically.
    Please give your suggestion on this.
    Warm Regards,
    Nag

    Problem with the IDOC FM. We identified and rectified the issue. Thank u

  • Ship to party PO number line item field updating in ORDERS IDOC

    Hi Experts,
             We are in the process of creating the Sales order by receiving EDI data from customer and converting in to IDOC format and trying to create the sales order. While executing the ORDERS IDOC message type sales order is getting created successfully.
    But our requirement is, we want to store the customer contract details in the sales order. So we identified the "Ship to Party Purchase Order data" in ORDERS Tab in the sales order. While executing, in the Header level the Contract number is getting updated against Ship to party Contract number field.
            But during item level process, system is not updating the contract line item number field even though we maintained the value in E1EDP02-ZEILE for the QUALF 044.
    Note: The similar scenario, we want to capture the Customer Purchase order number & line item number. For this we maintained the value in E1EDP02-ZEILE for the separate QUALF, its working fine.
    Kindly give your valuable feedback on this issue also
    Regards,
    nag

    Hi
    See Note 753153 - FAQ: Customer-functions in IDOC_INPUT_ORDERS. Check if EXIT_SAPLVEDA_001 gives you any possibility to do it.
    I hope this helps you.
    Regards
    Eduardo

Maybe you are looking for

  • USB ports don't work after resuming from standby with Windows 8 on X230 tablet

    I have just done a clean install of Windows 8 on my X230 tablet.  Before installing Windows 8 I installed the most recent BIOS for this machine (version 2.50).  After installing Windows 8 I installed System Update from the Lenovo Website and download

  • ID3 Tags in iTunes 8

    The ability to change ID3 tags seems to have disappeared from the Advanced menu. Anyone know where it has gone? Nathanael

  • Toast 7 and burning DVD's

    Hey everyone I just wanted to let you know that I bought Toast 7 and it is by far the best CD/DVD burning software out there. The new stuff they have put on there just makes it worth every penny! One thing I wanted to let you all know though is that

  • Parent Table - Child Form(bounded task region)- Commit-Rollback Button's

    Hello, Here's my simple scenario: Jdev 11.1.1.2 One Am(datacontrol). One vertical panel splitter On top A panel collection with a read-only table(employees VO), The table lists just a few of the attributes, so it's really just for browsing, and a too

  • Nokia E5 camera problems.

    Hi, I am a proud owner of Nokia E5-00 andI have a few queries regarding the camera features. 1.How to turn off the camera sound? 2.When I take a pic with flash ON, a cloudy-hazy-whitish image is taken. Solution? Thanks in advance. Anupam Roy