Query For Sales Order Amendments

Hi,
Does anyone have a query that lists the amendments to a Sales Order?
I basically want to create an alert that runs this query once a day and shows me the sales orders that have been amended that particular day.
Any help on this would be gratefully received.
Regards
David

Hi..
Try These Query in Alert you will get your req. fulfill
SELECT T0.[DocNum], T0.[DocStatus], T0.[DocDate], T0.[DocDueDate], T0.[CardCode], T0.[CardName] FROM ADOC T0 WHERE T0.[ObjType] = 17 AND  T0.[UpdateDate] = GETDATE()
Regards,
Bhavank
Edited by: Bhavank on Sep 28, 2010 5:50 PM

Similar Messages

  • Query for Sales Order Analysis

    Dear Experts
    I have written a Query for Sales Order Analysis and would like to have help on this.
    The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum] ORDER BY T0.[DocNum]
    where U_Total_GP is a UDF for storing the GP of each order.
    After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. However, the query does not calculate column total for total amount and total GP. Although I know the total for each column can be displayed by pressing "Ctrl" + Click on the column title, it would have to be done from time to time.
    Therefore, I would like to modify my query in order to calculate the column totals when executed. Are there any suggestions for this?
    Thank you
    Regards
    Elton

    Hi Elton,
    Try this:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]
    ORDER BY T0.[DocNum]
    Thanks,
    Gordon

  • Query for Sales order and corr.AR Invoice Info

    Hi,
    I need to write a query which gives the flollowing sales order info along with the coressponding AR invoices info
    Sales Order columns reqd:
    OPERATING_UNIT
    ORDER_NUMBER
    CUSTOMER_NUM
    CUSTOMER_NAME
    ORDERED_DATE
    FLOW_STATUS_CODE
    TOTAL_ORDER_AMOUNT
    AR invoice columns reqd for the sales orders:
    Invoice number,
    Invoice date,
    Invoice Total.
    Can anyone help me out with this?
    Thanks,
    Ash

    Hi Ash,
    There are some issues that must be defined before you have the exact query.
    Do you have freight charges or non-inclusive tax? If you have, freight charges and tax amounts must be included?
    Depending on you grouping rule, you can have lines from more than one order in a single invoice. In this case, as invoice amount you want the sum of all lines, or only the lines from that order?
    Below is an example using two views. It assumes that grouping rules split lines from different order into different invoices.
    Hope it helps,
    Ketter Ohnes
    create or replace view order_summary as
    select oh.org_id,
    oh.ORDER_NUMBER,
    oh.header_id,
    ott.name tt_name,
    ca.account_number,
    p.party_name,
    oh.ordered_date,
    oh.flow_status_code,
    sum(ol.ordered_quantity*ol.unit_selling_price) total,
    sum(ol.tax_value) tax,
    (select sum(operand)
    from OE_PRICE_ADJUSTMENTS_v x
    where x.header_id = oh.header_id
    and x.adjustment_type_code='FREIGHT_CHARGE') freight_charge
    from oe_order_headers_all oh,
    oe_order_lines_all ol,
    hz_cust_accounts ca,
    hz_parties p,
    oe_transaction_types_tl ott
    where ol.header_id=oh.header_id
    and oh.sold_to_org_id = ca.cust_account_id
    and ca.party_id = p.party_id
    and oh.order_type_id = ott.transaction_type_id
    and ott.language =
    (select language_code
    from fnd_languages
    where installed_flag = 'B')
    group by oh.org_id,
    oh.header_id,
    oh.ORDER_NUMBER ,
    ott.name,
    ca.account_number,
    p.party_name,
    oh.ordered_date,
    oh.flow_status_code;
    create or replace view invoice_summary as
    select a.interface_header_context,
    a.trx_date,
    a.trx_number,
    b.interface_line_attribute1,
    b.interface_line_attribute2 tt_name,
    a.customer_trx_id,
    sum(b.extended_amount) invoice_total
    from ra_customer_trx_all a,
    ra_customer_trx_lines_all b
    where a.customer_trx_id = b.customer_trx_id
    and b.interface_line_context = 'ORDER ENTRY'
    and b.line_type in ('LINE','FREIGHT')
    group by a.interface_header_context,
    a.trx_date, a.trx_number,
    b.interface_line_attribute1,
    b.interface_line_attribute2,
    a.customer_trx_id;
    select *
    from order_summary o,
    invoice_summary i
    where o.order_number between :1 and :2
    and o.order_number = i.interface_line_attribute1
    and o.tt_name = i.tt_name;

  • Query for Sales Order and AR Invoice Information

    Hi,
    I need to write a query which gives the flollowing sales order info along with the coressponding AR invoices info
    Sales Order columns reqd:
    OPERATING_UNIT     
    ORDER_NUMBER     
    CUSTOMER_NUM     
    CUSTOMER_NAME     
    ORDERED_DATE     
    FLOW_STATUS_CODE     
    TOTAL_ORDER_AMOUNT
    AR invoice columns reqd for the sales orders:
    Invoice number,
    Invoice date,
    Invoice Total.
    Can anyone help me out with this?
    Thanks,
    Ash

    Hi Ash,
    Table RA_CUSTOMER_TRX_ALL can be joined to RA_CUSTOMER_TRX_LINES_ALL table through CUSTOMER_TRX_ID column. The table RA_CUSTOMER_TRX_LINES_ALL.INTERFACE_LINE_ATTRIBUTE6 = OE_ORDER_LINES_ALL.LINE_ID. And from the LineId, you can get the HeaderId os the OE_ORDER_HEADERS_ALL table.
    You must have visualized the query by now.
    Thanks
    Sumit

  • Select query for sales order for particular customer oder text and storage

    Hi All,
    I am trying to retriev customer order text and customer storage bin from the following select query, but it's giving huge number of records, I want to restrict the number of records.
    Select customer order text, customer storage bin
                       Select STXH–TDOBJECT, STXH–TDID
                       Where  TDOBJECT = VBBP
                              TDID = Y001
                              TDID = Y007
    Please let me know how to restirct the number of records.
    Thanks,
    Ranjan

    Try using the FM 'READ_TEXT'.
    NAME will be the order number concatenated with the item number.
    And you have the ID and OBJECT.  You may also need to use the LANGUAGE.
    Message was edited by:
            Matt Nagel

  • Query on Sales Order Analysis

    Dear Experts
    I have written a Query for Sales Order Analysis and would like to have help on this.
    The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]
    After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. Everything is fine with this query except I would also like to incdude the total number of Sales Order (per day) right below the column "DocNum".
    Is it possible to achieve this?
    Thank You
    Regards
    Elton

    Try this:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT count(DocDate), SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]

  • Dynamic Credit Checks - Different Horizon for Sales Order & Delivery

    Hi Experts ,
    had a query . I am testing a scenario for Dynamic credit Check where the Horizon is ZERO for Sales Order & 3 Months Horizon for deliveries. How should the system behave in such a case. What would be the best way to test whether system behaviour is ok as per this expectations.
    Also I would like to know whether "0" horizon for sales order means that system looks into the entiire list of open sales orders or  the horizon of check is only upto the end of the current month . In FD32 the curent date is indiacted as the horizon date. While creating sales orders today I found dynamic block for 0 horizon is only working for sales orders with availabilty date upto 7th July '10 which neither covers the existing month-June & neither full of July. Beyond that there is no dynamic block soccuring.That made me a bit confused .
    Please advice with you valuable inputs.
    Thanking You.

    Hello Sai ,
    thank you for the response. Had already checked note . But this does not speak about the implication "0" M horizon of dynamic credit check . What is coverage for that ?

  • Stock reserver for sales order

    Dear All
    1. MMBE-Check the stock with batch no 6000000340 with 200 qty
    2. Sale Order Created-
    3. MB1B - Used Movement type 412 E with Inputs such as Sales Order,[warning message: sales order is not provided for this goods movement] after pressing the document is posted
    4. In MMBE When i check the stock under batch no 6000000340  with 150 qty in unrestricted stock and Sales order Stock  i can see the 50 quantity stock
    Query is
    1. Why the 50 quantity stock which is reserved for Sales order stock is seen under unrestricted stock and not under  Reserved tab
    2. When i create delivery  with the same material and  batch no, the stock is reduced from unrestricted stock[150 -10delivery qty] = its showing 140 qty, but stock should be reduced from 50 quantity which i have reserved for Sales order.
    Please guide
    Regards
    Sandeep Bhowmick

    Hi Sandeep
    Visualize this scenario
    Material is pen in MMBE unrestricted stocks is 100
    Sales order created with item cat TAN with special stock indicator E not marked and the order no is say 55 for 10 qty
    Now you are reserving stocks in t code MB1B with movement type 412 E inputting the order no xx and saving it
    Now in MMBE put the material as pen and input plant and storage location etc press F8
    unrestricted stocks will be 90
    Sales order stocks will be 10
    If you click on the details of this sales order stocks you will see the order no xx and qty will be 10
    (read your first post exactly the same of this)
    now are delivering the sales order and doing the pgi
    Now in MMBE
    unrestricted stocks will be 80
    Sales order stocks will be 10 (this exactly is your problem)
    that means the system having a reservation in MMBE for a particular sales order xx not utilizing those stocks and still takes the stocks from the unrestricted and this is wrong
    This is happening because the item cat TAN is not marked with special stock indicator E during order creation of xx
    Now mark the item cat TAN with special stock indicator E and create a fresh cycle say order no yy
    When you do PGI for order no yy the unrestricted will be 90 and there wont be any sales order stocks as the stocks are already PGIed
    That means the system picks up the correct stocks for delivery
    The system behaves very perfectly When there is sales order stocks in MMBE i dont  understand ,what is the reservation you are talking about
    Regards
    Raja

  • TABLE/FIELD FOR SALES ORDER'S SHIP TO LOCATION

    Hi everyone,
    Does anyone tell me what is the related tables/fields for Sales Order's Ship To Location? Since I want to display the Ship To Location information in the Oracle Report in Oracle Apps R11i.
    I tried to use the following SQL select statement to retrieve the Ship to address:-
    -- SHIP TO LOCATION
    select a.address_id, c.customer_name, C.CUSTOMER_ID, A.SITE_USE_ID from ra_Site_uses_all a, ra_addresses_all b, ra_customers c
    where a.site_use_code = 'SHIP_TO' and
    a.status = 'A' and
         b.address_id = a.address_id and
         c.CUSTOMER_ID = b.CUSTOMER_ID and
         b.status = 'A' and
         c.customer_id in (select customer_id from ra_customers) and
         c.status = 'A' and
         c.customer_name like 'CLARION (H.K.)%'
    But I found that the data is BILL TO address. Can anyone help me? Thanks.

    Hi all, I managed to solve my problem. Here's the query in case someone need it. Thanks
    SELECT party.party_name "Send to" (SELECT party.party_name
    FROM hz_cust_site_uses_all bill_su,
    hz_cust_acct_sites_all bill_cas,
    hz_party_sites bill_ps,
    hz_locations bill_loc,
    hz_parties party,
    oe_order_headers_all h
    WHERE h.invoice_to_org_id = bill_su.site_use_id
    AND bill_su.cust_acct_site_id = bill_cas.cust_acct_site_id
    AND bill_cas.party_site_id = bill_ps.party_site_id
    AND bill_loc.location_id = bill_ps.location_id
    AND bill_cas.party_site_id = bill_ps.party_site_id
    AND bill_ps.party_id = party.party_id
    AND h.order_number = 'your_order_number') "Invoice to"
    FROM oe_order_headers_all h,
    hz_cust_site_uses_all ship_su,
    hz_cust_acct_sites_all ship_cas,
    hz_party_sites ship_ps,
    hz_locations ship_loc,
    hz_parties party
    WHERE h.ship_to_org_id = ship_su.site_use_id
    AND ship_cas.party_site_id = ship_ps.party_site_id
    AND ship_su.cust_acct_site_id = ship_cas.cust_acct_site_id
    AND ship_cas.party_site_id = ship_ps.party_site_id
    AND ship_ps.party_id = party.party_id
    AND ship_loc.location_id = ship_ps.location_id
    AND h.order_number = 'your_order_number';

  • Approval Procedure for Sale Orders

    Hi Experts:
    Anyone can help me?...I´m needing an Approval Procedure for Sale Orders to be activated whenever the user is trying to give diferent discount percentage from the one assigned in the price list throughout Period Discounts. We have Sap Business One 2007A SP01 PL05
    Thanks very much in advance
    CLAUDIA

    Hi CLAUDIA,
    This has to be done through user query approval.  However, since I don't have similar environment to try, you may start to create your own query first.
    Thanks,
    Gordon

  • Workflow for Sales Order Release via Status Profile

    Dear all,
    i want to make a workflow for sales order which have 4 User Status in One status profile.
    Once Event triggered for sales order
    1.   Mail should go to main authority with sales order number.
    2.  Once authority will do some changes in the required field then he/she changes
         the user status-1 from defauts as per line Item and mail should go to department no-1 (Head authority).
    3.  Once again same changes in sales order but now user status-2 from user status-1
         as per line Item and mail should go to department no-2 (Head authority).
    4.  Once again same changes in sales order but now user status-3 from user status-2
         as per line Item and mail should go to department no-3 (Head authority).
    5.  Once again same changes in sales order but now user status-4 from user status-3
         as per line Item and mail should go to department no-4 (Head authority) .
    and parrally for each changes of Status mail should also go to User (Event Creator).
    6. Finally mail sholud go to User as you are permitted to do next business transaction for this sales order
    Please tel me the process as i am very new this topic and i am always going to stuck in Binding.
    please help me out.
    Thank You

    Hi Neeraj,
    First of all start with SWELS and SWEL T-Code to check if any standard event is getting triggered or not. If event is getting triggered, then use the same event to trigger the workflow; otherwise create a custom event of BO and use the same to trigger the workflow.
    Hope you are aware of T-Code SWO1 and delegation of BO. The BO used for your requirement will be BUS2000115.
    As you want the workflow to get triggered only for one status profile and one of its status, so use check function module. There set the condition for you status profile and status.
    The FM which you will be using the most is CRM_ORDER_READ. To read the status, you can also use CRM_STATUS_READ_OW.
    Now simply make the approval steps in the workflow using activity. In the activity, you can use the standard method USERSTATUSPOPUP to send the workitem for approval. In each step use the same activity with different agents as approvers.
    Just go with these things and let me know if you get stuck up somewhere.
    Regards,
    Guddan

  • User exit for  Sales order

    hi,
       i need to eliminate leading zeros for PO number which comes in SO created trough ALE.i found the enhancement for the FM idoc_input_orders.in that enahancement we have 12 FM's.my Leading zeros are comming for field belnr which comes in e1edk01 segment of idoc orders05.now i had coded my part of coding in FM exit_saplved.._oo1 and i had activated that.but it is not working for me.than i tought of going to other FM exit_sapl..._009.in which i'm not able go into the include either.plz help me out.thank you.

    Hi, Krishna!
    With IDOC_INPUT_ORDERS during IDoc interpretation PO number is assigned to XVBAK-BSTKD field which is later used for sales order creation with reference to PO.
    So all you need is to use some customer exit with changing parameters containing XVBAK after IDoc interpretation is completed. For example you can use EXIT_SAPLVEDA_009 which is called at the end of IDoc check after interpretation.
    Regards,
    Maxim.

  • RBA GATP check is not getting invoked for Sales Order

    Hi Everyone,
    RBA GATP check is not getting invoked for Sales order.
    I maintained the configuration settings for 'Rules-Based Availability Check', APO general settings (check mode, check instruction), carried out integrated rule maintenance, Rule determination for the combination of order type & product, associated the check mode to product master. Also maintained all the settings in ECC towards Req class, Req type, checking control etc.
    However, sales order is not invoking RBA Check though it is showing up the 'Rule' icon in the screen. Also, in the APO Availability check in Sales order when I click onto 'check instruction', I get the checking mode that pertains to RBA for business event 'A' (Sales order). Though I have not maintained any stock for the main material for which I have the sales order, yet system is confirming any quantity that I put in.
    I would expect that system would propose the same material in an alternate location where we have stock through RBA.
    Request you to share ideas on this.
    Regards,
    Avijit Dutta

    Hi Avijit,
    You should used No Checking Horizon in Checking instructions and also Check your rule control settings.
    What you have defined in 1st and 2nd steps. Check whether product substitution is carried out or Location Substitution.
    Thanks,
    Bala.

  • How to create a daily report for sales order

    hi
    how to create a daily report for sales order. what fields it must consists of. what are the tables it need?

    Hi
    You have to use the sales order tables VBAK,VBAP and VBEP
    So keep date field on selection screen
    and treat this date as Order creation data audat field in VBAK.
    based on this fetch the data from VBAK and VBAP  with the following fields like
    VBELN, KUNNR,NETWR,POSNR, MATNR,ARKTX,KWMENG,WAERS  etc and display in the report
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Report for Sales Order Change History   CDPOS and CDHDR

    How to take a report of the data for the Sales Order Change history for a particular period of time. It is required to take a report of all the Sales Orders for which the basic price has been changed. Please let me know the procedure. I could not get the data from the table CDPOS and CDHDR
    Helpful answer would be rewarded.
    Regards
    Praveen

    Dear Praveen Kumar
    Have you tried with VBAP where sale order details at item level would be stored.
    Moreover, to my knowledge, there won't be any changes as for as pricing is concerned at sale order level but there is at billing level.  Normally, any price increase / decrease would reflect in billing.  So why dont you to table join through SQVI VBAP (for sale order details) and VBRP (for billing details) so that you can compare the selling price in sale order with billing. 
    Thanks
    G. Lakshmipathi

