Query Based Approval Procedure for Sales order .

Hi 
I have created query for SO which results above 5000 d 50,000 .
By using this each query i created two seperate Approval Procedures which So is >5000 d >50000.
If So>5000 Approval Procedure wants to activate same thing for >50,000., Bur approval Procedure is not working wat will be the cause. i have linked this query In Terms as when the following applies.
If SO >5000 approved by user A.
If SO>50,000approved by User A & B.
Regards
Giridharan

Hi Giri
Your query for the first should be as follows:
SELECT DISTINCT TRUE
WHERE $[$29.0.NUMBER] > 5000 AND $[$29.0.NUMBER] < 50000
For the second query:
SELECT DISTINCT TRUE
WHERE $[$29.0.NUMBER] > 50000
The query you were trying to use is looking at the table which will only apply to documents already posted, and as that query is not being filtered specifically it is bringing back all the records and getting confused. You must reference to the runtime value of the document being posted.
Kind regards
Peter Juby

Similar Messages

  • 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

  • How to implement Approval hierarchy for Sales Order in Order Management.

    Hi,
    We need approval process for sale orders in Order Management module. Currently we are using credit HOLD option for orders at shipping level. The issue we are facing now is we can not cancel those orders who contains Service Line item in it while on HOLD. The restriction raised at the time of cancelling the order that the Line Item is "fulfilled". Service line item's get fulfilled.
    Is that any other possibility to have Approval hierarchy for Sales Orders in Order Management Module? If it is possible can anybody share the related document or implementation guide?
    Thanks with anticipation in advance.
    Many Regards
    Kaleem Bhatti

    I copied the standard order header workflow and the "Book Order, Manual" workflow to custom workflows.  I then modified the "Book Order, Manual" workflow to put another completely custom workflow (call this "Approvals") in between the "Book Eligible" and "Book" steps.
    The "Approvals" step assessed the sales order, changed the order header to the pending approval flow_status_code, and sent out the appropriate notifications.  The "Approvals" step returned a Complete/Incomplete where complete would proceed to "Book" and incomplete would go back to "Book Eligible."  The new workflow was then assigned to the order type needed.  I don't still have access to that environment (job change) or I would give more definite instructions.

  • Different  Pricing Procedure for Sale order and Billing Document

    Hello Experts
    As per scenario,we create Excise Invoice (T-Code J1IIN) on Basis of Proforma Invoice.Proforma Invoice and Excise Invoice follow Pricing from Sale Order.AS per pricing Some excise condition types are get update in Proforma and excise Invoice.
    AS Per Customer Payment Confirmation we Create Export Billing Invoice (T-code VF01) on basis of Outbound delivery.
    Issue -: AS per export Billing Rule we don't want to update Excise Condition type in Export Billing Document,and at same time it should not create any accounting entries for same condition type. we Dont want excise Duity in Export Billing Document as Export Billing Doccumnet aslo Follow Pricing procedure of Sale order
    Should i create new Pricing procedure or what other things to solve above issue.
    Please help me out
    Thanks and Regards
    Pash@SD

    Hello,
    The key to your requirement can be maintenance of Excise condition type with proper access sequence and accordingly maintain condition record for them.
    You create an access sequence with following access:
    - Country / Plant / PlntRegion / Region / Price grp / Mat.pr.grp / Materia
    - Country / Plant / PlntRegion / Region / Price grp / Mat.pr.grp
    - Country / Plant / PlntRegion / Region / TaxCl1Cust / Mat.pr.grp
    - Country / Plant / PlntRegion / TaxCl1Cust / Mat.pr.grp
    For export maintain condition record based on any key combination, say for
    Country / Plant / PlntRegion / TaxCl1Cust / Mat.pr.grp - Tax % - Tax Code
    FR / 1000 / KR / 03 (EXPORT) / 04 / 0% / V1
    I hope this can assist you.
    Thanks & Regards
    JP

  • Store procedure for sale order

    hi
    i want store procedure that we can't add stand alone sale order without sale quatation

    hi,
    you can check my post in this link
    Re: Storeprocedure for sale order without sale quotation
    regards
    Fidel

  • Approval Authorization for Sales Order

    Dear Experts,
    Can anybody help me by providing a user query for Approval templete for the following condition.
    The system should prevent the sales order & Delivery when the customer is having one oustanding invoice above 90 days and the balance due for that invoice is less than Rs. 100
    Regards,
    Srinivas

    Hi Gordon,
    Thanks for your effort. I am getting the approval window after the sales order . ie at delivary it is asking me for approval and also for every delivary it is asking even the customer doesn't have any outstanding. if the approval process activates during SO genaration time ..then this will be helpful.
    If any previous invoice having outstanding balance >100 and if it exceeds 90 days then it should ask for approval. But the system should not check the Customer account balance.
    Regards
    Srinivas

  • Approval for Sales Order

    Hi All,
            Is it possible for me to set an approval procedure on sales order in case the user forgets to fill in the remarks column??? please help with the query.
    Thanks in advance,
    Joseph

    Hai!
    If, your requirement is block users to add SO without remarks, then u do with Strored Procedure.
    if @transaction_type = 'A' and @object_type = '17'
    begin
    if exists(select T.docentry from ORDR T where T.docentry = @list_of_cols_val_tab_del and
    (T.comments is null or T.Comments=''))
    begin
    SET @error = 17
    SET @error_message = N'Enter the Remarks'
    end
    end
    Add this code in SP_TransNotification of your company DB.
    Please test it in a test system and put in Live
    Regards,
    Thanga Raj.K

  • Problem after change item status procedure in sales orders.

    Hello experts,
    I have changed item status procedure for sales orders. But now all BDoc with queue name CSA_ORDER_xxxxx remain in state 'Written to qRFC Queue (intermediate state)' and needs to be reprocessed manually.
    No problem reprocessing.
    Have somebody any idea ?
    Best regards
    Juan Salom

    Hi,
       Is your inbound queue un-registered(type U)? Look at trx.
    SMQR
    and see if it is in un-registered. If yes, select the CSA_ORDER_*** queue and click on
    Registration
    button.
    If this does not help, re-generate your Bdoc services (for Bdoc BUS_TRANS_MSG) using
    SMOGGEN
    or
    using the generation workbench.
    Then try the delta once again and observe for queue and Bdoc status in the
    SMW01
    Hope it helps! Reward if helpful.
    Regards,
    Sudipta

  • Different pricing procedures on Sales order and billing documents

    Hello All,
    I have come across a situation where I will have to maintain seperate pricing procedures for Sales order and the corresponding billing document.
    I was just wondering if this is normal. In my previous projects I always had same pricing procedure for the order and the billing.
    Please share your experience.
    Appreciate your help.
    Thanks,
    Raj

    Hello Friend
    This is a very common requirement in many implementations depending on the scenario
    Sales order with one pricing procedure The same sales order when goes for billing
    Billing document with another pricing procedure
    Settings needed
    Order type VOV8 has a document pricing procedure  Say A
    Billing type VOFA has a document pricing procedure  Say B
    Sales area 1000,10,00 and CPP is 1
    OVKK settings is like this
    1000,10,00 DPP A, CPP1 Pricing procedure is  RVAA01
    1000,10,00 DPP B,  CPP1 Pricing procedure is RVAA02
    The control data in both  RVAA01 and RVAA02 is different
    In VTFL between your del type to billing type aunder the header that item level The pricing type should be B (carry out new pricing) if delivery related billing
    In VTFA betwen your ord type to billing type aunder the header that item level The pricing type should be B (carry out new pricing) if ordery related billing
    Now the same sales order will carry PP RVAA01at order level and RVAA02 at the billing document
    There can be some business scenarios you want to add some extra discount at the time of billing
    That time you have a discount type added in the billing PP so that it is reflected in the billing
    This is scenario dependent
    Hence SAP has given the option of DPP in VOFA so that by billing documentwise we can differentiate
    To achieve this Copy control settings and DPP should be different both in VOV8 and VOFa
    Regards
    Raja

  • How to create Approval procedures for various departments

    Hi Experts,
    I want to create a approval procedures for sales , purchase, production and finance screens.
    I am going to the Approval stages , there i am giving name, description and selecting authorizer and finally when i want to select the sales module under department , there i can see only general .
    i cldnt see all the departments here. what is the reason?  solution for this. PLease.
    Thanks & Regards,
    Dwarak

    Hi Dwarak,
    Please specify the department in Administration --> Setup --> General --> Users and find the user code and then map the departments.
    In the Approval templates  Originator is where the users can be setup and in the select the required documents and map the create th Approval stage ( The user who authorises the document created by the originators)
    Regards,
    Rakesh N

  • 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

  • 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

  • How to get the pricing hierarchy based on the delivery date for sales order

    Hi,
    How to get the pricing hierarchy based on the delivery date for sales order other than system date.
    My requirement is to get the Pricing hierarchy based on the delivery date other than system date.
    Waiting for kind response.
    Best Regards,
    BDP

    HI Sai,
    please refer teh document already how to write FM based extration on generic extractors.
    and here  the logic to find the latest records values:-
    -> get the data in an internal table
    ->Sort the internal table data based from date descending
    -> Using READ statement , we can read the first record of the table which is nothign but your latest record.
    Regards.
    Sakthi

  • FIFO based pricing issue on sales orders!

    This is the situations :
    All setups in the comany are for FIFO. Item Level, Item Group Level, and Company Level.
    1. We purchased 1 item1 for 125 dollars. PO invoice completed. First one in FIFO layer.
    2. purchased 1 more of same  item1 for 150 dollars. PO Invoice completed. Second in FIFO layer.
    3. We want to sell above items to Customer1. Customer1 has price list set to - Last Evaluated Price.
    4. Ran Inventory Audit Report to update the price list LastEvaluatedPrice.
    5. Start order for Customer1 and add 1 item1 to order -
    Price = 125 <== OK.
    Make the above quantity 2 or add another line for item1.
    Error : Price=125 <=== NOT OK, should be 125 for first item and 125 for second item (same item).
    6. Run Audit Report again and repeat step 5.
    Error : No change. Same as step results. That is price=125 instead of 150.
    NOTE: Customer could end up in loss based on above pricing.
    7. Yes there are workarounds :
    7.1  Run Inventory Valuation Report for the item with MovingAverage as the price. Then the evaluated price is right.
    7.2  Right click or run a query and get the price in layers and then calculate your own.
    Note: No workarounds are good for customer. They and their staff do no want to open additional windows or run queries etc.
    QUESTION: Why is FIFO pricing not working for Sales Order?
    Note: Why would anyone use FIFO? It could give them big loss or big profits all unintended?
    Please help? Is this FIFO problem, or my setup problem or something I do not understand?
    Thanks and Cheers!

    Hi  Syed,
    Open sales order select that item and right click in unit price column and select "last prices" option. Then Last prices form will open just deselect BP Code check box and select vendor. you can see there prices in detail level just double click on row which price you want.
    Thanks
    Sachin

