Abandoned Order Service Query for Abandoned vs Lost Orders

We are seeing one issue Abandoned Order Service for Identifying order as abandoned in ATG 10.2.
ATG Document says abandonmentInfo is created when Abandoned Order is found.
For each abandoned order found, the AbandonedOrderService does the following:
1. Adds the order to the list of abandoned orders in the user’s abandonedOrders profile property.
2. If necessary, creates an abandonmentInfo item for the order; then updates the item with the relevant information:
The state property is set to ABANDONED.
The abandonmentDate property is set to the current date and time.
If the abandonmentInfo item is new, the abandonmentCount property is set to 1. Otherwise, it is incremented.
However code is querying abandonmentInfo.orderLastUpdated. is it not supposed to be orderLastUpdated from Order? Also I am seeing same query is used for finding Abandoned Order , Lost Order?
is it a ATG Defect? Any thoughts?
**** debug       Wed Apr 22 19:46:45 IST 2015 1429712205462 /atg/commerce/order/abandoned/AbandonedOrderService Executing abandoned order query: (((state = "INCOMPLETE" AND abandonmentInfo.orderLastUpdated < "Tue Apr 21 19:46:45 IST 2015") AND abandonmentInfo.state = "REANIMATED") OR ((state = "INCOMPLETE" AND abandonmentInfo.orderLastUpdated < "Tue Apr 21 19:46:45 IST 2015") AND abandonmentInfo.state IS "null"))
**** debug       Wed Apr 22 19:47:16 IST 2015 1429712236307 /atg/commerce/order/abandoned/AbandonedOrderService Executing lost order query: (((state = "INCOMPLETE" AND abandonmentInfo.orderLastUpdated < "Tue Apr 21 19:47:16 IST 2015") AND abandonmentInfo.state != "LOST") OR ((state = "INCOMPLETE" AND abandonmentInfo.orderLastUpdated < "Tue Apr 21 19:47:16 IST 2015") AND abandonmentInfo.state IS "null"))

to purge the incomplete order
- write a scheduler
- write a method to retrieve orders u want to purge - for ex - ordertools.getOrderToPurge ( fire query like " state = 'Incomplete' ")
- get the order id's and
- call orderManager.removeOrder(orderId).
Edited by: user11215973 on Mar 26, 2013 8:05 AM

