Qty Rounding in PO

Hi All
I want to do rounding in the existing unit of measure. e.g. my requirement generated is 33 EA and 1 Pac = 10 EA. If i take PAC as ordering unit, system creates PO of 3 PAC. This is fine absolutely. I want rounding in base unit of measurement. e.g. requirement generated is 33 EA. I want to fix EA as ordering unit and PO qty should be rounded to 30 EA.
I mean if i take alternative UOM as ordering unit, it works fine. If my base UOM and ordering UOM is same, rounding doesn't take place.
Is it possible to do rounding at UOM in which requirement got generated??? Requirement generated in EA, and i want to do rounding at EA not PAC.
Gud answer will be awarded fully.
Regards
Kapil

You can do this using Rounding profile. This can be maintained in the material master MRP1 view- lot size data. Secondly you can also maintain it in the Info Record if you want different values vendor wise.
From SAP help
In Customizing, enter a threshold value from which the system should round up to the next value per deliverable unit:
+If the requirements value exceeds the first threshold value, the system always rounds up to the next multiple of the level found
If the requirements value falls below the first threshold value, the system copies the original requirements value.+

Similar Messages

  • Qty rounding in variant config

    Hi,
    I am using variant configuration. I have a numeric characteristic of "credits" with a reference characteristic and object dependancy procedure that overwrite the bom quantity. When the sales order is entered, the user inputs a # in the VC and that becomes the order quantity.
    The material associated with "credits" has a UoM as "EA".
    Everything works fine when whole numbers are entered in the VC. The problem is when non-whole numbers (10.5 or 14.25) are entered. The system allows the entry, but the number is always rouned up to the nearest whole number - so 10.5 becomes 11.
    I have the exact same set up with another numeric characteristic, but the material associated has a UoM of "Hrs" and I do not see any rounding issues.
    I've tried setting the UoM on the "credits" characteristic to "hrs" but the rounding issue still occurs - I'm thinking because it always goes back to the material master.
    Does anyone have any ideas for how I can address this and stop it without having to re-create the material with a different UoM?
    Thanks in advance.
    Rachelle

    You can do this using Rounding profile. This can be maintained in the material master MRP1 view- lot size data. Secondly you can also maintain it in the Info Record if you want different values vendor wise.
    From SAP help
    In Customizing, enter a threshold value from which the system should round up to the next value per deliverable unit:
    +If the requirements value exceeds the first threshold value, the system always rounds up to the next multiple of the level found
    If the requirements value falls below the first threshold value, the system copies the original requirements value.+

  • Component Qty round off in production order

    Dear all Hi,
    I have a ROH material maintained as TON in MM. For calculating the qty required of this component i have maintained the formula in BOM as X factor multiplied with Y factor & divided by 1000 to get the output componenet qty in ton.
    Though the system is calculating & displaying the qty in in ton with three decimals but the problem is that system is not giving the EXACT first three digits after decimal.
    Example:
    (16.08x0.22/1000x49 = 0.173 this should be the output in production order but it is displaying as 0.196
    Kindly suggest a solution that system should display the actual first three didgits after decimal as it is.
    Thanks in advance.

    Hi Shaiz,
    Check is there any Component scrap is maintain in BOM or Material Master.
    I think there is 10 to 15 % component scrap is maintain either it is in BOM or in Material Master (MRP 4)
    Regards,
    Dhaval

  • Unit of measure - rounding off during creation of planned order

    Dear All,
    We have defined one material OIL in MM41 and its UoM is EA also we have put alternative UoM is L(liter).
    now we create BOM of semifinished material we use this oil as a component and enter its value in decimal points.
    e.g 0.375 EA
    During planned order creation or REM backflush system convert this quantity to 1 EA ,WE dont want this automatic conversion .
    We have uploaded all master data in production and now it is very difficult to change all BOM
    So what is the solution of this that system can not convert qty (rounding off).EA
    Kindly reply
    Sunil

    Hi Sunil,
    IN CUNI Transaction Field Decimal Places is for displaying the decimals,there is a decimal place Rounding off field below,there try to maintain 3 decimals and check whether it is working.
    One more thing is Unit EA will be used always as non decimal unit,But i dont know in your buisness how for unit EA there is a decimal qty
    Edited by: Girish  Adaviswamy on Mar 2, 2010 10:59 AM

  • Error in confirmed qty after V_V2 update

    Hi Experts
    This is a very strange issue im facing. The scenario is as explained:
    The moment, there is an inward delivery in the warehouse, the user runs the rescheduling program V_V2 to update the confirmed quantity of backorders.
    The problem here is, the confirmed quantity of the main item in material substitution is wrongly updated as completely confirmed even thoug the sum of the confirmed quantities in the sub items is not equal to the order quantity.
    Example:
    Item 10 of sales order created for 50 NOS on 21.04.2011.
    Due to material substitution, Item 11 and item 12 are generated for 20 NOS and 30 NOS respectively
    21.04.2011
    Item          Ord Qty        Rounded Qty          Confirmed Qty     Item Category
      Item 10      50                    50                         20                              TAX
      Item 11      20                    20                         20                              TAPS
      Item 12      30                    30                         00                              TAPS
    Looks fine till here.
    25.04.2011 - V_V2 run by the user.
    Item          Ord Qty        Rounded Qty          Confirmed Qty     Item Category
      Item 10      50                    50                         50                              TAX
      Item 11      20                    20                         20                              TAPS
      Item 12      30                    30                         00                              TAPS
    Here as you can see, the confirmed Qty of the main item is changed to 50 even though stock not available.
    Due to this, orders which have these issues are appearing in the delivery due list in VL10A, though they dont have stock available to deliver the goods.
    I have checked in MD04, CO09 and checked every other settings related to availability check but in vain.
    I even tried CO06 to change the confirmed quantities, but only the sub items are appearing in the list there.
    Please advise what needs to be done.
    Thanks & Regards
    Madhu
    Edited by: Madhu Naidu on May 2, 2011 12:51 PM
    Edited by: Madhu Naidu on May 2, 2011 2:17 PM

    Hi Marian
    Thanks for your response.
    I checked OVZ9 and there only reservations, sales reqmts and deliveries are ticked for inward/outward movments.
    Yes you are right that in rule 02 / RP, it considers all movements. In that case why only the confirmed qty of the main item is updated incorrectly and the sub items are not. And how to avoid this as this is including order items (orders) without physical stock also in the delivery due list in VL10A.
    Thanks & Regards
    Madhu

  • Sales Orders Report - Requested Delivery date fails.

    Hello,
    If a customer orders Item A Quantity 10 with a requested delivery date as 10.09.2008
    In sales orders under Schedule line tab it will be displayed as below if schedule line fails
    Delivery date Order Qty Rounded Qty Confirmed Qty
    10.09.2008     10     10     0
    20.09.2008     0     0     10
    Customers get the goods not on his requested delivery date but some time later.
    My requirement is I need to get the list of sales orders (like as we get the list of incomplete sales orders in V.02) where the requested delivery date fails and confirms next delivery date.
    Is there any such standard report available???
    Thanks in advance.
    Regards,
    Vamsi

    Hi
    This is not available as a standard report. Consult your ABAPer to develop a Zreport. The system will compare the requested delivery date and the schedule line date and if the delivery date in the schedule line doesn't match with the requested delivery date, those schedule lines along with the details of the material, sales order number etc., will be displayed in the report. You have to give the ABAPer the details like..how the input screen should be, how the output screen should be and the proper logic for obtaining the required output.
    Thanks,
    Ravi

  • Schedule lines combined in sales order

    Dear All,
    We have a sales order item with say 2 schedule lines as below
    Date                  Order Qty      Rounded Qty     Conf. Qty     Delivered Qty
    05.10.2010        60                  60                      0                  0
    18.11.2010        0                    0                        60                10
    Now, if we want to unconfirm the undelivered quantity and to do this we make the order qty = delivered qty and then change back the order qty to original qty, all this with ATP check off.
    We expect it to be ...
    Date                  Order Qty      Rounded Qty     Conf. Qty     Delivered Qty
    05.10.2010        60                  60                      0                  0
    18.11.2010        0                    0                        10                10
    It works but in some cases Sometimes, we notice that SAP moves old delivered  lines to first schedule line. Hence, we loose the schedule line information.
    Date                  Order Qty      Rounded Qty     Conf. Qty     Delivered Qty
    05.10.2010        60                  60                      10                  10
    Does anyone have an idea why SAP does this and how can we avoid this. This is really important for us, any help will be greatly appreciated.
    If anyone could also suggest a better way to unconfirm undelivered qty from schedule lines also.
    Best Regards,

    You can try to use delivery block at header level. Copy the delivery block credit limit and create a Z-block(t.code OVLS The path is SPRO->Logistics execution->shipping->deliveries->define reasons for blocking in shipping). When this block is assigned the confirmed quantities will be removed. Once  business approves, the block can be removed so that the remaining quantity will be confirmed. Just test first using the credit limit block in test system and if the results are OK, then you can create a new block.
    PS: Please close threads once those are answered. There are old threads still with open status and you action to close those are appreciated.
    Regards,

  • Sales order : Creation of VBAP main lines from VBEP schedule lines

    Hello , I am working on SAP sales order interfacing with legacy system. This is the scenario where legacy system orders will come to SAP system for availability check. I mean , the legacy system sales order are replicalted in SAP system. and the availability check runs for it in APO. 
    Based on the SAP system stock availability , the sub item or sub items ( schedule lines) will be created in the sales order. Here is one example of partial quantity availability.Below example shows that sap system has received a order of quantity 100.
    SAP stock available is only 20 for 29th may. Another quantity 80 will be available on 30th May.
    So system will create two sub items or two schedule lines.
    But when I save the sales order the sub-items lines should be converted into main item lines as shown in the below example in after save.
    I tried this developement by using MV45AFZZ. User exit - SAVE_DOCUMENT_PREPARE. But I am not getting right results.
    I short , I would like to have single schedule line for one item line. And if there are multiple schedlue lines then for each schedule line one item line should be created automatically by the system
    Before Save
    Item
    Schedule line
    Req Date
    Req Qty
    Rounding Qty
    Confirmation Qty
    40
    1
    29th May
    100
    100
    20
    2
    30th May
    80
    After Save
    Item
    Schedule line
    Req Date
    Req Qty
    Rounding Qty
    Confirmation Qty
    40
    1
    29th May
    20
    20
    20
    41
    1
    29th May
    80
    80
    2
    30th May
    80

    Hi Ravindra,
    I think this is not possible . If the stock is not available this will display in same passion.
    Regards,
    Madhu.

  • Difference between sales order schedule line and item level data

    Hi All,
    Could you please let me know what is the difference between sales order schedule line and item level data?
    Thanks,
    Ramya

    Hi Ramya,
    Sales order schedule line contains del date, order qty, rounded qty, confirmed qty, delivery qty, schedule line category, purchase requisition etc.,  ie It contains the full details of sales order data with respect to the scheduled line of delivery.  The total quantity of a sales order item can be subdivided into schedule lines that contain the various subsets with the corresponding delivering dates.
    Sales order Item level data contains details of the item in the sales order like material code, net price, net value, UoM, PO details, reason for rejection if any, material group,billing date, plant etc., ie this
    contains the full details of item irrespective of scheduled line.
    Regards,
    R. Senthil Mareeswaran.

  • Pricing error in intercompany billing

    My client is using the intercompany billing process.
    There is a BOM item with item category group LUMF and the pricing happens at sub item level. In the sales order and the customer billing document the pricing happens at sub item level only.
    But in the intercompany billing the pricing happens at both main item and sub item levels. The pricing procedure is dfferent here.
    Both the sales pricing procedure and intercompany pricing procedure has the condition type ZI11. The requirement 22 is attached to the condition type at both the pricing procedures.
    In the intercompany pricing procedure, subtotal L is assigned to the condition type ZI11.
    The condition type ZI11 is configured as under.
    Access Seq : ZI11
    Condition class : B (Prices)
    Cond category : C (Qty)
    Rounding rule : commercial
    Manual Entries : B (Automatic entry has priority)
    Item condition
    Amount / percent
    Int-comp Billcond
    Can anyone tell me why the item is priced at both main & sub item level in the intercompany billing.
    Regards,
    Bala

    Hi,
    Please check with the defination of the Item cateogry for the Main Item for the InterCompany Invoice.
    The relevance for pricing should be ticked off.
    Reward points if it helps.
    Regards,
    Harsh

  • How to create a view  with "WITH CLAUSE"

    Hi,
    I have a query with "WITH" CLAUSE , I need to create a view on this query. But I am getting error like
    ORA-32034 : Unsupported sue of WITH clause.
    Please help me...!!
    Please find below my query...!!
    WITH RANGE
             AS (SELECT A.MASTERMACHINEID,
                        a.startdate,
                        a.enddate,
                        a.startdate - (1 / 3) + (lvl) * 1 / 3 SHIFT_ST_DT,
                        a.startdate + (lvl) * 1 / 3 AS SHIFT_END_DT,
                        a.quantity,
                        (LEAST ( enddate, TODATE) - GREATEST ( FROMDATE, startdate)) * 24 TOTAL_HRS,
                        (enddate - startdate) * 24 AVAIL,
                       todate,
                       fromdate
                  FROM OMP A,
                       (SELECT LEVEL lvl
                          FROM (SELECT MAX (enddate - startdate) AS diff FROM OMPWORKORDER)
                        CONNECT BY LEVEL <= (diff) * 3),
                       MASTER B
                 WHERE A.MASTERMACHINEID = B.MASTERMACHINEID
                   AND lvl / 3 <=(enddate - startdate) + 1
                ORDER BY SHIFT_ST_DT)
       SELECT shift_date,
              shift_num,
              shift_hrs,
              DECODE (SIGN (SHUT_DWN_TIME), -1, 0, SHUT_DWN_TIME),
              8 - DECODE (SIGN (SHUT_DWN_TIME), -1, 0, SHUT_DWN_TIME) shift_avail_hrs,
              qty,
              total_qty
         FROM (SELECT TRUNC (SHIFT_ST_DT) shift_date,
                      ROW_NUMBER () OVER (PARTITION BY TRUNC (SHIFT_ST_DT) ORDER BY SHIFT_ST_DT) shift_num,
                      8 shift_hrs,
                      (LEAST ( SHIFT_END_DT, TODATE) - GREATEST ( FROMDATE, SHIFT_ST_DT)) * 24
                        SHUT_DWN_TIME,
                      quantity / (avail - TOTAL_HRS) qty,
                      round(((SHIFT_END_DT - SHIFT_ST_DT) * 24 - (LEAST (SHIFT_END_DT, TODATE) - GREATEST (FROMDATE, SHIFT_ST_DT)) * 24)  * QuantiTY / (AVAIL - TOTAL_HRS),2)
                         TOTAL_QTY
                 FROM RANGE A );Regards
    KPR
    Edited by: BluShadow on 17-Mar-2011 09:48
    added {noformat}{noformat} tags for readability                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Try creating view on following query, if it can help you:
    SELECT shift_date,
        shift_num,
        shift_hrs,
        decode(SIGN(shut_dwn_time),     -1,     0,     shut_dwn_time),
        8 -decode(SIGN(shut_dwn_time),     -1,     0,     shut_dwn_time) shift_avail_hrs,
        qty,
        total_qty
    FROM
            SELECT TRUNC(shift_st_dt) shift_date,
                 row_number() over(PARTITION BY TRUNC(shift_st_dt)
             ORDER BY shift_st_dt) shift_num,
                 8 shift_hrs,
                (least(shift_end_dt,      todate) -greatest(fromdate,      shift_st_dt)) *24 shut_dwn_time,
                 quantity /(avail -total_hrs) qty,
                 ROUND(((shift_end_dt -shift_st_dt) *24 -(least(shift_end_dt,      todate) -greatest(fromdate,      shift_st_dt)) *24) *quantity /(avail -total_hrs),      2) total_qty
             FROM
                  SELECT a.mastermachineid,
                     a.startdate,
                     a.enddate,
                     a.startdate -(1 / 3) +(lvl) *1 / 3 shift_st_dt,
                     a.startdate +(lvl) *1 / 3 AS
                 shift_end_dt,
                     a.quantity,
                    (least(enddate,      todate) -greatest(fromdate,      startdate)) *24 total_hrs,
                    (enddate -startdate) *24 avail,
                     todate,
                     fromdate
                 FROM omp a,
                        (SELECT LEVEL lvl
                     FROM
                        (SELECT MAX(enddate -startdate) AS
                        diff
                         FROM ompworkorder)
                    CONNECT BY LEVEL <=(diff) *3),
                     master b
                 WHERE a.mastermachineid = b.mastermachineid
                 AND lvl / 3 <=(enddate -startdate) + 1
                 ORDER BY shift_st_dt
             ) a
    ;Regards,
    Dipali.l

  • Please help in correcting the Decode function

    DECODE(p_resp_key,'||'''AP'''||',LINT_LOGI_STG_ITEM_DETAILS_PKG.GET_AP_ITEM_CATEGORY_DTL(ol.inventory_item_id),ldmf_istore_order_pkg.get_wwdb_prod_description(ol.inventory_item_id)) AS description
    I am getting parsing errors during runtime.I believe that something is incorrect in Decode statement.I am calling this Decopde statement in the package.Please help.
    Regards
    M

    Thanks Sven for replying i am pasting the full function kindly tell me which will be the proper manner to correct teh decode statement.Please look for "--CO73977 iStore product description change start by manish" in the belwo defintion there i have used decode function.Kindly help.
    v_statement := 'SELECT /*+ FIRST_ROWS */ DISTINCT ooh.order_number AS "Order Number",
    NVL(bill_cas.attribute5,hp.party_name) AS "Customer Name",
    TO_CHAR(ooh.ordered_date,'||'''DD-MON-YYYY'''||') AS "Order Date",
    TO_CHAR(ooh.booked_date,'||'''DD-MON-YYYY'''||') AS "Booked Date",
    TO_CHAR(ol.request_date,'||'''DD-MON-YYYY'''||') AS "Requested Date",
    oel.meaning AS "Order Status",
    ooh.cust_po_number AS "PO Number",
    ooh.transactional_curr_code AS currency,
    terms.NAME AS "Payment Terms",
    freight.meaning AS "Freight Term",
    fob.meaning AS "FOB",
    ooh.sales_channel_code AS "Sales Channel",
    bill_to.LOCATION AS "Bill To Location",
    ship_to.LOCATION AS "Ship To Location",
    terr.segment1 AS "Sales Territory - Country",
    ott.NAME AS "Order Type",
    oe_totals_grp.get_order_total (ooh.header_id,NULL,'||'''ALL'''||')* DECODE (ooh.order_category_code, '||'''RETURN'''||', -1, 1) AS "Order Total",
    CONCAT(CONCAT(ol.line_number,'||'''.'''||'),ol.shipment_number) AS "Line Number",
    ol.ordered_item AS "Item Number",
    ldmf_get_customer_item(ol.sold_to_org_id,ol.inventory_item_id,ol.invoice_to_org_id,ol.ship_to_org_id) AS "Customer SKU",
    --ldmf_istore_order_pkg.get_wwdb_prod_description(ol.inventory_item_id) AS description,
                             --CO73977 iStore product description change start by manish
                             --DECODE(p_resp_key,'||'''AP'''||',LINT_LOGI_STG_ITEM_DETAILS_PKG.GET_AP_ITEM_CATEGORY_DTL(ol.inventory_item_id),ldmf_istore_order_pkg.get_wwdb_prod_description(ol.inventory_item_id)) AS description,
              --CO73977 iStore product description change end by manish
                             LINT_LOGI_STG_ITEM_DETAILS_PKG.GET_AP_ITEM_CATEGORY_DTL(ol.inventory_item_id) AS description,
    ol.ordered_quantity AS "Ordered Quantity",
    ol.shipped_quantity AS "Shipped Quantity",
    TO_CHAR(ol.schedule_ship_date,'||'''DD-MON-YYYY'''||') AS "Schedule Ship Date",
    ol.unit_selling_price AS "Unit Price",
    ol.ordered_quantity * ol.unit_selling_price AS "Extended Amount",
    ol.tax_value "taxes_total",
    ldmf_istore_order_pkg.get_freight_charges(ooh.header_id,ol.line_id) AS "Freight Charges",
    ldmf_istore_order_pkg.get_pallet_charges (ooh.header_id,ol.line_id) AS "Pallet Surcharge",
    oe_oe_totals_summary.line_charges (ooh.header_id, ol.line_id ) AS "Total Charges",
    DECODE(oell.meaning,'||'''Awaiting Shipping'''||','||'DECODE(TO_CHAR(LDMF_ISTORE_ORDER_PKG.CHK_DELIVERY_LN_EXISTS(ol.header_id,ol.line_id)),'||
                                                                                                                  '''1'''||','||'''Picked'''||','||
                                                                                                                       '''2'''||','||'''Picked Partial'''||','||'oell.meaning)
                             ,oell.meaning) AS "Line Status",
    TO_CHAR(ol.actual_shipment_date,'||'''DD-MON-YYYY'''||') AS "Ship Date",
    (SELECT ware_house.NAME
    FROM hr_all_organization_units_tl ware_house
    WHERE ware_house.organization_id = NVL(ol.ship_from_org_id,ooh.ship_from_org_id)) AS WAREHOUSES,
    LDMF_ISTORE_ORDER_PKG.GET_TRACKING_NUMBER(ol.header_id,ol.line_id) AS "Tracking Number",
    LDMF_ISTORE_ORDER_PKG.GET_WAYBILL_NUMBER(ol.header_id,ol.line_id) AS "Waybill Number",
    LDMF_ISTORE_ORDER_PKG.GET_DELIVERY_NUMBER(ol.header_id,ol.line_id) delivery_number,
    LDMF_ISTORE_ORDER_PKG.GET_PRO_NUMBER(ol.header_id,ol.line_id) AS "Pro Number",
    LDMF_ISTORE_SALESREP_PKG.LDMF_ISTORE_CHECK_HOLDS(hcaa.cust_account_id,ooh.header_id,ol.line_id) AS "Hold Applied",
    LDMF_ISTORE_ORDER_PKG.GET_CONV_RATE(ol.ordered_item_id,ooh.org_id) AS "Pallet Qty",
    ROUND(ol.ordered_quantity/DECODE(LDMF_ISTORE_ORDER_PKG.GET_CONV_RATE(ol.ordered_item_id,ooh.org_id),0,1,LDMF_ISTORE_ORDER_PKG.GET_CONV_RATE(ol.ordered_item_id,ooh.org_id)),2) AS "Pallet#",
    ldmf_istore_order_pkg.get_invoice_number(ooh.order_number,ol.line_id) AS "Invoice Number",
    ldmf_istore_salesrep_pkg.get_promonum(ooh.header_id,ol.line_id) AS "Promo Number",
    ol.line_number,ol.shipment_number,ooh.header_id,ooh.ordered_date,
    LDMF_ISTORE_ORDER_PKG.GET_SHIP_METHOD_MEANING(ol.header_id,ol.line_id) AS SHIP_METHOD_CODE,
    terms.description AS "Payment_Term_Desc",
    TO_CHAR((LDMF_ISTORE_ORDER_PKG.GET_ESTI_ARR_DATE(ol.ACTUAL_SHIPMENT_DATE,
                             ol.SHIP_FROM_ORG_ID,
                             ol.SHIP_TO_ORG_ID,
                             ol.SHIPPING_METHOD_CODE )),'||'''DD-MON-YYYY'''||') AS "Arrival_Date",
                             DECODE (LDMF_ISTORE_ORDER_PKG.GET_ORD_AMDMT_STATUS(ooh.header_id,ol.line_id),1 ,'||'''YES'''||',NULL) AS "Pending_Approval"
    FROM oe_order_headers_all ooh,
    oe_order_lines_all ol,
    hz_cust_accounts_all hcaa,
    oe_transaction_types_all otta,
    oe_transaction_types_tl ott,
    hz_parties hp,
    hz_party_sites hps,
    oe_lookups oel,
    oe_lookups oell,
    ra_terms terms,
    fnd_lookup_values freight,
    fnd_lookup_values fob,
    wsh_new_deliveries dl,
    wsh_delivery_details dd,
    wsh_delivery_assignments da,
    oe_order_holds_all holds,
    hz_cust_site_uses_all bill_to,
    hz_cust_acct_sites_all bill_cas,
    hz_cust_site_uses_all ship_to,
    hz_cust_acct_sites_all ship_cas,
    hz_locations loc,
    ra_territories terr,
    org_organization_definitions ware_house,
    wsh_carrier_services wcs
    WHERE ooh.header_id = ol.header_id
    AND ooh.sold_to_org_id = hcaa.cust_account_id
    AND wcs.ship_method_code(+) = ol.shipping_method_code
    AND hcaa.party_id = hp.party_id
    AND hps.party_id = hp.party_id
    AND loc.location_id = hps.location_id
    AND ship_cas.party_site_id = hps.party_site_id
    AND ooh.order_type_id = otta.transaction_type_id
    AND ooh.order_type_id = ott.transaction_type_id
    AND terms.term_id(+) = ooh.payment_term_id
    AND da.delivery_id = dl.delivery_id (+)
    AND dd.delivery_detail_id = da.delivery_detail_id(+)
    AND ship_to.cust_acct_site_id = ship_cas.cust_acct_site_id
    AND ship_to.site_use_id = ooh.ship_to_org_id
    AND ware_house.organization_id(+) = ol.ship_from_org_id
    AND bill_to.cust_acct_site_id = bill_cas.cust_acct_site_id
    AND bill_to.site_use_id = ooh.invoice_to_org_id
    AND bill_to.territory_id = terr.territory_id
    AND ol.header_id = dd.source_header_id(+)
    AND ol.line_id = dd.source_line_id(+)
    AND ol.line_id = holds.line_id(+)
    AND freight.lookup_type = '||'''FREIGHT_TERMS'''||'
    AND freight.LANGUAGE =USERENV('||'''LANG'''||')
    AND freight.lookup_code = ooh.freight_terms_code
    AND ott.LANGUAGE = USERENV('||'''LANG'''||')
    AND fob.lookup_code = ooh.fob_point_code
    AND fob.lookup_type = '||'''FOB'''||'
    AND fob.LANGUAGE =USERENV('||'''LANG'''||')
    AND NVL(otta.attribute10,'||'''Y'''||') <> '||'''N'''||'
    AND oel.lookup_code = ooh.flow_status_code
    AND oel.lookup_type = '||'''FLOW_STATUS'''||'
    AND oell.lookup_code = ol.flow_status_code
    AND oell.lookup_type = '||'''LINE_FLOW_STATUS'''||'
    AND ol.line_category_code <> '||'''RETURN'''||'
    AND ooh.order_category_code IN ('||'''ORDER'''||','||'''MIXED'''||')
    AND ooh.sold_to_org_id = '||p_sold_to_org_id
    || ' AND TRUNC(ooh.ordered_date) >= TRUNC(SYSDATE - '||p_no_of_days||')';
    v_statement := v_statement || ' ORDER BY ooh.ordered_date DESC,ooh.header_id,ol.line_number,ol.shipment_number ';
    OPEN p_data FOR v_statement;
    EXCEPTION
    WHEN OTHERS THEN
    errbuf := SQLERRM ;
    retcode := SQLCODE ;
    END ORDER_TRACKER_DAYS;
    --This Procedure fetches the Order details between the given from date and to date.
    PROCEDURE ORDER_TRACKER_BETWEEN_DAYS( p_sold_to_org_id IN NUMBER
    ,p_search_by IN VARCHAR2
    ,p_start_date IN DATE
    ,p_end_date IN DATE
                             ,p_resp_key IN VARCHAR2
    ,p_data OUT shop_cartdownload
    ,errbuf OUT VARCHAR2
    ,retcode OUT NUMBER
    ) AS
    v_start_date VARCHAR2(1000);
    v_end_date VARCHAR2(1000);
    v_search_by VARCHAR2(1000);
    BEGIN
    SELECT ''''||p_start_date||'''' INTO v_start_date FROM dual;
    SELECT ''''||p_end_date||'''' INTO v_end_date FROM dual;
    v_statement := NULL;
    v_statement := 'SELECT /*+ FIRST_ROWS */ DISTINCT ooh.order_number AS "Order Number",
    NVL(bill_cas.attribute5,hp.party_name) AS "Customer Name",
    TO_CHAR(ooh.ordered_date,'||'''DD-MON-YYYY'''||') AS "Order Date",
    TO_CHAR(ooh.booked_date,'||'''DD-MON-YYYY'''||') AS "Booked Date",
    TO_CHAR(ol.request_date,'||'''DD-MON-YYYY'''||') AS "Requested Date",
    oel.meaning AS "Order Status",
    ooh.cust_po_number AS "PO Number",
    ooh.transactional_curr_code AS currency,
    terms.NAME AS "Payment Terms",
    freight.meaning AS "Freight Term",
    fob.meaning AS "FOB",
    ooh.sales_channel_code AS "Sales Channel",
    bill_to.LOCATION AS "Bill To Location",
    ship_to.LOCATION AS "Ship To Location",
    terr.segment1 AS "Sales Territory - Country",
    ott.NAME AS "Order Type",
    oe_totals_grp.get_order_total (ooh.header_id,NULL,'||'''ALL'''||')* DECODE (ooh.order_category_code, '||'''RETURN'''||', -1, 1) AS "Order Total",
    CONCAT(CONCAT(ol.line_number,'||'''.'''||'),ol.shipment_number) AS "Line Number",
    ol.ordered_item AS "Item Number",
    ldmf_get_customer_item(ol.sold_to_org_id,ol.inventory_item_id,ol.invoice_to_org_id,ol.ship_to_org_id) AS "Customer SKU",
    --ldmf_istore_order_pkg.get_wwdb_prod_description(ol.inventory_item_id) AS description,
                             --CO73977 iStore product description change start by manish
                             DECODE(p_resp_key,'||'''AP'''||',LINT_LOGI_STG_ITEM_DETAILS_PKG.GET_AP_ITEM_CATEGORY_DTL(ol.inventory_item_id),ldmf_istore_order_pkg.get_wwdb_prod_description(ol.inventory_item_id)) AS description,
              --CO73977 iStore product description change end by manish
    ol.ordered_quantity AS "Ordered Quantity",
    ol.shipped_quantity AS "Shipped Quantity",
    TO_CHAR(ol.schedule_ship_date,'||'''DD-MON-YYYY'''||') AS "Schedule Ship Date",
    ol.unit_selling_price AS "Unit Price",
    ol.ordered_quantity * ol.unit_selling_price AS "Extended Amount",
    ol.tax_value "taxes_total",
    ldmf_istore_order_pkg.get_freight_charges(ooh.header_id,ol.line_id) AS "Freight Charges",
    ldmf_istore_order_pkg.get_pallet_charges (ooh.header_id,ol.line_id) AS "Pallet Surcharge",
    oe_oe_totals_summary.line_charges (ooh.header_id, ol.line_id ) AS "Total Charges",
    DECODE(oell.meaning,'||'''Awaiting Shipping'''||','||'DECODE(TO_CHAR(LDMF_ISTORE_ORDER_PKG.CHK_DELIVERY_LN_EXISTS(ol.header_id,ol.line_id)),'||
                                                                                         '''1'''||','||'''Picked'''||','||
                                                                                              '''2'''||','||'''Picked Partial'''||','||'oell.meaning)
                             ,oell.meaning) AS "Line Status",
    TO_CHAR(ol.actual_shipment_date,'||'''DD-MON-YYYY'''||') AS "Ship Date",
    (SELECT ware_house.NAME
    FROM hr_all_organization_units_tl ware_house
    WHERE ware_house.organization_id = NVL(ol.ship_from_org_id,ooh.ship_from_org_id)) AS WAREHOUSES,
    LDMF_ISTORE_ORDER_PKG.GET_TRACKING_NUMBER(ol.header_id,ol.line_id) AS "Tracking Number",
    LDMF_ISTORE_ORDER_PKG.GET_WAYBILL_NUMBER(ol.header_id,ol.line_id) AS "Waybill Number",
    LDMF_ISTORE_ORDER_PKG.GET_DELIVERY_NUMBER(ol.header_id,ol.line_id) delivery_number,
    LDMF_ISTORE_ORDER_PKG.GET_PRO_NUMBER(ol.header_id,ol.line_id) AS "Pro Number",
    LDMF_ISTORE_SALESREP_PKG.LDMF_ISTORE_CHECK_HOLDS(hcaa.cust_account_id,ooh.header_id,ol.line_id) AS "Hold Applied",
    LDMF_ISTORE_ORDER_PKG.GET_CONV_RATE(ol.ordered_item_id,ooh.org_id) AS "Pallet Qty",
    ROUND(ol.ordered_quantity/DECODE(LDMF_ISTORE_ORDER_PKG.GET_CONV_RATE(ol.ordered_item_id,ooh.org_id),0,1,LDMF_ISTORE_ORDER_PKG.GET_CONV_RATE(ol.ordered_item_id,ooh.org_id)),2) AS "Pallet#",
    ldmf_istore_order_pkg.get_invoice_number(ooh.order_number,ol.line_id) AS "Invoice Number",
    ldmf_istore_salesrep_pkg.get_promonum(ooh.header_id,ol.line_id) AS "Promo Number",
    ol.line_number,ol.shipment_number,ooh.header_id,ooh.ordered_date,
    LDMF_ISTORE_ORDER_PKG.GET_SHIP_METHOD_MEANING(ol.header_id,ol.line_id) AS SHIP_METHOD_CODE,
    terms.description AS "Payment_Term_Desc",
    TO_CHAR((LDMF_ISTORE_ORDER_PKG.GET_ESTI_ARR_DATE(ol.ACTUAL_SHIPMENT_DATE,
                             ol.SHIP_FROM_ORG_ID,
                             ol.SHIP_TO_ORG_ID,
                             ol.SHIPPING_METHOD_CODE )),'||'''DD-MON-YYYY'''||') AS "Arrival_Date",
                             DECODE (LDMF_ISTORE_ORDER_PKG.GET_ORD_AMDMT_STATUS(ooh.header_id,ol.line_id),1 ,'||'''YES'''||',NULL) AS "Pending_Approval"
    FROM oe_order_headers_all ooh,
    oe_order_lines_all ol,
    hz_cust_accounts_all hcaa,
    oe_transaction_types_all otta,
    oe_transaction_types_tl ott,
    hz_parties hp,
    hz_party_sites hps,
    oe_lookups oel,
    oe_lookups oell,
    ra_terms terms,
    fnd_lookup_values freight,
    fnd_lookup_values fob,
    wsh_new_deliveries dl,
    wsh_delivery_details dd,
    wsh_delivery_assignments da,
    oe_order_holds_all holds,
    hz_cust_site_uses_all bill_to,
    hz_cust_acct_sites_all bill_cas,
    hz_cust_site_uses_all ship_to,
    hz_cust_acct_sites_all ship_cas,
    hz_locations loc,
    ra_territories terr,
    org_organization_definitions ware_house,
    wsh_carrier_services wcs
    WHERE ooh.header_id = ol.header_id
    AND ooh.sold_to_org_id = hcaa.cust_account_id
    AND wcs.ship_method_code(+) = ol.shipping_method_code
    AND hcaa.party_id = hp.party_id
    AND hps.party_id = hp.party_id
    AND loc.location_id = hps.location_id
    AND ship_cas.party_site_id = hps.party_site_id
    AND ooh.order_type_id = otta.transaction_type_id
    AND ooh.order_type_id = ott.transaction_type_id
    AND terms.term_id(+) = ooh.payment_term_id
    AND da.delivery_id = dl.delivery_id (+)
    AND dd.delivery_detail_id = da.delivery_detail_id(+)
    AND ship_to.cust_acct_site_id = ship_cas.cust_acct_site_id
    AND ship_to.site_use_id = ooh.ship_to_org_id
    AND ware_house.organization_id(+) = ol.ship_from_org_id
    AND bill_to.cust_acct_site_id = bill_cas.cust_acct_site_id
    AND bill_to.site_use_id = ooh.invoice_to_org_id
    AND bill_to.territory_id = terr.territory_id
    AND ol.header_id = dd.source_header_id(+)
    AND ol.line_id = dd.source_line_id(+)
    AND ol.line_id = holds.line_id(+)
    AND freight.lookup_type = '||'''FREIGHT_TERMS'''||'
    AND freight.LANGUAGE =USERENV('||'''LANG'''||')
    AND freight.lookup_code = ooh.freight_terms_code
    AND ott.LANGUAGE = USERENV('||'''LANG'''||')
    AND fob.lookup_code = ooh.fob_point_code
    AND fob.lookup_type = '||'''FOB'''||'
    AND fob.LANGUAGE =USERENV('||'''LANG'''||')
    AND NVL(otta.attribute10,'||'''Y'''||') <> '||'''N'''||'
    AND oel.lookup_code = ooh.flow_status_code
    AND oel.lookup_type = '||'''FLOW_STATUS'''||'
    AND ol.line_category_code <> '||'''RETURN'''||'
    AND ooh.order_category_code IN ('||'''ORDER'''||','||'''MIXED'''||')
    AND oell.lookup_code = ol.flow_status_code
    AND oell.lookup_type = '||'''LINE_FLOW_STATUS'''||'
    AND ooh.sold_to_org_id = '||p_sold_to_org_id ;
    IF p_search_by = '1' THEN
    v_search_by := ' AND TRUNC(ooh.ordered_date) ';
    ELSIF p_search_by = '2' THEN
    v_search_by := ' AND TRUNC(ol.request_date) ';
    ELSIF p_search_by = '3' THEN
    v_search_by := ' AND TRUNC(ol.actual_shipment_date) ';
    ELSIF p_search_by = '4' THEN
    v_search_by := ' AND TRUNC(ol.schedule_ship_date) ';
    END IF;
    v_statement := v_statement || v_search_by;
    v_statement := v_statement ||' >= '|| v_start_date || v_search_by ||' <= '||v_end_date;
    v_statement := v_statement || ' ORDER BY ooh.ordered_date DESC,ooh.header_id,ol.line_number,ol.shipment_number ';
    OPEN p_data FOR v_statement;
    EXCEPTION
    WHEN OTHERS THEN
    errbuf := SQLERRM ;
    retcode := SQLCODE ;
    END ORDER_TRACKER_BETWEEN_DAYS;

  • Urgent- Double shedule lines confirmed

    Hi Team
    Today for many of the order double shedule lines are confirmed.
    Like below in SO-Item-Shedule lines
    Delivery date ord qty rounded qty confirmed qty
    03/19/2007 50 50 50
    03/19/2007 0 0 50
    All materials are APO related materials and happening to specific plant only.
    Any idea for why duplicate shedule lines are confirmed here any OSS notes for this?
    Urgent help needed.
    CioShankar1242

    The SPRO path in APO/SCM would be
    APO >> Global ATP >> General Settings >> Maintain Global Settings for Availability Check
    In that for the Availability Check settings entry there is an option for Accept Time. The F1 help for it is as below.
    ATP: Accept Schedule Lines According to Time
    Confirmed schedule lines in the sales order of the connected OLTP system (SAP R/3) based on the time.
    Use
    The indicator defines if the confirmed schedule lines of the sales orders in the connected OLTP system (SAP R/3) should be adopted based on the day or on the time.
    If the indicator is set, the sales order adopts the changes of the confirmed schedule lines or the confirmations for a time other than the desired delivery time, to the exact second. In the sales order a second schedule line is created for the same day, but created with a different time, or the times of the confirmed schedule lines can be changed.
    If the indicator is not set, only one schedule line exists in the sales order if the desired delivery day can be kept, or only changes to the confirmed schedule lines are adopted that are at least one day different from the desired delivery date.
    Dependencies
    If confirmed schedule lines should be created based on the time, this can lead to several confirmed schedule lines for a request schedule line being created per day in the sales order, and in the item overview the impression is given that no confirmation could be made according to what was requested.
    In addition, the data volume of the SAP R/3 database tables VBEP and VBBE will increase significantly, since each schedule line is represented with a data record in these tables. The same effect will also occur for the APO liveCache and for the database table /SAPAPO/SCHEDLIN.
    Example
    Request: Confirmation Situation: 
    100 pieces for 01.01.2002  12:00
    50 pieces for 01.01.2002 14:00
    30 pieces for 01.01.2002 16:00
    20 pieces for 01.01.2002 18:00
    If this indicator is NOT set, the request schedule line is confirmed and no further schedule lines are created:
    100 pieces for 01.01.2002  12:00
    If this indicator is set, the following (partially) confirmed schedule lines are created:
    00 pieces for 01.01.2002 12:00
    50 pieces for 01.01.2002 14:00
    30 pieces for 01.01.2002 16:00
    20 pieces for 01.01.2002 18:00
    I guess this is what you are refering to.
    Somnath

  • Double shedule lines confirmed-Urgent

    Hi
    Today for one of the order two shedule lines are confirmed.
    Like below in SO-Item-Shedule lines
    Delivery date    ord qty  rounded qty confirmed qty
    03/19/2007       50        50                50
    03/19/2007       0        0                   50
    Any idea for why duplicate shedule lines are confirmed here any OSS notes for this?
    Urgent help needed.
    Cio
    Shankar124

    Hi,
    I guess the only way to figure out specifically what is happening behind the scenes is debugging. ABAP team should be able to help you. Check the internal tables xvbep, yvbep for the sales order program SAPMV45A. While debugging, try to run the availability check again. Then monitor any updates to tables, xvbep and yvbep.
    The error could be due to a user exit modification or a genuine SAP issue which is caused due to conflict with SAP ATP check and APO based ATP check.
    Debugging will help you to nail down how it is happening.
    Also check database table VBEP using transaction SE16 to check whether duplicate schedule lines are really saved to database.
    Regards
    Anil

  • Problem in multilevel automatic packing

    Dear All,
    I am facing problem in Multilevel Automatic Packing of materials. I have done settings of the packing transaction profile; define check profile for packing status and of packing instruction determination in customizing. I am able to packing material upto 1 level only.
    I have already created packing instruction using T-code POP1 and also created subordinate packing instruction for packing handling units in next level, assigned this to packing determination record using T-code POF1. I have used 1st packing material as main material in next packing instruction and the larger size material as next handling unit. The settings are:
    POP1
    PI 1
    P 214 Target Qty 1
    M 22   Target Qty 1
    I  5     Target Qty 2
    PI 5
    P 215 Target Qty 1
    M 214 Target QTY 2
    POF1
    Determination record ABCD
    Material 22 PI 1
    I also tried different condition type for this process but didnt succeed
    I am not getting any error, just receive a message Handling units were created. But when I try to pack handling units using automatic packing option then system prompts me msg that there are no items to be packed.
    Kindly give me solution.
    Regards,
    Anand Malu
    Jr. SAP SD Consultant

    Hi,
    I want to pack 1 medicine box in 1 small carton and then 10 small cartons in 1 Large Carton. I am able to pack 1 medicine box in 1 small carton thru automatic packing but not able to pack 10 small cartons in 1 Large carton. For this I have maintained packing instructions which are:
    Packing instruction 4
    Item no.   Item Cat.   Component   Tgt qty   Min qty   Round qty  unit of measure Load carr MixID
    10             P             214                 1               0           0                 Carton            Yes        No
    20             M            22                   1               1           0                  Box                No         Yes
    30             I              5(Pack instr)    20             0           0                  -
    If I maintain Min. qty 1 for item no. 30 then I get error while packing "Min. qty from packing instruction not reached packing not possible"
    Packing Instruction 5
    10            P              215                1              ---             --              Carton               Yes        No
    20            M             214                20              ---            --               Carton               No         Yes
    Packing Instruction determination records
    Determination type   ABCD
    Material                         Packing Instruction
    22                                 4 
    Packing determination procedure contains determination type ABCD only.
    Regards,
    Anand Malu
    Jr. SAP SD Consultant
    Edited by: genius_anand on May 2, 2009 8:38 AM

Maybe you are looking for

  • I am trying to create a new ods ?

    hi all, Can anyone help me out. i am trying to create a new ods. Where in i have characteristics and keyfigures. In ods we have - data fields / key fields. 1. can data fields can contain characteristics and keyfigures 2. can key fields can contain ke

  • Error when blocking a vendor in source list

    We are trying to block a vendor from the Source list (Tcode ME01), however this vendor was created in a different system and imported into our current system. The error message we receive states "Source list record created in a different system".  We

  • Top 10 queries in oracle 9i

    Hi, how to get top 10 queries.. then which query is cosuming more cpu.

  • My WRT350N doesn't work anymore, just stopped connecting to the internet

    I WRT350N was working for a while, I came home from a trip and it was up, I connected to it, but no internet. I went through a series of checks with the cable modem which was working. I swapped out the router and connect back to the internet. I've tr

  • How to Hide adress of the form from adress bar

    Hi all , i want to ask that is it possible to hide or change the adress of the form from the adress bar.....like when we run the form it shows the adress like http://develoment:8888/forms90/f90servlet?form=C:\GMS\Forms\GMS_SHIPMENT.fmx&userid=GMS/GMS