Maybe you are looking for

  • Problem with Front-End Editor (New)

    Dear SAP gurus I tried from transaction se38, selecting options Utilities -> Settings and then selecting Front-End Editor (New) from Abap Editor tab. When I had old editor setting, I had buttons to do tasks like 'load local file' ,  'save as local fi

  • How do i find my ipod that has NO battery?

    I had been studying for some tests i had and doing homework and i had no time to charge my ipod 5g. Its dead so there is no wifi or gps or anything like that. I was wondering if there is an app to find it and that i did not have to install beforehand

  • Import (Tbl Load) without LOG - Tbls read-only (error: -115 and -126)

    Hi everybody, I'm very new to this things, so I'am sorry for mistakes, but I see no other way, then bothering you with what makes me crazy, so I startet in distributing this help scream a little bit more than perhaps needed. But I have a problem with

  • Trouble with Select tool in Acrobat 9

    When I try to make a selection in a .pdf, the selection box is randomly sized and placed.  For example, I select an area in the middle of the page, but when I let go of the mouse the selection box reduces in size and moves up/down the page.  I am sel

  • Is it possible to install Solaris 10 without burning it onto CDs?

    December 16, 2006 Hai! Have downloaded Solaris 10 OS, x86, for downloading onto WINDOWS ONLY Platform - Solaris 10 11/06 Operating System. They are Solaris 10 11/06 x86 CD 1 to CD5. I don't have a CD writer or DVD writer to burn the software onto CDs