Similar Messages

  • Issues in Web service created for updating the Sales Order

    Hi All,
    We created a Web service using the Web service tool in CRM 7.0 ( Using the Component WS_DESIGN_TOOLS )
    Web service was created for three modes such as READ, CREATE and CHANGE Modes.
    READ Web Service we tested and its working fine as we were able to see the data for an existing Sales Order in the Web Service.
    We expect that the Change Web Service will update the data of an existing Sales Order.
    Through our Web service we are passing the Order GUID ,Order ID and some Header Fields as well as Item Fields but  the in the Web Service we are getting a message that Web service executed successfully but the CRMD_ORDERADM_H Table isnot getting updated.
    What could be problem.
    Any suugestions will be highly appreciated.
    Regards,
    Sijo

    Hi Gourav,
    I checked in SICF for the Webservice name created.
    this is the service path
    /default_host/sap/bc/srt/rfc/sap/ for the corresponding Web Service created in DEV 200 Client.
    I checked in SOAMANAGER and saw  that the  endpoitnts were zero.
    the Search Operation for Webservice have got three query fields mainly
    Object Id, Posting Date,Procees Type
    If we give Process Type
    sign - blank
    option - blank
    low - YPO ( Custom )
    High - blank we are getting 126 entries.
    and if we check for the Process Type YPO (Custom ) in CRMD_ORDERADM_H Tbale also we are getting the same no of entries.
    but only for option BT , for Posting Date issue is thr..
    Any inputs to move forward will be highly appreciated.
    Regards,
    Sijo.
    Edited by: sijokjohn85 on Mar 5, 2010 10:52 PM

  • Query for details of  Sale order , Invoice and COGS

    I Need the report cointing following based on month & Business partner
    Sale order, Sale Amount, Due date, Invoice Amount, Last Invoice date, COGS amount

    Hi Anantha,
    Please check below link and modify according to your requirement.
    Sales Order Query for  in SAP B1
    Query - Sales Orders linked to Deliveries
    My Top SQL Queries for SAP Business One
    Hope this helps
    Regards::::
    Atul Chakraborty

  • QUERY FOR STATUS OF SALES ORDER

    Hi Experts,
    Here my Client required one query for status of the Sales Order line item wise and by when material will be  ready after giving clients PO no. sales order NO. Clients name etc.
    Please give me guide to write this query.
    Regards
    Madhu

    Hi,
    Try this link,
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/d2/cb4759455611d189710000e8322d00/frameset.htm
    Cheers,
    Shailabh

  • Query for Alert on production order to be released

    Dear all users and experts,
    I need a query for getting an alert on production orders to be released (from planned status to release status) by whether reading the release date of production orders created from 'order recommendation window' or by reading the due date of production order and substract the lead time(days) of the item from its due date or by any means you know best.
    Thanks and best regards,
    Farhan Sufi

    Hi Gordon and Joseph,
    Thanks to both of you for giving me queries.
    Gordon, I made 3 production orders for testing from MRP order recommendation window from which 2 production orders has release date of today 9th July, 2010 (due date 12th July monday) and the 3rd one has release date of after weekend i.e. 12th July 2010 (due date is 13th July). release dates are calculated by MRP acording to the items' lead time and due date.
    Gordon, when I applied your query It gave me msg 'no data was found as a result of this selection criteria' Can you explain what your query will give me in result?
    where as Joseph, when I applied your query on alert, it gave me all 3 production orders as an alert to be released. I was expecting it will give me alert for 2 production order for today as their release date in MRP is today(9th July, 2010) and the alert for 3rd production order should come on 12th July and not today.
    what I understood your query is displaying all production orders which have status 'planned' regardless of their release date.is it?
    Joseph can you edit this query in such a way that It should consider the release date (calculated from due date and lead time in MRP order recommendation window) and display only those production orders which should be released today and exclude those which have release date in future. so that I can get alert for only those production orders which should be released today.
    I hope good response from both of you
    Thanks and best regards,
    Farhan

  • Query for all open sales order with a date range

    Hi Experts!
    I wrote this query that will look up all open sales order of a particular customer and how much was served:
    SELECT T0.[DocNum] 'OS #', T0.[DocDate] 'Posting Date', T0.[CardName] 'Customer',  T1.[Dscription] 'Item Description',T4.[SalUnitMsr] 'Sales UOM', T4.[InvntryUom] 'Invty UOM', T1.[UseBaseUn] 'Use of Invty UOM' , T1.[Quantity], T1.[Quantity]-T1.[OpenQty] 'Served Qty', T1.[OpenQty] 'Unserved Qty' FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE T0.[DocStatus] = 'O' and T0.[CardName] =[%0]
    However, I don't know how to input a parameter for the date range in a query.  Can anyone help with this issue?
    Your input will be highly appreciated.
    Warm regards,
    Jen

    Hiiiiiii
             Try This.....
    SELECT T0.DocNum 'OS #', T0.DocDate 'Posting Date', T0.CardName 'Customer', T1.Dscription 'Item Description',T4.SalUnitMsr 'Sales UOM', T4.InvntryUom 'Invty UOM', T1.UseBaseUn 'Use of Invty UOM' , T1.Quantity, T1.Quantity, T1.OpenQty 'Served Qty', T1.OpenQty 'Unserved Qty' FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE T0.DocStatus = 'O' and T0.CardName ='[%0]' and (T0.DocDate>='[%1]' and T0.DocDate<='[%2]')
    Regards,

  • Query for Exploding all production orders needed to fulfil a sales order

    I am trying to write a query that explodes all the multiple levels BOMS and brings back a list of production orders that would need to be raised to fulfil a particular sales order.
    SELECT T0.[DocNum], T0.[CardCode], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T2.[TreeType] FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T0.[DocNum] = [%0] AND T2.[TreeType] = (N'P')
    This is what i have at the moment, this only goes down one level, i cant think how i might drill down to lower levels. Any ideas?
    Thanks

    It will be a tough query to build.
    Check this for just adding one level:
    SELECT T0.DocNum, T0.CardCode, T0.CardName, T1.ItemCode, T1.Dscription, T1.Quantity
    FROM ORDR T0
    INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE T0.DocNum = [%0\] AND T1.ItemCode IN (SELECT Code From OITT)
    UNION ALL
    SELECT T0.DocNum, T0.CardCode, T0.CardName, T3.Code, T4.ItemName, T1.Quantity*T3.Quantity
    FROM ORDR T0
    INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITT T2 ON T1.ItemCode = T2.Code
    INNER JOIN ITT1 T3 ON T2.Code = T3.Father AND T3.Code IN (SELECT CODE FROM OITT)
    INNER JOIN OITM T4 ON T3.Code = T4.ItemCode
    WHERE T0.DocNum = [%0\]
    Thanks,
    Gordon

  • Query for getting Outtanding Production Order items

    Dear Experts,
    With a query, please advice how I can get a list of outstanding Production Order items?
    Much Thanks in Advance for your advice.
    Warmest Regards,
    Chinho

    Production Reports --->Open Item List --.> Production Orders

  • Service copied for contract to Purchase Order

    Deal all,
    when i adopt service from contract to purchase order the quantity is automatically changed to 1 always, whether i have defined the quantity of service more than 1.
    Please give the solution why this is happening, is this the standard setting or where can i do the needful.
    Pankaj

    Hi,
    Pl. elaborate whether the quantity 1 is appearing at Item Overview level or at Item Details level. At the item overview level the quantity will aleays be 1 with unit of measure as AU. At item details, you will be able to view the actual quantity of services copied from contract.
    Regards,
    Prashant
    - Pl reward points if answer is helpful to you

  • Double record make it to single record in Query for perticular period in BW

    Hi
    In my ODS some of the records got doubled  from Mar 17th to May 31st  but from 1st of june its correct , its Open orders, i dont want to reload data again to that ODS , because its Open orders anyways its going to be close after some time  , automatically it will become "0".
    So i want tocalculate in query itself to make it single
    please some one suggest me how can i do for that perticular period divided by 2
    for example  :
    Open Orders (its In ODS)
    120
    140
    20
    10
    50
    I need output should be 
    60
    120
    10
    5
    25
    Note : BW 3.1 Version
    Thanks,
    GAl
    12

    hi,
       You can create a a formula variable with replacement path on the Period(replace with key of Posting Date/Calday) and use it for comprision in the fomula like below
    if posting date is in between date1 and date2
      order value = order value/2.
    else
    ordervalue = ordervale.
    In Bex Query designer you will have the below formula
    (posting date formula variable >date1 and posting date formula variable <date2) * (Ordervalue/2) + ordervalue
    But also note that when the order is closed the value of order value will net become zero since the value is doubled up in the DSO , when the delta records come into DSO the order will be closed but the value will still not become zero since the reverse image will give negative value of the actual order value.
       For example if your order value is 100, in your DSO it will currently show the value is 200(doubled up). In the Delta the reverse value come as -100. So the final value will still be 100(200-100).
    So the best solution will be to do selective deletion
    Thanks,
    Praveen
    Edited by: Praveen kumar kamineni on Jun 11, 2010 11:06 AM

  • Sqlserver query using Group by and Order by

    SUM(BILL_DETAIL.x_bill_quantity) as BILL_QUANTITY,
    MIN(BILL_DETAIL.x_billable_to) as BILLABLE_TO,
    MIN(BILL_DETAIL.x_billable_yn) as BILLABLE_YN,
    AVG(BILL_DETAIL.x_bill_rate) as BILL_RATE,
    MIN(BILL_DETAIL.x_cost_rate) as COST_RATE,
    MIN(BILL_DETAIL.x_cost_total) as COST_TYPE,
    LISTAGG(BILL_DETAIL.objid, ',') WITHIN GROUP(ORDER BY BILL_DETAIL.objid) as ID_LIST
    FROM table_x_gsa_bill_detail BILL_DETAIL
    WHERE (1=1)
    GROUP BY (DECODE(BILLABLE_YN, 1, 'Billable', 'Non-Billable') || ',' || BILLABLE_TO || ',' || DETAIL_CLASS || ',' || COST_TYPE || ',' || BILL_RATE)
    ORDER BY DECODE(BILLABLE_YN, 1, 'Billable', 'Non-Billable') || ',' || BILLABLE_TO || ',' || DETAIL_CLASS ||
    ) dt WHERE rn BETWEEN 0 AND 1
    Can any one pls help me using of Case Condition keyword instead of Decode in the above query ??? iam not able to convert above query for group by and order by..
    Actually i need to do group by the aggragate values which i got the values from the fields of BILLABLE_YN,BILLABLE_TO,DETAIL_CLASS, COST_TYPE, BILL_RATE.
    where as in oracle i can run above query using decode keyword where as in sqlserver iam not able to use BILLABLE_YN field alias of above query in group by .
    i tried like by using following way but it is wrong because here iam not using aggragate values of fields in group by funtion please help me in converting query in sqlserver. GROUP BY (case BILLABLE_YN when 1 then 'Billable' when 0 then 'Non-Billable' else
    'Non-Billable' End BILLABLE_YN + ',' + BILLABLE_TO + ',' + DETAIL_CLASS + ',' + COST_TYPE + ',' + BILL_RATE)
    Krishna

    CREATE TABLE DETAIL
    ([objid] int,[x_billable_to] varchar(19), [x_bill_quantity] int,
    [x_billable_yn] int, [x_bill_rate] int, [COST_TYPE] varchar(19) )
    INSERT INTO
    DETAIL
    ([objid], [x_billable_to], [x_bill_quantity], [x_billable_yn], [x_bill_rate],[COST_TYPE])
    VALUES
    (1, 'Customer', 3, 1, 20,'Parking'),
    (2, 'Customer', 1, 1, 25,'Toll'),
    (3, 'Customer', 2, 1, 20,'Parking') 
    Pls convert following query for executing query in sqlserver  ..for the column ID_List it should return data like 1,2,3
    SELECT * FROM (SELECT 1 rn,
            SUM(BILL_DETAIL.x_bill_quantity)      as BILL_QUANTITY,
            MIN(BILL_DETAIL.x_billable_to)        as BILLABLE_TO,
            MIN(BILL_DETAIL.x_billable_yn)        as BILLABLE_YN,
            AVG(BILL_DETAIL.x_bill_rate)          as BILL_RATE,
            LISTAGG(BILL_DETAIL.objid, ',') WITHIN GROUP(ORDER BY BILL_DETAIL.objid) as ID_LIST
         FROM   BILL_DETAIL
          WHERE (1=1)
     GROUP BY (DECODE(x_billable_yn, 1, 'Billable', 'Non-Billable') + ',' + x_billable_to  +  ',' + COST_TYPE + ',' + x_bill_rate)
          ORDER BY DECODE(x_billable_yn, 1, 'Billable', 'Non-Billable') + ',' + x_billable_to  +  ',' + COST_TYPE + ',' + x_bill_rate
           )dt 
    WHERE rn BETWEEN 0 AND 1
    Krishna
    sounds like this
    SELECT *
    FROM
    SELECT 1 rn,
    SUM(BILL_DETAIL.x_bill_quantity) as BILL_QUANTITY,
    MIN(BILL_DETAIL.x_billable_to) as BILLABLE_TO,
    MIN(BILL_DETAIL.x_billable_yn) as BILLABLE_YN,
    AVG(BILL_DETAIL.x_bill_rate) as BILL_RATE,
    LEFT(bd1.ID_LIST,LEN(bd1.ID_LIST)-1) AS ID_Listing
    FROM BILL_DETAIL bd
    CROSS APPLY (
    SELECT BILL_DETAIL.objid + ',' AS [text()]
    FROM BILL_DETAIL
    WHERE objid = bd.objid
    FOR XML PATH('')
    )bd1(ID_LIST)
    WHERE (1=1)
    GROUP BY (CASE WHEN x_billable_yn = 1 THEN 'Billable' ELSE 'Non-Billable'END + ',' + x_billable_to + ',' + COST_TYPE + ',' + x_bill_rate),
    LEFT(bd1.ID_LIST,LEN(bd1.ID_LIST)-1)
    ORDER BY (CASE WHEN x_billable_yn = 1 THEN 'Billable' ELSE 'Non-Billable'END + ',' + x_billable_to + ',' + COST_TYPE + ',' + x_bill_rate),
    LEFT(bd1.ID_LIST,LEN(bd1.ID_LIST)-1)
    )dt
    WHERE rn BETWEEN 0 AND 1
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Can system produce one single invoice for bulk of sales orders?

    Hie all...
    I have a few questions with regards to sales orders per Billing.
    1) Can the system cater for creation of only ONE Invoice for about 8,000 sales orders in one click of VF04?
    2) Is there a limit of sales order to be created in ONE Invoice? If there is, how much is the maximum limit?
    3) If can, will there be any performance issue to the system? Waht are the impact that we should be aware of?
    I've tested billing for lesser sales orders (execute VF04 for 5,427 s/orders only). However, the system still produce 2 Invoices and yet still has remaining 407 sales orders not processed.
    i have read the discussion about Billing line item here Re: Maximum no of lines in the Invoice but the issue is still uncleared to me.
    TQVM!
    Haryati haron

    Hie all.
    My appology for the above post. I have double check the bill and found the split analysis as mentioned by G.
    As this is my first time encounter the split scenario, would appreciate if anybody would share the knowledge on how to tackle my issue here. I found tHE split analysis as follows:
    Split due to different header data
                                                                                    Fld Name                        0300001429           0300001430
                                                                                    Country of Destination          MY                   SG
    Region (State, Province, Count  SL                   SG
    Country of Sales Tax ID Number  MY                   SG
    Reference Document Number       0300001429           0300001430
    Payment Reference               0300001429           0300001430      
    1) All sales order's Sold-to-Party hardcoded to onely one customer - e.g 10919 but different Ship-to-Party
    2) I assume that Country of Destn, Region and Country of Sls Tax Id data is taken from Customer master data but why does it takes Ship-to-Party customer master data? Can i change it to take Sod-to-party Master data?
    3) I believe i need to change the Origin sls tax no from A (Ship-to-Part) to C (Sold-to-Party) but can anybody pls help pointing out the tcode or menu path to do so? (TQ!).
    4)  believe also should point #4 above be resolved, Ref Doc No. and Payment Ref No. will not be an issue anymore.
    Appreciate any feedback.
    TQVM!
    3)

  • Sales order for a make to order item

    HI
    when i create a sales order in crm for a make to order item. its not creating any requirements.
    like for a make to order item  will have a BOM  and routing attached to it. it creates  a production order or a purchase requisition.  but  its not happening
    a sales order is getting created in ECC. but its not creating any requirements.
    so no planned order ( production order) or purchase requisition is getting created. even after running MRP.
    but when i create any thing in ECC everything is working fine.

    Hi,
    There is a difference in the ECC sale sorder and CRM sales order in ECC sales order when you sale a product then all the parts of the product and billed and for this they create a purchace order and maitain route of the material and transpotation point all the things but in CRM we dont maintain these thing so product does have parts in it self it is one type of dummy product in showroom thata have only price so when we create a sales order in CRM then we dont maintain the BOM of that product,.
    Regards,
    Sid

  • Error in doing LSMW for uploading in Sale order

    Dear Sir,
    While doing test run for LSMW for uploading 15 Sale order , first order saved with no error and from second order the following error is displayed.
    Exchange rate of 1 in INR 2  for date 25.05.2009 3 could not be determined.
    Kindly do the needfull.

    Sir,
    If we manually enter, order getting saved for all the sale order.
    Why it is not possible while doing LSMW. 
    Please clarify.
    Regards
    Sethuraman

  • Abandoned Order Service

    Hi,
    Could you please give me some idea about following scenarios related to abandoned order.
    1) logged in basket need to persist 6 months after the last inter action with the basket
    2) not  logged in basket need to persist 30 days after the last inter action with the basket.
    The values must be configurable and how will manage logged in and logged in user?
    Thanks,
    Pveedu

    ATG by default would persist for the orders of logged-in users which is governed by persistOrders property in /atg/commerce/ShoppingCart (default is true). Whereas the shopping cart of anonymous users is transient. You can change this behavior through persistOrdersForAnonymousUsers property in /atg/commerce/ShoppingCart but you would also have to enable persisting of anonymous profiles in the ProfileRequestServlet by making persistentAnonymousProfiles=true so that ATG can tie the anonymous orders with the profileId.
    While doing this you need to be aware of your database size as this will cause large numbers of profiles and orders to be created and stored. There can be a cookie based approach also where you can manage the loading of orders based on a custom cookie but you will have to write customized code for that.
    To use abandoned order service you would have to configure AbandonedOrderService and AbandonedOrderTools as per your requirements:
    Oracle ATG Web Commerce - Configuring AbandonedOrderService

Maybe you are looking for