Oracle Order Management Order Close Problem

Hi all,
Every last day of month workflow automatically closes the orders which all lines are closed.
But I want to control closing order. When closing order i want to check some values, and decide to close order or keep booked(unclosed). Is there any way to do this without touching the order workflow?
Thanks...
We are using Oracle EBS r11
RDBMS : 10.2.0.5.0
Oracle Applications : 11.5.10.2

You would need to copy the standard workflow to a custom copy and introduce a new node on that wft which called your own code for doing checks as per your requirements and then branches on the result.
If you're not already familiar with Workflow then a good starting point is the relevant chapter is Anil Passi's eBusiness Suite Development & Extensibility Handbook and/or various blogs.
Regards,
Jon

Similar Messages

  • Error: Order Management Order-level sales credit total () must equal 100%

    Hi,
    When I click checkout and fill the details and place the order from minisite , I am getting following error:
    "Error messages from Order Management Order-level sales credit total () must equal 100%.
    Salesperson is required on a booked order.There is an error in order submission."
    I have set ASO : OM Defaulting profile option to Yes.
    Please help me..
    Thanks and regards,
    Muhammed Aslam

    Hi;
    What is EBS version?
    Please see:
    Service Charges Error: Order Level Sales Credit Total() Must Be Equal 100% [ID 394641.1]
    Error Message - "Order-level sales credit total () must equal 100%." [ID 726030.1]
    Order-level sales credit total () must equal 100%-Copy RMA: LINE FLOW - RETURN FOR CREDIT ONLY [ID 1061854.1]
    Regard
    Helios

  • Order Management - Order Imports

    I'm very new to Oracle Order Management, pls give me some guidelines for Order Import.

    Dear friend ,
    You can impoer orders through EDI gateway for that first you need to do the mapping of external system data with Oracle and then you need to identify your requiremnts and according draw TCA structure. After that you can import orders from E-commerce gateway > Process > Import Programme.
    I can reach on [email protected] or [email protected]
    Regards
    Yogesh

  • Order Management/order to cash???

    Hi Gurus,
    what exactly is order management and order to cash?thanks for your reply in advance.
    Mohammed.

    Hi,
    Also please haveĀ  a look at these links.
    <a href="http://www8.sap.com/businessmaps/8F8C7E655D97499E9A4A2DA00D99D843.htm">order to cash scenario</a>
    <a href="http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983476,00.html">order to cash question</a>
    Please reward if helpful.
    Thanks & Regards
    Sadhu Kishore

  • Order Management Sublines

    Hi all,
    How do we define the sublines under the line info in Order Management
    Order Number-->Line -->Sublines.Anybody help me regarding on this.
    Thanks in advance

    Hi
    Usual cycle is this:
    Order Line Shipped --> Installed base updated -->Warranty Contract gets created or updated (replacement)-->Service Agreement Can be bought by customer to create Service Contract.
    This is the cycle in Oracle. I am not sure where you importing these contracts from but if you need order information you do not need to import order for that (that order might have been closed in legacy system . All you need is Installed Base to create sublines.
    These orders are having lines and some lines are also having the sublines.You mean Contracts have lines and somelines do have sublines...Correct?
    Thanks
    Nagamohan

  • After ORA-07445, a part of Oracle Enterprise Manager  not working?

    Hi! Everyone!
    My database was have error message ORA-07445.
    I found document in MetaLink, and try to modified it.
    [https://support.oracle.com/CSP/main/article?cmd=show&type=BUG&id=7038750]
    1. SQL> alter system set event='10422 trace name context forever, level 1' scope=spfile;
    2. shutdown DB & startup DB
    After that, Oracle Enterprise Manager "Space Summary -> Problem Tablespaces " from 5 become 0.
    And since these days, it did not change.
    This is on solaris 10 oracle 10.2.0.4
    How can I make it normal?
    Edited by: user10220946 on Nov 24, 2009 6:12 PM
    Edited by: user10220946 on Nov 24, 2009 7:33 PM

    Hi,
    For Ora-07445 and Ora-0600 raise an SR with oracle support.
    thanks,
    baskar.l

  • How to Ship Partial Quantities using an API - Oracle Order Management

    Hi,
    In Order Management I need to ship the Internal Sales Order Lines partially using an API.
    I have done full shipping but if I trying the partially shipping it is also shipping fully.
    I am unable to find the problem. Is there any set up missed?
    How to do partial shipping.
    I am giving the some part of the code please look into it and suggest me.
    ----**************************UPDATEING SHIPIN ATTR ***************************-------------
    I_changed_attributes (X_count).delivery_detail_id := cos.delivery_detail_id;
    I_changed_attributes (X_count).shipped_quantity := cos.shipped_quantity;
    X_ship_date := cos.act_shipped_date;
    X_slaes_order := cos.sales_order;
    X_org_id := cos.org_id;
    wsh_delivery_details_pub.update_shipping_attributes ( p_api_version_number => 1.0
    ,p_init_msg_list => I_init_msg_list
    ,p_commit => I_commit
    ,x_return_status => O_return_status
    ,x_msg_count => O_msg_count
    ,x_msg_data => O_msg_data
    ,p_changed_attributes => I_changed_attributes
    ,p_source_code => I_source_code
    ----***************************SHIP CONFIRM API ***************************-------------
    I_action_code := 'CONFIRM';
    I_sc_action_flag := 'B'; --'S'; -- Ship entered quantity. 'B' - Ship Entered Quantities, Backorder Unspecified
    --'T' - Ship Entered Quantities, Stage Unspecified'A' - Ship All'C' - Completely Backordered
    I_sc_intransit_flag := 'Y';
    --In transit flag is set to 'Y' closes the pickup stop and sets the delivery in transit.
    I_sc_close_trip_flag := 'Y'; -- Close the trip after ship confirm
    I_sc_trip_ship_method := X_ship_method_code; -- The ship method code
    I_sc_defer_interface_flag := 'Y';
    I_sc_stage_del_flag := 'Y';
    I_sc_create_bol_flag := 'N';
    I_wv_override_flag := 'N';
    -- API Call for Ship Confirmation
    fnd_file.put_line(fnd_file.log,'Calling WSH_DELIVERIES_PUB to Perform Ship Confirmation');
    fnd_file.put_line(fnd_file.log,'=============================================');
    wsh_deliveries_pub.delivery_action ( p_api_version_number => 1.0
    , p_init_msg_list => I_init_msg_list
    , x_return_status => O_return_status
    , x_msg_count => O_msg_count
    , x_msg_data => O_msg_data
    , p_action_code => I_action_code
    -- , p_delivery_id => cos.delivery_id
    , p_delivery_name => G_delivery_name
    , p_sc_action_flag => I_sc_action_flag
    , p_sc_intransit_flag => I_sc_intransit_flag
    , p_sc_close_trip_flag => I_sc_close_trip_flag
    , p_sc_create_bol_flag => I_sc_create_bol_flag
    , p_sc_stage_del_flag => I_sc_stage_del_flag
    , p_sc_trip_ship_method => I_sc_trip_ship_method
    , p_sc_actual_dep_date => X_ship_date --P_act_shipped_dt
    , p_sc_defer_interface_flag => I_sc_defer_interface_flag
    , p_wv_override_flag => I_wv_override_flag
    , x_trip_id => O_trip_id
    , x_trip_name => O_trip_name
    ----***********************************************************************--------------------

    Hi Shesh,
    Thanks you for your replay.
    I am tried Shipping transaction screen but here the ware house is WMS enabled I tried Oracle Mobile Terminal application to do this, but it is not accepting the partial shipping. May be some set up required or the process will be differ.
    I will try your suggested API's .
    Regards,
    Prasanna
    Edited by: 843676 on Apr 23, 2012 10:31 PM
    I am not able to do the Partial Shipment or Backorder as mentioned above API's, but it is split the lines and all the lines are in same state (Awaiting Shipping)
    Edited by: 843676 on Apr 24, 2012 2:45 AM

  • Creation of PO's from Oracle Order Management

    Required Business Scenario
    Customer orders are received via the internet and imported into Oracle Order Management via an open interface table. The customer orders are processed by Oracle OM and converted to Purchase Orders which are then sent to suppliers (as no stock is held at our site). Goods are then shipped directly to the customer by the supplier. We take a commission for the service offered.
    Problem
    As we take a commission for the service described above, the value of the Purchase Order will be different to the value of the original order received via Order Management, however Oracle Purchasing does not allow you to place a Purchase Order on a percentage basis terms. (we will take a small commission as a percentage of the value of the original order meaning the value of the Purchase Order will be slightly less than the value of the original order). The following scenario attempts to explain the situation:
    Order received via Oracle Order Management
    5 units @ $20 = $100
    Purchase Order created from above order (required scenario)
    5 units @ $19.70 = $ 98.5
    Our commission @ 1.5% = $ 1.5
    Has anyone encountered this scenario before? If so I would appreciate assistance in how to resolve this issue. How can we create a Purchase Order from the order received via Order Management which will have a different value and allows us to take a percentage as commission?
    Thanks
    null

    I came across your email on Oracle AppsNet. My company has the
    exact same requirement. Did you ever receive any replys related
    to this issue? If so would you be so kind as to forward them to
    me? Thanks.
    Required Business Scenario>Customer orders are received via the internet and imported into Oracle Order Management via an open
    interface table. The customer orders are processed by Oracle OM
    and converted to Purchase Orders which are then sent to
    suppliers (as no stock is held at our site). Goods are then
    shipped directly to the customer by the supplier. We take a
    commission for the service offered. >Problem >As we take a
    commission for the service described above, the value of the
    Purchase Order will be different to the value of the original
    order received via Order Management, however Oracle Purchasing
    does not allow you to place a Purchase Order on a percentage
    basis terms. (we will take a small commission as a percentage of
    the value of the original order meaning the value of the
    Purchase Order will be slightly less than the value of the
    original order). The following scenario attempts to explain the
    situation:>Order received via Oracle Order Management>5 units @
    $20 = $100>Purchase Order created from above order (required
    scenario)>5 units @ $19.70 = $ 98.5>Our commission @ 1.5% = $
    1.5>Has anyone encountered this scenario before? If so I would
    appreciate assistance in how to resolve this issue. How can we
    create a Purchase Order from the order received via Order
    Management which will have a different value and allows us to
    take a percentage as commission?>Thanks >null

  • Oracle Order Management Sales Order

    Drear all
    i am implement oracle order management ,and this the first once i implement order management and i have many questions i hope i get answer .
    1-first i create sales order and thin i book it.
    2-i go to action and i chose progress order to create supply order -eligible and go to view out put Assemble To Order Mass Load Report and it create a job order and i take it job number
    3-i go to wip discrete job and find my job and release it
    4-i go to wip move transaction
    5-then i go to wip completion transaction
    6-now item delivery in my subinventory
    7-then i go to shipping --to release sales order for picking and go on concurrent tab and go to view my request and get move order number and delivery number
    8-then i go to shipping transaction to confirm ship but i can complete because the action field isn't active
    well that is all i do and i have some question
    1-are any steps i forget it or i do the right steps ?
    2-how i am shipping and confirm ship?and how i close the sales order?
    3-when i create transaction type ONT I Assign IT IN Default LINE TYPE(WORKFLOW), IF i need to add a new line type ,from where screen and what the steps to do that?
    i hope i get help thanks and best regard
    Essam Essmat
    [email protected]

    Essam - That's probably a bit too much to cover in a forum. If you have a Metalink account, then go to the top tech docs and download the AR and OM user guides - if not, the 11.5.9 guides are here: http://download-east.oracle.com/docs/cd/B12190_11/current/html/docset.html
    On Metalink, there is also a subsection under the top tech docs called business flows, there you can find information on the flow from order to cash etc.

  • Can oracle inventory forecasting be used without order management??

    Can someone please tell me how oracle forecasts are used.
    Like i have configured and tested it but i want to know how it calculates forecasting and whether it can be used without order management module or not
    when i define item comsumption entries and gvie a quantity in current, the ending date and then see bucketed, it shows same forecasted quantity for all periods that i entered in item comsumption entries
    I dont understand this
    And why is forecasting necessary for reorder point planning
    Some please explain
    Thanks
    Emm

    Query: "can oracle inventory forecasting be used without order management?"
    Yes, in that case it can accept manually entered forecasts or forecast generated from Inventory demand history (say Miscellaneous issue, Inter-org Transfer, Issue to WIP) excluding Sales Order issues (as OM is not included).
    For remaining questions you can refer to my earlier post under the following thread. Please refer to the bottom section (thread was started with a different subject)
    serial attribute and org attribute problems with item master
    If your questions are answered you can mark the thread as appropriate.
    Thanks
    - Supro

  • Is Paypal a supported Payment Method in Oracle Order Management?

    Hi there -
    Has anybody implemented Paypal as payment method for Oracle Order Management?
    We are on 11510 and looking to add Paypal as payment method apart from existing Credit Card, ACH etc.
    I found a very old (2008) note on metalink that says there is an enhancement request for this.
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=351691.1
    We use Paymentech as payment processor.
    Let me know...
    1. If it's supported with Oracle 11510
    2. Anyone has any experience implementing it.
    thanks,
    Edited by: techy on Oct 25, 2010 12:56 PM

    Hi Stephen-
    First of all thanks for your response.
    Please note that I am not talking about using Paypal as payment processor (similar to Paymentech) but I am talking about using "Paypal" payment method for getting payments from your customers.
    As per my brief understanding, I know that Paypal too provides payment processing functionality where I can get my customer Credit Card, bank accounts etc. validated through paypal tool (I think it's call payflow pro similar to paymentech).
    Again, we are on 11510 right now so R12 functionality may not be useful for us.
    Also, we have already integrated and been using paymentech for payment processing for Credit Cards, ACH etc within 11510. There is no issue about that.
    I hope this is clear.
    Edited by: techy on Oct 25, 2010 2:42 PM

  • Defaulting setup in Oracle Order Management

    Hello Guys,
    I am trying to add SHIP_FROM_ORG in the defaulting setup's for line level of OM. Could you guys give me a clue and that will be great.
    Problem---> Opening SO form in OM, it is throwing an note "Cannot get Valid Name for - Ship_from_org"
    That's why i am trying to set that field in defaulting setup's.
    Thanks
    Vinoth

    API for Quote in Order Management is OE_ORDER_PUB.PROCESS_ORDER, Note this is different from CRM ASO_QUOTE_PUB
    This is the same as for regular Order excepting populate TRANSACTION_PHASE_CODE = 'N'
    To create an Order from the Sales Quote you may have to fire 2 workflows OE_NEGOTIATE_WF.Submit_Draft and OE_NEGOTIATE_WF.Customer_Accepted prior to OE_Order_Book_Util.Complete_Book_Eligible
    Hope this helps someone

  • OPM/Oracle Order Management

    What are the pro's and con's of switching from OPM Order Fulfillment to Oracle Order Management?
    We use Order Fulfillment now and are concern we will lose the profile functionality when and if we upgrade.

    OPM Order Fulfillment is a simple to use Order Entry and Shipping application that meets the needs of many process manufacturers.
    Oracle Order Management is more flexible and configurable to suit a number of different industries. Oracle Process Manufacturing is integrated
    to Order Management and has functionality to support entry of order quantities in two units of measure, as well as designation
    of a preferred quality grade and automatic allocation of process inventory.
    In place of the Order Profile (or order template) functionality available in Order Fulfillment, we recommend using the Copy Order
    functionality in Order Management. You can establish a special order type in Order Management (you can call it Template or
    Profile) and assign a workflow to the order type that makes it "non-transactable" (the order stays in an "entered" state so that
    it can't be booked or shipped). You can query on these special order types and copy them to create standard orders. When you
    copy an order in Order Management, you can change the order type, so the Template order can be copied and the new order
    type can be "Standard".

  • Upgrading Oracle Order Management from R12.1.1 to R12.1.3

    Hi Forum,
    Currently we are on Oracle R12.1.1 and we have a requirement to upgrade only the OM section of Oracle EBS (Order Management module) to R12.1.3. In order to do this what are the patches that we need to apply? Any specific Oracle Support note we can refer to?
    Thanks,
    Chamil

    Currently we are on Oracle R12.1.1 and we have a requirement to upgrade only the OM section of Oracle EBS (Order Management module) to R12.1.3. In order to do this what are the patches that we need to apply? Any specific Oracle Support note we can refer to?You cannot upgrade certain module and in order to go from 12.1.1 to 12.13 you need to refer to:
    Oracle E-Business Suite Release 12.1.3 Now Available
    http://blogs.oracle.com/stevenChan/2010/08/ebs_1213_available.html
    If you want to get the latest OM patchset, please refer to:
    Oracle Applications Current Patchset Comparison Utility - patchsets.sh [ID 139684.1]
    MOS > Patches & Updates > Recommended/Latest R12 Patchsets
    Thanks,
    Hussein

  • Tuning Oracle Applicatons Order Management Query

    Hi
    We are trying to build a Order Management related workbench for this I have created below query as per the client requirement.
    And I have to use one package function to get Available_qty based on client defination. Package Function name is "xx_eg_calculated_onhand".
    User will query this view based on Customer_id and Salesperson_id. When this view executed with these two values its taking long time.
    But, if user queries with order_number it is getting executed fastly. Could somebody let me know what should I do to get this query execute fast when
    user query with either customer_id or salesrep_id OR both.
    CREATE OR REPLACE VIEW xxrelease_sales_orders_v (row_id,
    sales_oder,
    cust_po_number,
    line_id,
    carrier,
    segment1,
    customer_item_number,
    description,
    ship_from,
    ship_to,
    request_date,
    order_quality,
    available_qty,
    shipped_quality,
    uom,
    customer_name,
    sales_person_name,
    delivery_detail_id,
    cust_hold,
    release_check,
    line_status,
    organization_code,
    org_id,
    order_number,
    tolerance,
    delivery_id,
    organization_id,
    salesrep_id,
    party_id,
    inventory_item_id,
    header_id,
    cust_account_id,
    location_id,
    cust_acct_site_id
    AS
    SELECT      a.row_id,
              a.Sales_Order,
              a.Cust_Po_Number,
              a.Line_ID,
              a.Carrier,
              a.segment1,
              a.Customer_Item_Number,
              a.description,
              a.Ship_From,
              a.ship_to,
              a.request_date,
    a.order_quality,
              DECODE(SIGN(a.Available_qty),-1, 0, a.available_qty) Available_Qty,
              DECODE(SIGN(LEAST(a.order_quality, a.Available_qty)), -1,0, LEAST(a.order_quality, a.Available_qty)) Shipped_Qty,
              a.uom,
              a.Customer_Name,
              a.Sales_Person_Name,
              a.delivery_detail_id,
              a.cust_hold,
              a.release_check,
              a.Line_status,
              a.organization_code,
              a.org_id,
              a.order_number,
    a.tolerance,
              a.delivery_id,
              a.organization_id,
              a.salesrep_id,
              a.party_id,
              a.inventory_item_id,
              a.header_id,
              a.cust_account_id,
              a.location_id,
              a.cust_acct_site_id
    From (
    SELECT     ooh.ROWID row_id,
              ooh.order_number||'-'||ool.line_number||'.'||ool.shipment_number Sales_Order,
              ool.cust_po_number,
              ool.line_id,
              NVL (ool.freight_carrier_code, 'NA') carrier,
              msi.segment1,
              ool.ordered_item Customer_Item_Number,          
              msi.description,
              haou.name Ship_From,
              hl.city || ' ' || hl.state || ' ' || hl.postal_code ship_to,
              NVL (ool.request_date, SYSDATE) request_date,
    NVL (ool.ordered_quantity, 0) order_quality,
              xxeg_releaseworkbench_form_pkg.xx_eg_calculated_onhand(ool.line_id) Available_qty,
              ool.order_quantity_uom uom,
              hp.party_name Customer_Name,
              hca.account_number Customer_Number,
              jrs.name Sales_Person_Name,
              wdd.delivery_detail_id,
              0 cust_hold,
              0 release_check,
              oe_line_status_pub.Get_Line_Status(ool.line_id, ool.flow_status_code) Line_status,
              ool.org_id,
              ooh.order_number,
    NVL (ool.ship_tolerance_above, 0) tolerance,
              wda.delivery_id,
              ool.ship_from_org_id organization_id,
              jrs.salesrep_id,
              hp.party_id,
              msi.inventory_item_id,
              ooh.header_id,
              hca.cust_account_id,
              hps.location_id,
              hcsu.cust_acct_site_id,
              ooh.ship_to_org_id site_use_id,
              hcas.party_site_id,
              '0' organization_code
    FROM      oe_order_headers_all ooh,
              oe_order_lines_all ool,
              wsh_delivery_details wdd,
              wsh_delivery_assignments wda,
              mtl_system_items_b msi,
              hz_cust_accounts hca,
              hz_parties hp,
              jtf_rs_salesreps jrs,
              hz_cust_site_uses_all hcsu,
              hz_cust_acct_sites_all hcas,
              hz_party_sites hps,
              hz_locations hl,
              hr_all_organization_units haou
    WHERE      ooh.header_id = ool.header_id     
    AND          ooh.header_id = wdd.source_header_id
    AND          ool.line_id     = wdd.source_line_id
    AND          wdd.delivery_detail_id = wda.delivery_detail_id
    AND          ool.inventory_item_id = msi.inventory_item_id
    AND          ooh.ship_from_org_id = msi.organization_id
    AND          ooh.sold_to_org_id      = hca.cust_account_id
    AND          hca.party_id          = hp.party_id
    AND          ool.salesrep_id          = jrs.salesrep_id
    AND          ool.org_id               = jrs.org_id
    AND          ooh.ship_to_org_id     = hcsu.site_use_id
    AND          hcsu.cust_acct_site_id = hcas.cust_acct_site_id
    AND          hcas.party_site_id     = hps.party_site_id
    AND          hps.location_id          = hl.location_id
    AND          ool.ship_from_org_id = haou.organization_id
    AND          wdd.released_status     = 'R'
    AND          hcsu.site_use_code     = 'SHIP_TO'
    AND      ool.flow_status_code = 'AWAITING_SHIPPING'
    --and     hca.cust_account_id = 1531 and jrs.salesrep_id = 100000060
    --AND          ooh.order_number = '361130'
    ) a
    Function
    FUNCTION xx_eg_calculated_onhand (p_so_line_id IN NUMBER) RETURN NUMBER IS
    --CREATE OR REPLACE PROCEDURE xx_eg_calculated_onhand (p_so_line_id IN NUMBER) IS
    -- Steps Involved to calculate the onhand availability
    --     1. Get Inventory Item ID and Warehouse from given sales order line ID
    -- Local Variable Declration
         l_inventory_item_id          apps.oe_order_lines_all.inventory_item_id%TYPE := 0;
         l_organization_id          apps.oe_order_lines_all.ship_from_org_id%TYPE := 0;
         l_order_quantity_uom          apps.oe_order_lines_all.order_quantity_uom%TYPE := '';
         l_primary_uom_code          apps.mtl_system_items_b.primary_uom_code%TYPE := '';
         l_onhand_reserve          NUMBER(15,2) := 0;
         l_hard_reservation          NUMBER(15,2) := 0;
         l_so_soft_reservation          NUMBER(15,2) := 0;
         l_wo_soft_reservation          NUMBER(15,2) := 0;
         l_so_released_ware_qty          NUMBER(15,2) := 0;
    -- Cursor declrations
         -- Get inventory item, warehouse and order UOM Details
         CURSOR      Get_inv_and_org_details IS
         SELECT     ool.inventory_item_id,
              ool.ship_from_org_id,
              ool.order_quantity_uom,
              msi.primary_uom_code
         FROM     apps.oe_order_lines_all ool,
              apps.mtl_system_items_b msi
         WHERE     ool.line_id = NVL(p_so_line_id,0)
         AND     ool.inventory_item_id      = msi.inventory_item_id
         AND     ool.ship_from_org_id     = msi.organization_id;
         -- Get Hard Reservation details for given item and warehouse
         CURSOR     Get_Hard_reservation(p_inventory_item_id IN NUMBER, p_organization_id IN NUMBER) IS
         SELECT     SUM(reservation_quantity)
         FROM     apps.mtl_reservations
         WHERE     inventory_item_id      = NVL(p_inventory_item_id,0)
         AND     organization_id          = NVL(p_organization_id, 0)
         AND     demand_source_line_id <> p_so_line_id;
         -- Get Soft reservation details for given item and warehouse for Sales order
         CURSOR     Get_so_soft_reservation (p_inventory_item_id IN NUMBER, p_organization_id IN NUMBER) IS
         SELECT     SUM(mlqv.onhand_qty)
         FROM      xxapps.xx_eg_lot_reservations xelr,
              xxapps.mtl_lot_qty_vw mlqv,
              apps.oe_order_lines_all ool
         WHERE     xelr.lot_no      = mlqv.lot_no
         AND     xelr.so_line_id = ool.line_id
         AND     mlqv.org_id      = ool.ship_from_org_id
         AND     mlqv.item_id      = ool.inventory_item_id
         AND     mlqv.org_id      = p_organization_id
         AND     mlqv.item_id      = p_inventory_item_id;
         -- Get Soft reservation details for given item and warehouse for work orders
         CURSOR     Get_wo_soft_reservation (p_inventory_item_id IN NUMBER, p_organization_id IN NUMBER) IS
         SELECT     SUM(mlqv.onhand_qty)
         FROM      xxapps.xx_eg_lot_reservations xelr,
              xxapps.mtl_lot_qty_vw mlqv,
              wip.wip_requirement_operations wro
         WHERE     xelr.lot_no           = mlqv.lot_no
         AND     xelr.wip_entity_id      = wro.wip_entity_id
         AND     mlqv.org_id           = wro.organization_id
         AND     mlqv.item_id           = wro.inventory_item_id
         AND     mlqv.org_id           = p_organization_id
         AND     mlqv.item_id           = p_inventory_item_id;
         -- Get Sales order lines quantity for the shipment status 'Released to Wareshoue'
         CURSOR     Get_so_qty (p_inventory_item_id IN NUMBER, p_organization_id IN NUMBER) IS
         SELECT      SUM(requested_quantity)
         FROM      apps.wsh_deliverables_v
         WHERE released_status='S'
         AND     inventory_item_id = p_inventory_item_id
         AND organization_id = p_organization_id;
    BEGIN
         Dbms_output.put_line('Function Started with so_line_id = '||p_so_line_id);
         -- Get the inventory_item_id and warehouse id and
         --     ordered quantity uom details
         -- By opening the cursor Get_inv_and_org_details
         OPEN Get_inv_and_org_details;
         FETCH Get_inv_and_org_details INTO l_inventory_item_id,l_organization_id,l_order_quantity_uom,l_primary_uom_code;
         CLOSE Get_inv_and_org_details;
         Dbms_output.put_line('Inventory item id = '||l_inventory_item_id||' and warehouse id = '||l_organization_id);
         IF (l_inventory_item_id = 0 OR l_inventory_item_id IS NULL) OR
              (l_organization_id = 0 OR l_organization_id IS NULL) THEN
              dbms_output.put_line('No inventory/wareshouse details available for given sales order line');
              RETURN 0;
         END IF;
         -- Get onhand available to reserve quantity using API
         -- passing inventory item id and organization id as
         -- a parameters.
         l_onhand_reserve     := apps.xx_utility_pkg.Get_Available_to_Reserve_org(l_inventory_item_id,l_organization_id);
         Dbms_output.put_line('Onhand availability to Reserve quantity = '||l_onhand_reserve);
         -- Get hard reservation quantity by
         -- passing inventory item id and organization id as
         -- a parameters to cursor Get_Hard_reservation
         OPEN Get_Hard_reservation(l_inventory_item_id,l_organization_id);
              FETCH Get_Hard_reservation INTO l_hard_reservation;
         CLOSE Get_Hard_reservation;
         Dbms_output.put_line('Hard Reserve quantity = '||l_hard_reservation);
         -- Get Soft reservation quantity by
         -- passing inventory item id and organization id as
         -- a parameters to cursor
         --     Get_so_soft_reservation for sales lines
         OPEN Get_so_soft_reservation(l_inventory_item_id,l_organization_id);
              FETCH Get_so_soft_reservation INTO l_so_soft_reservation;
         CLOSE Get_so_soft_reservation;
         -- Get Soft reservation quantity by
         -- passing inventory item id and organization id as
         -- a parameters to cursor
         --     Get_wo_soft_reservation for work orders
         OPEN Get_wo_soft_reservation(l_inventory_item_id,l_organization_id);
              FETCH Get_wo_soft_reservation INTO l_wo_soft_reservation;
         CLOSE Get_wo_soft_reservation;
         -- Get Sales order line sum quantity for those
         -- lines which has a status of 'Released to Warehouse'
         -- at their shipment level for given parameters
         OPEN Get_so_qty(l_inventory_item_id,l_organization_id);
              FETCH Get_so_qty INTO l_so_released_ware_qty;
         CLOSE Get_so_qty;
         INSERT INTO xxapps.xxeg_calculated_onhand_tbl
                   order_line_id,
                   inventory_item_id,
                   organization_id,
                   available_to_reserve,
                   hard_reservation,
                   soft_reservation_so,
                   soft_reservation_wo,
                   other_so_lines_qty,
                   run_date
                   VALUES
                   p_so_line_id,
                   l_inventory_item_id,
                   l_organization_id,
                   NVL(l_onhand_reserve,0),
                   NVL(l_hard_reservation,0),
                   NVL(l_so_soft_reservation,0),
                   NVL(l_wo_soft_reservation,0),
                   NVL(l_so_released_ware_qty,0),
                   sysdate
         Commit Work;
    Create table xxapps.xxeg_calculated_onhand_tbl
         order_line_id          NUMBER,
         inventory_item_id      NUMBER,
         organization_id      NUMBER,
         available_to_reserve      NUMBER,
         hard_reservation     NUMBER,
         soft_reservation_so     NUMBER,
         soft_reservation_wo     NUMBER,
         other_so_lines_qty     NUMBER,
         run_date          DATE
         RETURN (NVL(l_onhand_reserve,0) + NVL(l_hard_reservation,0) - (NVL(l_so_soft_reservation,0) + NVL(l_wo_soft_reservation,0)) - NVL(l_so_released_ware_qty,0));
    EXCEPTION
    WHEN others THEN
         RETURN (0);
    END xx_eg_calculated_onhand;
    Kiran

    Hi
    I have gathered a explain plan. Could somebody let me know whats going on.
    plan_table_output
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 1 | 404 | 87 |
    | 1 | NESTED LOOPS | | 1 | 404 | 87 |
    | 2 | NESTED LOOPS | | 1 | 374 | 86 |
    | 3 | NESTED LOOPS | | 1 | 323 | 85 |
    | 4 | NESTED LOOPS | | 1 | 300 | 84 |
    | 5 | NESTED LOOPS | | 1 | 290 | 83 |
    | 6 | NESTED LOOPS | | 1 | 280 | 80 |
    | 7 | NESTED LOOPS | | 1 | 261 | 79 |
    | 8 | NESTED LOOPS | | 1 | 209 | 78 |
    | 9 | NESTED LOOPS | | 1 | 192 | 75 |
    | 10 | NESTED LOOPS | | 1 | 164 | 74 |
    | 11 | NESTED LOOPS | | 1 | 76 | 72 |
    | 12 | NESTED LOOPS | | 1 | 46 | 3 |
    | 13 | TABLE ACCESS BY INDEX ROWID| HZ_CUST_ACCOUNTS | 1 | 16 | 2 |
    |* 14 | INDEX UNIQUE SCAN | HZ_CUST_ACCOUNTS_U1 | 1 | | 1 |
    | 15 | TABLE ACCESS BY INDEX ROWID| HZ_PARTIES | 1 | 30 | 1 |
    |* 16 | INDEX UNIQUE SCAN | HZ_PARTIES_U1 | 1 | | |
    | 17 | TABLE ACCESS BY INDEX ROWID | OE_ORDER_HEADERS_ALL | 1 | 30 | 69 |
    |* 18 | INDEX RANGE SCAN | OE_ORDER_HEADERS_N2 | 1 | | 1 |
    |* 19 | TABLE ACCESS BY INDEX ROWID | OE_ORDER_LINES_ALL | 1 | 88 | 2 |
    |* 20 | INDEX RANGE SCAN | OE_ORDER_LINES_N1 | 6 | | 1 |
    | 21 | TABLE ACCESS BY INDEX ROWID | JTF_RS_SALESREPS | 1 | 28 | 1 |
    |* 22 | INDEX UNIQUE SCAN | JTF_RS_SALESREPS_U1 | 1 | | |
    |* 23 | TABLE ACCESS BY INDEX ROWID | WSH_DELIVERY_DETAILS | 1 | 17 | 3 |
    |* 24 | INDEX RANGE SCAN | WSH_DELIVERY_DETAILS_N3 | 4 | | 2 |
    | 25 | TABLE ACCESS BY INDEX ROWID | MTL_SYSTEM_ITEMS_B | 1 | 52 | 1 |
    |* 26 | INDEX UNIQUE SCAN | MTL_SYSTEM_ITEMS_B_U1 | 1 | | |
    |* 27 | TABLE ACCESS BY INDEX ROWID | HZ_CUST_SITE_USES_ALL | 1 | 19 | 1 |
    |* 28 | INDEX UNIQUE SCAN | HZ_CUST_SITE_USES_U1 | 1 | | |
    | 29 | TABLE ACCESS BY INDEX ROWID | WSH_DELIVERY_ASSIGNMENTS | 1 | 10 | 3 |
    |* 30 | INDEX RANGE SCAN | WSH_DELIVERY_ASSIGNMENTS_N3 | 1 | | 2 |
    | 31 | TABLE ACCESS BY INDEX ROWID | HZ_CUST_ACCT_SITES_ALL | 1 | 10 | 1 |
    |* 32 | INDEX UNIQUE SCAN | HZ_CUST_ACCT_SITES_U1 | 1 | | |
    |* 33 | TABLE ACCESS BY INDEX ROWID | HZ_PARTY_SITES | 1 | 23 | 1 |
    |* 34 | INDEX UNIQUE SCAN | HZ_PARTY_SITES_U1 | 1 | | |
    |* 35 | TABLE ACCESS BY INDEX ROWID | HZ_LOCATIONS | 1 | 51 | 1 |
    |* 36 | INDEX UNIQUE SCAN | HZ_LOCATIONS_U1 | 1 | | |
    | 37 | TABLE ACCESS BY INDEX ROWID | HR_ALL_ORGANIZATION_UNITS | 1 | 30 | 1 |
    |* 38 | INDEX UNIQUE SCAN | HR_ORGANIZATION_UNITS_PK | 1 | | |
    Predicate Information (identified by operation id):
    14 - access("HCA"."CUST_ACCOUNT_ID"=1531)
    16 - access("HCA"."PARTY_ID"="HP"."PARTY_ID")
    18 - access("OOH"."SOLD_TO_ORG_ID"=1531)
    filter("OOH"."SOLD_TO_ORG_ID"="HCA"."CUST_ACCOUNT_ID")
    19 - filter("OOL"."FLOW_STATUS_CODE"='AWAITING_SHIPPING' AND "OOL"."SALESREP_ID"=100000060)
    20 - access("OOH"."HEADER_ID"="OOL"."HEADER_ID")
    22 - access("JRS"."SALESREP_ID"=100000060 AND "OOL"."ORG_ID"="JRS"."ORG_ID")
    filter("OOL"."SALESREP_ID"="JRS"."SALESREP_ID")
    23 - filter("OOH"."HEADER_ID"="WDD"."SOURCE_HEADER_ID" AND "WDD"."RELEASED_STATUS"='R')
    24 - access("OOL"."LINE_ID"="WDD"."SOURCE_LINE_ID")
    26 - access("OOL"."INVENTORY_ITEM_ID"="MSI"."INVENTORY_ITEM_ID" AND
    "OOH"."SHIP_FROM_ORG_ID"="MSI"."ORGANIZATION_ID")
    27 - filter("HCSU"."SITE_USE_CODE"='SHIP_TO')
    28 - access("OOH"."SHIP_TO_ORG_ID"="HCSU"."SITE_USE_ID")
    30 - access("WDD"."DELIVERY_DETAIL_ID"="WDA"."DELIVERY_DETAIL_ID")
    32 - access("HCSU"."CUST_ACCT_SITE_ID"="HCAS"."CUST_ACCT_SITE_ID")
    33 - filter("HZ_PARTY_SITES"."ACTUAL_CONTENT_SOURCE"<>'DNB' AND
    "HZ_PARTY_SITES"."ACTUAL_CONTENT_SOURCE"<>'SST')
    34 - access("HCAS"."PARTY_SITE_ID"="HZ_PARTY_SITES"."PARTY_SITE_ID")
    35 - filter(NVL("HZ_LOCATIONS"."ACTUAL_CONTENT_SOURCE","HZ_LOCATIONS"."CONTENT_SOURCE_TYPE")<>'DNB'
    AND NVL("HZ_LOCATIONS"."ACTUAL_CONTENT_SOURCE","HZ_LOCATIONS"."CONTENT_SOURCE_TYPE")<>'SST')
    36 - access("HZ_PARTY_SITES"."LOCATION_ID"="HZ_LOCATIONS"."LOCATION_ID")
    38 - access("OOL"."SHIP_FROM_ORG_ID"="HAOU"."ORGANIZATION_ID")
    Note: cpu costing is off
    Regards
    Kiran

Maybe you are looking for

  • Using Apple remote in multiple macs environment

    I'm sure this came up sometime I just didn't find it.... While using the apple remote for presenting in uni class full of students with macs.... well, strange thing happened. Is there a way of making the remote working ONLY on my computer? Pairing ma

  • Oracle procedure problem

    I'm doing a final year project through oracle and java with a bit of pl/sql also. i have recently come across a problem and was wonderiing if any one could help me to resolve it. I need to know if it is possible to develop a webpage through using htm

  • Using eMac keyboard with iMac help needed.

    I have an iMac from around 2009, at the weekend the keyboard stopped working and until I can afford a replacement a friend has given me an old eMac keyboard he had spare to use in the meantime (which could be a while). Just this morning I've realised

  • Jax-ws deployment

    I want to create simple (extremly simple) webservice with jax-ws, but there is no good tutorial on internet. JEE tutorial uses ant with not enough explanation. Can some body explian me step by step jaxws webservice deployment (on tomcat is better) wi

  • Regarding Migration from Testing to Development

    Hi All, I am going to migrate from Windows 32-bit to unix 64 bit. I am using hyperion 9.3.1. I dont know, how to migrate from windows 32 bit to unix 64 bit. I want to migrate Planning, Essbase and Shared Services. This is the first time, i am doing t