Help on ORA-01785: ORDER BY item must be the number of a SELECT-list expres

Hi
Please find the SQL below . I am unable to place ORDER bY upper(column) due to error ORA-01785: ORDER BY item must be the number of a SELECT-list expression. Please help
SELECT engn_cnslt_list.cnslt_hcp_id "hcp_id",
hcp.first_nm "first_nm", hcp.last_nm "last_nm",
FROM cnslt_engn, engn_tier_dtl, engn_cnslt_list, hcp
WHERE cnslt_engn.cnslt_engn_id = engn_cnslt_list.cnslt_engn_id
AND engn_cnslt_list.cnslt_hcp_id = hcp.hcp_id
AND engn_tier_dtl.cnslt_engn_id = cnslt_engn.cnslt_engn_id
AND engn_tier_dtl.engn_tier_dtl_id =
engn_cnslt_list.engn_tier_dtl_id
AND cnslt_engn.cnslt_engn_id = 100643
AND engn_cnslt_list.cnslt_hcp_id NOT IN (
SELECT hcp_id
FROM mtg_cnslt_list
WHERE cnslt_mtg_id IN (SELECT cnslt_mtg_id
FROM cnslt_mtg
WHERE cnslt_engn_id = 1000643)
AND hcp_id IS NOT NULL)
UNION
SELECT mtg_cnslt_list.hcp_id "hcp_id", hcp.first_nm "first_nm",
hcp.last_nm "last_nm",
FROM cnslt_mtg,
cnslt_engn,
mtg_cnslt_list,
engn_tier_dtl,
engn_cnslt_list,
hcp
WHERE cnslt_engn.cnslt_engn_id = cnslt_mtg.cnslt_engn_id
AND cnslt_engn.cnslt_engn_id = engn_cnslt_list.cnslt_engn_id
AND engn_cnslt_list.cnslt_hcp_id = mtg_cnslt_list.hcp_id
AND engn_cnslt_list.cnslt_hcp_id = hcp.hcp_id
AND cnslt_mtg.cnslt_mtg_id = mtg_cnslt_list.cnslt_mtg_id
AND engn_tier_dtl.cnslt_engn_id = cnslt_engn.cnslt_engn_id
AND mtg_cnslt_list.engn_tier_dtl_id =
engn_tier_dtl.engn_tier_dtl_id
AND cnslt_engn.cnslt_engn_id = 1000643
order by upper(last_nm),upper(first_nm)