Maybe you are looking for

  • I Fixed My Nano and Now It's Seen By Windows and iTunes

    I was having the same symptoms as most everybody else. I did the driver download and problem solved. The procedure has already been posted and linked to as a solution by other people. Here is what I did. Hope it helps. 1.Open the "i386"folder. Goto y

  • WebService with multiple methods

    Hello to everybody. I need an help with the develop of a WebService that it comes with 2 methods: I have already created a lot of WebService in JCAPS6 with only one method and everything was gone well. I tried to implement a WebService with 2 or more

  • CS5.5 Master Collection trial

    I'm trying to download the cs5.5 master collection trial but it say "error downloading this product (Error 109). Check your network connection or destination disk." I am able to download other trials except this one.

  • Any extra fine tuning / configuration to be done for Client / Voice Roaming .

    Dear Folks, Is there any additional configuration to be done on the 5508 WLC for Wireless Laptop / Voice Roaming ? I tested with Wireless IP Phone and found some blankness in voice , whereas i have other access point nearby , which wasn't switching o

  • Adobe Flash Players - not supported by Nokia E61??...

    Hi - I am new here - I love my new smartphone!!! I have just bought a E61 and from reading threads and posts here (thanks so much everyone) am I to assume that this phone does not support Adobe Flash - I havent been able to download Adobe flash playe