try:
select * from (SELECT engn_cnslt_list.cnslt_hcp_id "hcp_id",
hcp.first_nm "first_nm", hcp.last_nm "last_nm",
FROM cnslt_engn, engn_tier_dtl, engn_cnslt_list, hcp
WHERE cnslt_engn.cnslt_engn_id = engn_cnslt_list.cnslt_engn_id
AND engn_cnslt_list.cnslt_hcp_id = hcp.hcp_id
AND engn_tier_dtl.cnslt_engn_id = cnslt_engn.cnslt_engn_id
AND engn_tier_dtl.engn_tier_dtl_id =
engn_cnslt_list.engn_tier_dtl_id
AND cnslt_engn.cnslt_engn_id = 100643
AND engn_cnslt_list.cnslt_hcp_id NOT IN (
SELECT hcp_id
FROM mtg_cnslt_list
WHERE cnslt_mtg_id IN (SELECT cnslt_mtg_id
FROM cnslt_mtg
WHERE cnslt_engn_id = 1000643)
AND hcp_id IS NOT NULL)
UNION
SELECT mtg_cnslt_list.hcp_id "hcp_id", hcp.first_nm "first_nm",
hcp.last_nm "last_nm",
FROM cnslt_mtg,
cnslt_engn,
mtg_cnslt_list,
engn_tier_dtl,
engn_cnslt_list,
hcp
WHERE cnslt_engn.cnslt_engn_id = cnslt_mtg.cnslt_engn_id
AND cnslt_engn.cnslt_engn_id = engn_cnslt_list.cnslt_engn_id
AND engn_cnslt_list.cnslt_hcp_id = mtg_cnslt_list.hcp_id
AND engn_cnslt_list.cnslt_hcp_id = hcp.hcp_id
AND cnslt_mtg.cnslt_mtg_id = mtg_cnslt_list.cnslt_mtg_id
AND engn_tier_dtl.cnslt_engn_id = cnslt_engn.cnslt_engn_id
AND mtg_cnslt_list.engn_tier_dtl_id =
engn_tier_dtl.engn_tier_dtl_id
AND cnslt_engn.cnslt_engn_id = 1000643
order by upper(last_nm),upper(first_nm)

Similar Messages

  • ORA-01785: ORDER BY item must be the number of a SELECT-list expression

    I have a dynamic SQL on a page. The SQL is dynamic because there are 3 LOV fields from which the user may make selections, and those field values are used in the WHERE clause. Also, the 2nd LOV field is populated with AJAX based on the 1st LOV's selection. And, the SQL joins to another table. The report has 7 sortable columns. The main table the SQL runs over has about 1,000 rows in it.
    The 2nd table has about 500 rows. (Sorry, I'm not sure what information you might need to help me, so I listed several details.)
    The application, and page, have been working flawlessly for several weeks. Then, yesterday the page was being used and the user received the "ORA-01785: ORDER BY item must be the number of a SELECT-list expression" error. The error just appeared out of the blue, so to speak. After weeks of of usage this is the first time this error has appeared. The application had not been changed, but they had been entering data into the main table and the table joined to in the SQL. The application is in production, so I can't put the application into DEBUG, etc. to see what SQL is being built.
    Anyway, I was trying to debug the page today and was doing selections and seeing what would display, then as suddenly as the page quit working it started working correctly. No code changes made, no server changes made (to my knowledge), and no data changes made.
    I'm new to both Oracle and Apex, and am not a SQL, Oracle or Apex expert. So, I am very perplexed and don't have any idea of what could be happening.
    I don't know if it's an issue with the SQL, AJAX not loading the select fields properly, a corrupted table, a server load issue, or something else all together.
    Any suggestions?
    Also, I'm not familiar with Oracle error messages. Can they be red herrings sometimes? Because, I don't programmaticly code the ORDER BY of the SQL. Apex appends that part. So, how could that aspect quit working. And, then suddenly start working.
    Sorry, but I'm extremely confused. :-) Any suggestions or help will be greatly appreciated.
    Thanks, Tony

    Hi Dan,
    Thanks for the feedback. I'm not going to be dogmatic about possible cause, but it has myself and another Oracle developer (who writes SQL and PL/SQL in his sleep) stumped. He doesn't think it's the SQL. Your suggestion was one of the first things we thought of considering the error message we got, but from Scott's reply that it could be a red herring, and after additional testing we've ruled the SQL out for now.
    I understand what you're saying, but the SQL selects all the columns (about 40 columns are selected) that are sortable columns on the report. I've sorted by all the columns by clicking on them and that aspect works without error.
    The SQL is created dynamically and is quite large. I've included below just for information purposes.
    Thanks, Tony
    = = = = = = =
    DECLARE
    q VARCHAR2 (4000);
    BEGIN
    q := 'select ';
    q := q || 'hd."ID", hd."MODEL", hd."YEAR", hd."HIN", hd."BOAT_STATUS", hd."SPECIAL_ACTIVITY", hd."PARTIAL_KIT_VALUE",
    hd.OPTION_NUMBER || '' - '' || e.DESCRIPTION OPTION_NUMBER,
    hd."OPTIONS_HOURS", hd."OPTIONS_MATERIAL", hd."STATION", hd."ACTIVITY_COMMENT", hd."BI_EQUIV_MATERIAL",
    hd."BI_EQUIV_LABOR", hd."EI_EQUIV_MATERIAL", hd."EI_EQUIV_LABOR", hd."BASE_BOAT", hd."SA_ENGINES",
    hd."SA_OPTIONS", hd."DY_STANDARD_MATERIAL", hd."DY_STANDARD_LABOR", hd."DY_STANDARD_OVERHEAD",
    hd."DY_STANDARD_ENGINE", hd."DY_ENGINE_ENGINEUP", hd."DY_ENGINE_MATERIAL", hd."DY_ENGINE_LABOR",
    hd."DY_ENGINE_OVERHEAD", hd."DY_OPTIONS_MATERIAL", hd."DY_OPTIONS_LABOR", hd."DY_OPTIONS_OVERHEAD", hd."EI_STANDARD_UNITS", hd."EI_STANDARD_MATERIAL", hd."EI_STANDARD_LABOR", hd."EI_STANDARD_OVERHEAD", hd."EI_STANDARD_ENGINE", hd."EI_ENGINE_ENGINEUP", hd."EI_ENGINE_MATERIAL", hd."EI_ENGINE_LABOR", hd."EI_ENGINE_OVERHEAD", hd."EI_OPTIONS_MATERIAL", hd."EI_OPTIONS_LABOR", hd."EI_OPTIONS_OVERHEAD",
    htmldb_item.hidden(50,hd.ID) idalias ';
    q := q || 'from "PLP_HIN_DETAIL" hd , "PLP_ENGINES" e ';
    IF
    :P10_SEARCH_MODEL IS NOT NULL
    AND :P10_SEARCH_MODEL <> '%null%'
    AND :P10_SEARCH_YEAR IS NOT NULL
    AND :P10_SEARCH_YEAR <> '%null%'
    AND :P10_SEARCH_STATUS IS NOT NULL
    AND :P10_SEARCH_STATUS <> '%null%'
    THEN
    q := q || 'WHERE
    (instr(upper(hd.MODEL),upper(nvl(:P10_SEARCH_MODEL,hd.MODEL))) > 0
    AND instr(upper(hd.YEAR),upper(nvl(:P10_SEARCH_YEAR,hd.YEAR))) > 0
    AND instr(upper(hd.BOAT_STATUS),upper(nvl(:P10_SEARCH_STATUS,hd.BOAT_STATUS))) > 0)
    AND e.OPTION_NUMBER (+) = hd.OPTION_NUMBER and e.YEAR (+) = hd.YEAR AND e.MODEL (+) = hd.MODEL AND e.PLP_ID (+) = hd.PLP_ID';
    ELSE
    IF
    :P10_SEARCH_MODEL IS NOT NULL
    OR :P10_SEARCH_YEAR IS NOT NULL
    OR :P10_SEARCH_STATUS IS NOT NULL
    THEN
    q := q || 'WHERE
    (instr(upper(hd.MODEL),upper(nvl(:P10_SEARCH_MODEL,hd.MODEL))) > 0
    AND instr(upper(hd.YEAR),upper(nvl(:P10_SEARCH_YEAR,hd.YEAR))) > 0
    or instr(upper(hd.BOAT_STATUS),upper(nvl(:P10_SEARCH_STATUS,hd.BOAT_STATUS))) > 0)
    AND e.OPTION_NUMBER (+) = hd.OPTION_NUMBER and e.YEAR (+) = hd.YEAR AND e.MODEL (+) = hd.MODEL AND e.PLP_ID (+) = hd.PLP_ID';
    else
    q := q || 'WHERE e.option_number = hd.option_number and e.year = hd.year and e.model = hd.model and e.plp_id = hd.plp_id';
    END IF;
    END IF;
    q := q || ' AND :P0_PLP_ID = hd.PLP_ID';
    return q;
    END;

  • ORA-01785 error :ORDER BY item must be the number of a SELECT-list expressi

    When i'm sorting on a calculated field i'm getting the following error:
    ORDER BY item must be the number of a SELECT-list expression
    Please any help?
    Thanks

    Here is the query, but its generated by the disco plus:
    WITH
    DISC_TMP_090921083714 as (
    SELECT /*+ NOREWRITE */DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') as C_1,o787901.INVOICE_DT as E787916,SUM(o787901.USED_AMOUNT) as E787915_SUM,( SUM(o787901.PS_QTY) )-( ( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) ) as C_4,( 0.8*( SUM(o787901.PS_QTY) ) )-( ( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) ) as C_5,( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) as C_3,0.8*( SUM(o787901.PS_QTY) ) as C_2,SUM(o787901.PS_QTY) as E787907_SUM,( ( SUM(o787901.ENCUMB_AMNT) )/( SUM(o787901.ORIGINAL_AMOUNT) ) ) as C_6,SUM(o787901.ORIGINAL_AMOUNT) as E787909_SUM,( SUM(o787901.ENCUMB_AMNT) )-( SUM(o787901.PO_PAYMNTS) ) as C_7,SUM(o787901.PO_PAYMNTS) as E787905_SUM,SUM(o787901.ENCUMB_AMNT) as E787908_SUM
    FROM ( select sum(t1.AMOUNT) po_paymnts,
    (t2.ORIGINAL_AMOUNT/t2.PS_QTY) unit_cost_1,
    t1.PO_NO,
    t2.PS_QTY,
    t2.AMOUNT encumb_amnt,
    t2.ORIGINAL_AMOUNT,
    T2.class district,
    0 owner_id,
    0 stock_id,
    0 received_amount,
    0 curr_amount,
    0used_amount,
    to_char(add_months(t1.INVOICE_DT,6),'YYYY') invoice_dt,
    0 unit_cost
    from dwtarget.dw_ps_all_payments_fact t1,dwtarget.dw_ps_ap_po_rq_fact t2
    where t1.PO_NO=t2.PS_NO
    and t1.LINE_NO=t2.PS_LINE
    and t2.OBJECT in ('545000','545001')
    group by t1.PO_NO,T2.class,t2.PS_QTY,t2.AMOUNT,t2.ORIGINAL_AMOUNT,t2.class,to_char(add_months(t1.INVOICE_DT,6),'YYYY')
    union all
    select 0 unit_cost_1,0 po_paymnts,to_char(0) po_no,0 ps_qty,0 encumb_amnt,0 original_amount,to_char(t2.owner_cat) district, t1.owner_id, stock_id,
    sum(received_amount) received_amount,
    sum(curr_amount) curr_amount,
    sum(used_amount) used_amount,
         date_work,
    unit_cost
         from
    (select owner_id_to owner_id,stock_id_to stock_id,sum(full_amount) received_amount,0 curr_amount,0 used_amount,null date_work,unit_cost
    from dwtarget.dw_wms_mat_transfer
    where master_code_id in ('8664','8665')
    and unit_id='724'
    group by owner_id_to,stock_id_to,unit_cost
    union all
    select owner_id,stock_id,0 received_amount,sum(curr_amount) curr_amount,0 used_amount,null date_work,0 unit_cost
    from dwtarget.dw_wms_mat_inv
    where master_code_id in ('8664','8665')
    group by owner_id,stock_id
    union all
    select t2.owner_id, t1.stock_id, 0 received_amt, 0 curr_amt, sum(amount) used_amt,to_char(add_months(date_work,6),'YYYY') date_work,0 unit_cost
    from dwtarget.dw_wms_wo_mat_dc t1,
    (select owner_id,stock_id
    from dwtarget.dw_wms_mat_inv
    where master_code_id in ('8664','8665')
    group by owner_id,stock_id)t2
    where t1.stock_id = t2.stock_id
    and unit_id='724'
    group by t2.owner_id, t1.stock_id,to_char(add_months(date_work,6),'YYYY')) t1,
    dwtarget.dw_wms_setup_owner t2
    where t1.owner_id = t2.owner_id
    group by t2.owner_cat,t1.owner_id,stock_id,date_work,unit_cost
    ) o787901
    GROUP BY DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes'),o787901.INVOICE_DT
    HAVING (( SUM(o787901.PS_QTY) ) != 0))
    SELECT C_1 as C_1,E787916 as E787916,E787915_SUM as E787915_SUM,C_4 as C_4,C_5 as C_5,C_3 as C_3,C_2 as C_2,E787907_SUM as E787907_SUM,C_6 as C_6,E787909_SUM as E787909_SUM,C_7 as C_7,E787905_SUM as E787905_SUM,E787908_SUM as E787908_SUM, 0
    FROM DISC_TMP_090921083714
    UNION ALL
    SELECT /*+ NOREWRITE */C_1 as C_1,E787916 as E787916,E787915_SUM as E787915_SUM,C_4 as C_4,C_5 as C_5,C_3 as C_3,C_2 as C_2,E787907_SUM as E787907_SUM,C_6 as C_6,E787909_SUM as E787909_SUM,C_7 as C_7,E787905_SUM as E787905_SUM,E787908_SUM as E787908_SUM, GID as GID FROM (SELECT DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') as C_1,o787901.INVOICE_DT as E787916,SUM(o787901.USED_AMOUNT) as E787915_SUM,( SUM(o787901.PS_QTY) )-( ( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) ) as C_4,( 0.8*( SUM(o787901.PS_QTY) ) )-( ( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) ) as C_5,( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) as C_3,0.8*( SUM(o787901.PS_QTY) ) as C_2,SUM(o787901.PS_QTY) as E787907_SUM,( ( SUM(o787901.ENCUMB_AMNT) )/( SUM(o787901.ORIGINAL_AMOUNT) ) ) as C_6,SUM(o787901.ORIGINAL_AMOUNT) as E787909_SUM,( SUM(o787901.ENCUMB_AMNT) )-( SUM(o787901.PO_PAYMNTS) ) as C_7,SUM(o787901.PO_PAYMNTS) as E787905_SUM,SUM(o787901.ENCUMB_AMNT) as E787908_SUM,GROUPING_ID(( DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') ),o787901.INVOICE_DT) as GID
    FROM ( select sum(t1.AMOUNT) po_paymnts,
    (t2.ORIGINAL_AMOUNT/t2.PS_QTY) unit_cost_1,
    t1.PO_NO,
    t2.PS_QTY,
    t2.AMOUNT encumb_amnt,
    t2.ORIGINAL_AMOUNT,
    T2.class district,
    0 owner_id,
    0 stock_id,
    0 received_amount,
    0 curr_amount,
    0used_amount,
    to_char(add_months(t1.INVOICE_DT,6),'YYYY') invoice_dt,
    0 unit_cost
    from dwtarget.dw_ps_all_payments_fact t1,dwtarget.dw_ps_ap_po_rq_fact t2
    where t1.PO_NO=t2.PS_NO
    and t1.LINE_NO=t2.PS_LINE
    and t2.OBJECT in ('545000','545001')
    group by t1.PO_NO,T2.class,t2.PS_QTY,t2.AMOUNT,t2.ORIGINAL_AMOUNT,t2.class,to_char(add_months(t1.INVOICE_DT,6),'YYYY')
    union all
    select 0 unit_cost_1,0 po_paymnts,to_char(0) po_no,0 ps_qty,0 encumb_amnt,0 original_amount,to_char(t2.owner_cat) district, t1.owner_id, stock_id,
    sum(received_amount) received_amount,
    sum(curr_amount) curr_amount,
    sum(used_amount) used_amount,
         date_work,
    unit_cost
         from
    (select owner_id_to owner_id,stock_id_to stock_id,sum(full_amount) received_amount,0 curr_amount,0 used_amount,null date_work,unit_cost
    from dwtarget.dw_wms_mat_transfer
    where master_code_id in ('8664','8665')
    and unit_id='724'
    group by owner_id_to,stock_id_to,unit_cost
    union all
    select owner_id,stock_id,0 received_amount,sum(curr_amount) curr_amount,0 used_amount,null date_work,0 unit_cost
    from dwtarget.dw_wms_mat_inv
    where master_code_id in ('8664','8665')
    group by owner_id,stock_id
    union all
    select t2.owner_id, t1.stock_id, 0 received_amt, 0 curr_amt, sum(amount) used_amt,to_char(add_months(date_work,6),'YYYY') date_work,0 unit_cost
    from dwtarget.dw_wms_wo_mat_dc t1,
    (select owner_id,stock_id
    from dwtarget.dw_wms_mat_inv
    where master_code_id in ('8664','8665')
    group by owner_id,stock_id)t2
    where t1.stock_id = t2.stock_id
    and unit_id='724'
    group by t2.owner_id, t1.stock_id,to_char(add_months(date_work,6),'YYYY')) t1,
    dwtarget.dw_wms_setup_owner t2
    where t1.owner_id = t2.owner_id
    group by t2.owner_cat,t1.owner_id,stock_id,date_work,unit_cost
    ) o787901
    WHERE ( SYS_OP_MAP_NONNULL(DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes')) , SYS_OP_MAP_NONNULL(o787901.INVOICE_DT) ) IN ( SELECT SYS_OP_MAP_NONNULL(C_1) , SYS_OP_MAP_NONNULL(E787916) FROM DISC_TMP_090921083714)
    GROUP BY GROUPING SETS(( ( DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') ),o787901.INVOICE_DT ),( ( DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') ) ))
    HAVING GROUP_ID()=0
    AND GROUPING_ID(( DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') ),o787901.INVOICE_DT) != 0)
    ORDER BY 14 DESC;
    Thanks

  • Help:  How to add a library item to hide the default Window menu

    Hi,
    In this post: Help: How to add a library item to hide the default Window menu, it described how to create an menu that will hide the default window menu.
    I'd like to know if there a way to put this component into library so that others can directly inherit this menu in other FORMS and how to implement it.
    Jimmy

    Hi,
    I found the solution and the post was not properly phrased. There is no need to add menu into library. All we need is to put the compiled menu into Oracle AS and add the menu name the menu module of the given form.
    Thanks.
    Jimmy

  • Can someone verify the following regarding Find My Phone:  I assume the lost device (iPhone) and the device (ipad) one is using to find the lost item must have the identical Apple ID, Apple PW, and iCloud PW and username? Otherwise it won't work?

    Can someone verify the following regarding Find My Phone:
      I assume the lost device (iPhone) and the device (ipad) one uses to find the lost item must have identical Apple IDs , PWs as well as identical iCloud identification?

    Back now.  Are you saying that you entered you iCloud ID and password in the Find My iPhone app (see photo below), and it said you don't have an iCloud account?  Are you sure this is the ID for your iCloud account (check Settings>iCloud next to Account at the top on the device you are trying to track)?
    Also, did you try using this ID and password on icloud.com on your computer to try to track it, as explained here: http://help.apple.com/icloud/#mmfc0f2442?  Did that work?

  • There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

    I have been looking at my code for hours now and cant figure out what is wrong. The error has kept popping up even when i thought i had fixed everything. maybe a second set of eyes could help me out here. If you could help me out it would be much appreciated.
    USE [ConorsSetKits]
    GO
    CREATE TABLE Customers (
    CustomerID Int NOT NULL IDENTITY(1000,1),
    LastName NChar(30) NOT NULL,
    FirstName NChar(30) NOT NULL,
    Address NChar(50) NOT NULL,
    City NChar(30) NOT NULL,
    State NChar(2) NOT NULL,
    Zip Numeric(5) NOT NULL,
    Email NVarChar(50) NOT NULL,
    DateOfBirth Numeric (4) NOT NULL,
    CONSTRAINT CustomersPK PRIMARY KEY(CustomerID),
    CONSTRAINT ValidZip
    CHECK ( [Zip] LIKE '[0-9][0-9][0-9][0-9][0-9]' ),
    CONSTRAINT ValidState
    CHECK( LEN([State]) = 2),
    CONSTRAINT DateOfBirth
    CHECK ([DateOfBirth] BETWEEN '1920-01-01' AND getdate() - 5844));
    CREATE TABLE Sets (
    SetID Int NOT NULL IDENTITY(1000,1) Primary Key,
    SetName NChar(20) NOT NULL,
    SetType NChar (20) NOT NULL,
    Price Numeric (20) NOT NULL,
    Quantity Numeric (50) NOT NULL,
    CONSTRAINT SetTypeCheck
    CHECK (SetType IN ('Planes','Tanks','Robots','Cars','Helicopters','Boats','Trains','Motorcycles','Jets')),
    CONSTRAINT ValidQuantity 
    CHECK (Quantity >= 0)
    CREATE TABLE Orders (
    OrderID Int NOT NULL IDENTITY(1000,1),
    CustomerID Int NOT NULL,
    OrderDate Date NOT NULL,
    CONSTRAINT CAIntPK PRIMARY KEY(OrderID, CustomerID),
    SET IDENTITY_INSERT dbo.CUSTOMER OFF
    SET IDENTITY_INSERT dbo.Sets OFF
    SET IDENTITY_INSERT dbo.Orders OFF
    SET IDENTITY_INSERT dbo.CUSTOMER ON
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1000, 'Janes', 'Jeffrey', '123 W. Elm St', 'Renton', 'WA', '98055',
    '[email protected]',1985);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1001, 'Smith', 'David', '813 Tumbleweed Lane', 'Loveland', 'CO', '81201', 
    '[email protected]',1992);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1015, 'Twilight', 'Tiffany', '88 1st Avenue', 'Langley', 'WA', '98260',
    '[email protected]',1972);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1033, 'Smathers', 'Fred', '10899 88th Ave', 'Bainbridge Island', 'WA', '98110',
    '[email protected]',1980);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1034, 'Frederickson', 'Mary Beth', '25 South Lafayette', 'Denver', 'CO', '80201',
    '[email protected]',1970);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1036, 'Warning', 'Selma', '205 Burnaby', 'Vancouver', 'BC', '80201',
    '[email protected]',1981);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1037, 'Wu', 'Susan', '105 Locust Ave', 'Atlanta', 'GA', '30322',
    '404', '653-3465', '[email protected]',1971);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1040, 'Gray', 'Donald','55 Bodega Ave', 'Bodega Bay', 'CA', '94923',
    '[email protected]',1985);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1041, 'Johnson', 'Lynda', '117 C Street', 'Washington', 'DC', '20003',
    '[email protected]',1969);
    INSERT INTO Customers
    (CustomerID, LastName, FirstName, Address, City, State, Zip,
    Email, DateOfBirth)
    VALUES (
    1051, 'Wilkens', 'Chris', '87 Highland Drive', 'Olympia', 'WA', '98508',
    '[email protected]',1994); 
    SET IDENTITY_INSERT dbo.CUSTOMER OFF
    SET IDENTITY_INSERT dbo.Sets ON
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1000, 'MysterySet1','Planes',$29.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1001, 'MysterySet2','Planes',$19.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1002, 'MysterySet4','Tanks',$39.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1003, 'MysterySet3','Robots',$19.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1004, 'MysterySet5','Cars',$29.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1005, 'MysterySet6','Boats',$29.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1006, 'MysterySet7','Trains',$39.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1007, 'MysterySet8','Motorcycles',$9.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1008, 'MysterySet9','Helicopters',$29.99,10);
    INSERT INTO Sets
    (SetID, SetName, SetType, Price, Quanity)
    VALUES (
    1009, 'MysterySet10','Jets',$29.99,10);
    SET IDENTITY_INSERT dbo.Sets OFF
    SET IDENTITY_INSERT dbo.Orders ON
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1000, '2012-12-12');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1000, '2013-12-30');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1005, '2013-08-30');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1004, '2013-12-30');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1004, '2013-08-31');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1004, '2014-03-25');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1002, '2012-11-14');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1001, '2012-11-14');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1001, '2013-01-05');
    INSERT INTO Orders 
    (OrderID, OrderDate)
    VALUES 
    (1006, '2012-06-22');
    SET IDENTITY_INSERT dbo.Orders OFF

    Price Numeric (20) NOT NULL,
    I do not think you understand this datatype?  Go look at the values you are attempting to insert into this column.  For example, "$29.99".  After the insert, what value is actually stored in that column? 
    DateOfBirth Numeric (4) NOT NULL,
    No. Just No.  Either change the column name to faithfully represent what values you intend to store (and apply the appropriate constraints) or change the datatype and the values that you intend to store to match the column name.  And the constraint
    that you do have:
     CONSTRAINT DateOfBirth
     CHECK ([DateOfBirth] BETWEEN '1920-01-01' AND getdate() - 5844));
    is both logically suspect and syntactically wrong. First, the upper boundary will be computed as 1999-04-29 15:50:21.670.  But, of course, your column is a whole number of no more than 4 digits.  The same issue applies to your lower boundary. 
    A simple select statement will show you those errors
    select cast('1920-01-01' as numeric(4)), getdate() - 5844, cast(getdate() - 5844 as numeric(4));
    An insert statement fails with the same error.  Because, of course, your boundary values must actually be converted to numeric(4) in order to compare them against the value contained in the column.   Generally, you can convert from
    string to numeric - IF the content of the string actually contains a value that is numeric and can be converted into the specific type needed.  Not so in this case.  Is this 16 year period (5844 days) significant for some reason?  You should
    document it here in your DDL with a comment, because it is unlikely to be documented (and kept current) anywhere else. 
    And lastly, your script has:
    SET IDENTITY_INSERT dbo.CUSTOMER OFF
    That is not the name of your table, and therefore that statement also fails.  The table name you used is plural. 

  • Switch item display type dynamically? popup-lov | select-list

    Hi,
    I've got a select-list item which I want to switch dynamically to a popup-lov. I want to display a popup-lov when the number of items to select from is high (say more than 15), otherwise I want to display a selct-list. How can I achieve this?
    thanks,
    Stephan

    steph0h wrote:
    Hi,
    I've got a select-list item which I want to switch dynamically to a popup-lov. I want to display a popup-lov when the number of items to select from is high (say more than 15), otherwise I want to display a selct-list. How can I achieve this?How do you determine the number of options?
    The simple approach is to create separate Select List and Pop-up LOV items and use conditions based on the number of available options to display the correct one. The items have to have different names, so if this is to be used for example to provide a value for a database column, create another hidden item based on the database column and transfer the values between the UI and DB items using computations.

  • Incorrect Sales order line item assignment to the Planned order

    Hi,
    I am creating a sales order & then MRP run to get planned orders.
    The sales order has one assembly line item, which is a configurable material. Inside the configuration of the assembly, I maintain some components. After saving it explodes and the same components reflect below line items of the assebly in sales order.
    Now if I run MRP there is a requirement for the component and so the planned order is created for the component. But If I open the planned order & see inside its Assignment view, there is correct sales order number, but the line item its showing is that of Assembly and not of the component. Why ? Is there any wrong in configuration or any wrong in planning type ?
    I checked correct Item category is used.
    MRP Type - PD
    Correct requirement type is used in procurement view.
    I think what ever is comming is standard SAP functionality. But I am not sure.
    The client is saying, thie is wrong and because of this the warehouse guy is picking the wrong material (As the line number is wrong).
    Please suggest here.

    Hi Sambit,
                  We assign the Ordet type(Production order/ Planned order/ Network) to the requirment class to let the system know that for the material which has this requirment class , system chould create a Planned/ Procustion order. When you assign this normally system should create it automatically based on the settings. Requirment class comes from the requirment type which comes from the Item category and MRP type(*Genarally). Also check if there is any startegy Group assigned to the material in the material master and also the MRP group. Check the strtegy group defualts in the transaction "OPPS"(rEQUIRMENT TYPE /class FOR CUstome requirments). The best thing you could do is make the screen shots of the assembly header and the component's requirment classes and tell the business that based on this sytem is creating the planned order.And also check the plant parameters and the MRP group parameters in "OPPQ" and "OPPR" respectively. Kindly please let me know if you need any more infromation on this.
    Regards,
    Ram Pedarla

  • SRM purchase order number must equal the number of transferred requisition

    HI,
    KNOW SOMEONE A BADI WHAT CREATE IN  SRM A PURCHASE ORDER WITH THE SAME  NUMBER ORDER TRANSFERRED  R / 3 .

    Hi Yasar?
    Did you evaluate working with valuated sales order stock?
    This way your PP people could use Make to Order style manufacturing and produce for a special "batch" => The sales order special stock.
    Can be used in Repetitive Manufacturing and has no impact in costing, therefore a nice option for the situation you are describing.
    In MD04 a special segment will appear for the the Sales Order stock and this stock will only be able to be shipped for this special order.
    Best Regards,
    Franck

  • How do you get the value of a selected list item?

    I have a drop-down list that the user can choose from. How do I get the value of what they selected? I thought I could do this by using the NAME_IN function, but I'm getting FRM-40105 Unable to resolve reference to item X. I don't know what I'm doing wrong.
    Thanks!

    Hi,
    You can use an WHEN-LIST-CHANGED trigger, attached to the list-item itself. And, in this trigger, you can use the name of the item to refer its value.
    For example:
    :block_name.list_item_name
    John

  • ORA-01785

    Hi,
    Can anyone help me with this error - ORA-01785: ORDER BY item must be the number of a SELECT-list expression
    Both queries are running fine individually so i am quite confused.
    select oh.client_id,
           oh.customer_id,
           oh.name,
           to_char(trunc(oh.ship_by_date), 'DD-Mon-YYYY'),
           ol.order_id,
           sum(itl.update_qty) as cases_shipped,
           count(distinct itl.pallet_id) as no_pallets     
    from order_header oh, order_line ol, inventory_transaction itl
    where oh.order_id = ol.order_id
    and ol.line_id = itl.line_id
    and itl.reference_id = ol.order_id
    and itl.sku_id = ol.sku_id
    and oh.client_id = ol.client_id
    and itl.client_id = oh.client_id
    and itl.code = 'Shipment'
    and trunc(oh.ship_by_date) >= '16-FEB-10'
    and trunc(oh.ship_by_date) <= '20-FEB-10'
    and oh.client_id = 'NOM-TELFOR'
    group by oh.client_id, oh.customer_id, oh.name, trunc(oh.ship_by_date), ol.order_id
    UNION ALL
    select oh.client_id,
           oh.customer_id,
           oh.name,
           to_char(trunc(oh.ship_by_date), 'DD-Mon-YYYY'),
           ol.order_id,
           sum(itl.update_qty) as cases_shipped,
           count(distinct itl.pallet_id) as no_pallets   
    from order_header oh, order_line ol, inventory_transaction_archive itl
    where oh.order_id = ol.order_id
    and ol.line_id = itl.line_id
    and itl.reference_id = ol.order_id
    and itl.sku_id = ol.sku_id
    and oh.client_id = ol.client_id
    and itl.client_id = oh.client_id
    and itl.code = 'Shipment'
    and trunc(oh.ship_by_date) >= '16-FEB-10'
    and trunc(oh.ship_by_date) <= '20-FEB-10'
    and oh.client_id = 'NOM-TELFOR'
    group by oh.client_id, oh.customer_id, oh.name, trunc(oh.ship_by_date), ol.order_id
    order by trunc(oh.ship_by_date) asc, oh.client_id, oh.customer_idThanks in advance.
    SM.

    In a UNION you have to order on columns/expressions you're extractiong in the select list.
    And you have to use either the column numbers or the column aliases.
    Since you're trying to order on an expression that is not in the select list you need to do something like:
    select client_id,
           customer_id,
           name,
           to_char(ship_by_date, 'DD-Mon-YYYY'),
           order_id,
           cases_shipped,
           no_pallets  
    from (
    select oh.client_id,
           oh.customer_id,
           oh.name,
           trunc(oh.ship_by_date) ship_by_date,
           ol.order_id,
           sum(itl.update_qty) as cases_shipped,
           count(distinct itl.pallet_id) as no_pallets     
    from order_header oh, order_line ol, inventory_transaction itl
    where oh.order_id = ol.order_id
    and ol.line_id = itl.line_id
    and itl.reference_id = ol.order_id
    and itl.sku_id = ol.sku_id
    and oh.client_id = ol.client_id
    and itl.client_id = oh.client_id
    and itl.code = 'Shipment'
    and trunc(oh.ship_by_date) >= '16-FEB-10'
    and trunc(oh.ship_by_date) <= '20-FEB-10'
    and oh.client_id = 'NOM-TELFOR'
    group by oh.client_id, oh.customer_id, oh.name, trunc(oh.ship_by_date), ol.order_id
    UNION ALL
    select oh.client_id,
           oh.customer_id,
           oh.name,
           trunc(oh.ship_by_date),
           ol.order_id,
           sum(itl.update_qty) as cases_shipped,
           count(distinct itl.pallet_id) as no_pallets   
    from order_header oh, order_line ol, inventory_transaction_archive itl
    where oh.order_id = ol.order_id
    and ol.line_id = itl.line_id
    and itl.reference_id = ol.order_id
    and itl.sku_id = ol.sku_id
    and oh.client_id = ol.client_id
    and itl.client_id = oh.client_id
    and itl.code = 'Shipment'
    and trunc(oh.ship_by_date) >= '16-FEB-10'
    and trunc(oh.ship_by_date) <= '20-FEB-10'
    and oh.client_id = 'NOM-TELFOR'
    group by oh.client_id, oh.customer_id, oh.name, trunc(oh.ship_by_date), ol.order_id
    order by 4,1,2
    )Max
    http://oracleitalia.wordpress.com
    Edited by: Massimo Ruocchio on Mar 2, 2010 5:09 PM

  • Error ORA-01785, while viewing Application Express views in Utilities tab.

    Hi,
    I am unable to see data in Application Express Views in Utilities tab. I am using APEX 3.1.2.
    I am getting the following error,
    failed to parse SQL query:
    ORA-01785: ORDER BY item must be the number of a SELECT-list expression.
    There is no sort by in the SQL query. select WORKSPACE, APPLICATION_ID, APPLICATION_NAME
    from APEX_APPLICATION_BC_ENTRIES .
    Can anyone throw some light on this?
    Thanks
    Nimmi

    No, It is not that view I get the same error whenever I am in the Utilities Tab of APEX and trying to query Application Express views.
    Thanks

  • Order_by in set_block_property returns ORA-01785

    Hello.
    We have a problem with using function in set_block_property with order by when using union sentence.
    Our code looks like:
    set_block_property('block', default_where, 'id = '||:item||'
    UNION ALL
    SELECT ROWID,column1,column2,column3,... FROM table WHERE
    id = '||:item);
    set_block_property('block', order_by, 'function(column1), column2');
    Form returns error: ORA -01785 : ORDER BY item must be the number of a SELECT-list expression
    We know, that with union we should use numbers in order by instead of column names. But it doesn't work.
    If we do not use UNION, then order_by with function works.
    How can we solve this problem?
    Thanks.
    Edited by: DejanH on Sep 10, 2008 8:03 AM

    Not sure you can ever get Forms to handle that complicated a query using default block processing.
    Since it looks like your block is display-only, I would create a record group with the query and order by, populate it, and then step through the record group row-by-row moving the values to the block (which would then be a control-block rather than a base-table block). Of course, if your query selects more than a few hundred rows, this is not a good solution.

  • ORA-01785 error when dynamically resetting report source

    When programmatically changing the region source on a 'function body returning SQL query' report, i get the following error:
    ORA-01785: ORDER BY item must be the number of a SELECT-list expression
    if the new SQL statement has fewer columns than the one it is replacing, and the user had previously selected a sort column for a column# higher than the highest column number in the new query
    for instance if the query was SELECT * FROM EMP and the user had clicked the COMM header to sort on COMM (column number 7), then changing the region source to SELECT * FROM DEPT results in the ORA-01785 -- evidently because Apex is submitting SELECT * FROM DEPT ORDER BY 7
    is there a way to programmatically reset Apex's ORDER BY column# setting? clear cache and reset pagination don't seem to do it

    that put me on the right track
    i really didn't want to reset all user preferences, as i am making extensive use of them in this application
    however, i did find HTMLDB_UTIL.REMOVE_SORT_PREFERENCES -- which, unfortunately, removes all sort preferences, not for a specific page or region.
    i was able to find the correct preference in WWV_FLOW_PREFERENCES$, so I can user HTML_DB_UTIL.SET_PREFERENCE to reset it, but the preference_name includes the region#, which changes on import -- so i'll need to extract if at runtime using javascript, or figure out some other runtime technique for finding the correct preference_name
    hey, apex developers, how about enhancing HTMLDB_UTIL.REMOVE_SORT_PREFERENCES to allow setting/removing the sort preference for a specific page (by page number or alias) and region (by position on the page or some other reliable identifier?

  • Re-Cost (CK55) Marked Sales Order Line Items

    My current client resets standards each quarter. They have requested to re-cost open CTO Sales Order line items and update the valuated sales order cost (EK01). I have reviewed the options available in CK55 - Mass Costing and find the processing log retrurns the following message:
       Cost estimate with status VO exists. See long text
       Message no. CK_MCSO014
       Diagnosis
       A cost estimate with the status VO already exists. This cost estimate will not be overwritten.
       System Response
       Processing continues with the next item.
       Note
       You can remove this message from the log with the customizing transaction User-Defined Error Management for Mass Costing of
       Sales Documents. The item will still not be costed, however.
    Short of manually re-costing each open sales order line item. Is there a way to re-cost open CTO Sales Order Line items?
    Regards,
    Dewayne Wesley

    I didn't realize there was a MASS Cost transaction.
    Is there a MASS delete Sales order Cost estimat transaction? That would help.

Maybe you are looking for