Query for no FIFO cost

We often receive errors that we cannot perform transactions since cost is zero. Of course, when error is received we user inventory reconciliation and update the FIFO stacks. I do not want to turn this feature off).
What I am trying to do is come up with an alert and/or query that will show inventory on hand with no FIFO cost (subject to revaluation). I have the following query that does not work. can ayone help?
SELECT T0.ItemCode as 'Item No', T1.[ItemName] as 'Description', T1.[Onhand] as 'Instock', T1.[AvgPrice] as 'Average Cost', T0.[CalcPrice] as 'FIFO Cost'  FROM OINM T0  INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.CalcPrice = '0' and  T1.EvalSystem ='F' and T1.[OnHand] <> 0
Thanks in advance

Hi Keith ,
Try with this
SELECT Distinct T0.ItemCode as 'Item No', T1.ItemName as 'Description', T1.Onhand as 'Instock', T1.AvgPrice as 'Average Cost',
T0.CalcPrice  FROM OINM T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T1.[LastPurPrc] = 0 and T0.CalcPrice=0 and T1.EvalSystem ='F' and T1.OnHand> 0
Hope this helps
Bishal

Similar Messages

  • Query for Cost Code in oracle HRMS

    Hello Exports,
    i am new in oacle hrms,
    So Can you please tell how to fetch cost code in oracle hrms r12 ( i need sql query for cost code )
    Thanks

    try the following (assignment costing as at today):
    select ppx.full_name
    ,ppx.employee_number
    ,pax.assignment_number
    ,pax.primary_flag
    ,pcax.proportion
    ,pcak.segment1
    ,pcak.segment2
    ,pcak.segment3
    ,pcak.segment4
    from per_assignments_x pax
    ,per_people_x ppx
    ,pay_cost_allocations_x pcax
    ,pay_cost_allocation_keyflex pcak
    where ppx.person_id = pax.person_id
    and pax.assignment_id = pcax.assignment_id
    and pcak.cost_allocation_keyflex_id = pcax.cost_allocation_keyflex_id

  • Ad-Hoc Query for OU's and their Cost Center

    Cost Centers are often inherited from parent OU's. If I try to make an Ad-Hoc query, select some OU's and show the Cost Centers via the relationship A11, the fields are empty unless the Cost Center is hardcoded for the OU.
    Is there a way to create an Ad-Hoc query that shows the Cost Centers even if they are inherited? I can't make any changes to system tables or other customizing.
    Thanks in advance!

    Unfortunately I'm not authorized to use SE16.
    This is my selection:
    Object ID: xxx (Selection)
    Object Type: O (Selection)
    Plan Version: 01 (Selection)
    Relationship Between Objects: 011 (IT1001)
    Relationship Specification: A (IT1001)
    Type of Related Object: K (IT1001)
    Output:
    Object ID (IT1000)
    Object Abbreviation (IT1000)
    Object Name (IT1000)
    ID of Related Object (IT1001)
    Any other way?

  • Re: Query for Cost center actual by period.

    Hi Experts,
    Good Morning everybody,
    I want cost center actual values (with cost element) by period. I have created query through T.code-SQVI by joining tables COSP and CSKS.
    I got the report, but i cannot see the foreign currency postings in SQVI report. so there was a difference between SQVI and KSB1 report.
    Why i cannot see Foreign currency postings in SQVI report. please advise me, whether any other table that i can use in the query for cost center actuals by period.
    Thanks in advance & Points will be assign for useful answers,
    KUMAR

    See the answer in FI thread.
    Hi,
    KSB1 is based on COEP table. COSP shows only external postings. You should take COSS as well for internal postings in CO. Check the nature of the join with CSKS: notice COSP has OBJNR field which is not the same as KOSTL in CSKS.
    Anyway, I'd suggest you using not the join between tables, but one of standard logical databases SAP provides. For cost centres, you can use CIK.
    Regards,
    Eli

  • Query Not displaying data for a particluar Cost centre code(urgent) !!!!!!

    Hi Folks,
    I have an infoset which is on top of two ODSs.
    Data for a particular cost center code present in both the ODSs.
    There is no data prsent in RSISET for that CC.
    Also the query is not showing any data for that CC.
    Data is not showin in RSRT for that CC ,but the SQL stament is getting generated  for that CC.
    Already Checked the infoset key fileds settings and all....
    Y its happening like this any ideas???
    Need your help buddies urgent issue.

    Please check weather the links are established between the info objects properly in the infoset.

  • Error while executing a sql query for select

    HI All,
    ORA-01652: unable to extend temp segment by 128 in tablespace PSTEMP i'm getting this error while i'm executing the sql query for selecting the data.

    I am having 44GB of temp space, while executing the below query my temp space is getting full, Expert please let us know how the issue can be resolved..
    1. I dont want to increase the temp space
    2. I need to tune the query, please provide your recomendations.
    insert /*+APPEND*/ into CST_DSA.HIERARCHY_MISMATCHES
    (REPORT_NUM,REPORT_TYPE,REPORT_DESC,GAP,CARRIED_ITEMS,CARRIED_ITEM_TYPE,NO_OF_ROUTE_OF_CARRIED_ITEM,CARRIED_ITEM_ROUTE_NO,CARRIER_ITEMS,CARRIER_ITEM_TYPE,CARRIED_ITEM_PROTECTION_TYPE,SOURCE_SYSTEM)
    select
    REPORTNUMBER,REPORTTYPE,REPORTDESCRIPTION ,NULL,
    carried_items,carried_item_type,no_of_route_of_carried_item,carried_item_route_no,carrier_items,
    carrier_item_type,carried_item_protection_type,'PACS'
    from
    (select distinct
    c.REPORTNUMBER,c.REPORTTYPE,c.REPORTDESCRIPTION ,NULL,
    a.carried_items,a.carried_item_type,a.no_of_route_of_carried_item,a.carried_item_route_no,a.carrier_items,
    a.carrier_item_type,a.carried_item_protection_type,'PACS'
    from CST_ASIR.HIERARCHY_asir a,CST_DSA.M_PB_CIRCUIT_ROUTING b ,CST_DSA.REPORT_METADATA c
    where a.carrier_item_type in('Connection') and a.carried_item_type in('Service')
    AND a.carrier_items=b.mux
    and c.REPORTNUMBER=(case
    when a.carrier_item_type in ('ServicePackage','Service','Connection') then 10
    else 20
    end)
    and a.carrier_items not in (select carried_items from CST_ASIR.HIERARCHY_asir where carried_item_type in('Connection') ))A
    where not exists
    (select *
    from CST_DSA.HIERARCHY_MISMATCHES B where
    A.REPORTNUMBER=B.REPORT_NUM and
    A.REPORTTYPE=B.REPORT_TYPE and
    A.REPORTDESCRIPTION=B.REPORT_DESC and
    A.CARRIED_ITEMS=B.CARRIED_ITEMS and
    A.CARRIED_ITEM_TYPE=B.CARRIED_ITEM_TYPE and
    A.NO_OF_ROUTE_OF_CARRIED_ITEM=B.NO_OF_ROUTE_OF_CARRIED_ITEM and
    A.CARRIED_ITEM_ROUTE_NO=B.CARRIED_ITEM_ROUTE_NO and
    A.CARRIER_ITEMS=B.CARRIER_ITEMS and
    A.CARRIER_ITEM_TYPE=B.CARRIER_ITEM_TYPE and
    A.CARRIED_ITEM_PROTECTION_TYPE=B.CARRIED_ITEM_PROTECTION_TYPE
    AND B.SOURCE_SYSTEM='PACS'
    Explain Plan
    ==========
    Plan
    INSERT STATEMENT ALL_ROWSCost: 129 Bytes: 1,103 Cardinality: 1                                                        
         20 LOAD AS SELECT CST_DSA.HIERARCHY_MISMATCHES                                                   
              19 PX COORDINATOR                                              
                   18 PX SEND QC (RANDOM) PARALLEL_TO_SERIAL SYS.:TQ10002 :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1                                         
                        17 NESTED LOOPS PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1                                    
                             15 HASH JOIN RIGHT ANTI NA PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,098 Cardinality: 1                               
                                  4 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 63 Bytes: 359,283 Cardinality: 15,621                          
                                       3 PX SEND BROADCAST PARALLEL_TO_PARALLEL SYS.:TQ10001 :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621                     
                                            2 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621                
                                                 1 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621           
                                  14 NESTED LOOPS ANTI PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 40,256,600 Cardinality: 37,448                          
                                       11 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 6,366,160 Cardinality: 37,448                     
                                            8 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1002               
                                                 7 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 1 Bytes: 214 Cardinality: 2           
                                                      6 PX SEND BROADCAST PARALLEL_FROM_SERIAL SYS.:TQ10000 Cost: 1 Bytes: 214 Cardinality: 2      
                                                           5 INDEX FULL SCAN INDEX CST_DSA.IDX$$_06EF0005 Cost: 1 Bytes: 214 Cardinality: 2
                                            10 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448                
                                                 9 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448           
                                       13 TABLE ACCESS BY INDEX ROWID TABLE PARALLEL_COMBINED_WITH_PARENT CST_DSA.HIERARCHY_MISMATCHES :Q1002Cost: 0 Bytes: 905 Cardinality: 1                     
                                            12 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT SYS.HIERARCHY_MISMATCHES_IDX3 :Q1002Cost: 0 Cardinality: 1                
                             16 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT CST_DSA.IDX$$_06EF0001 :Q1002Cost: 1 Bytes: 5 Cardinality: 1

  • Query for Price difference account when item is not sold but not on stock

    Hi Experts!
    One of my clients accountant requires a report which will help for what to do with the balance of the price difference account.
    At the and of the year there are some postings on this account, but not every item that hadnt been on stock when A/P Invoice arrived were sold. Some item were waistrel and put into a waistrel warehouse, but not sold.Some item were sent back to the supplier, but not sold.
    Is it possibble to make a query for knowing where to post the balance of the price difference account? Not all should be post to the Cost of goods sold.
    Thank you in advance!

    Hi,
    The query is possible.  However, it is a complicated one. It is also need to involve detailed analysis to your transaction histories.  You may start from OINM table to check.
    Thanks,
    Gordon

  • Query for stocks on hand

    I would like to know if it is possible to create a query that would display the stocks of all items on a specific date and will display the item cost or the purchase price of each item in stock. Let say for example, today is January 14, 2010. I would like to check how many stocks in my inventory last January 8, 2010. Does anybody knows how to create this?
    Thank you.

    Hi Don Elicor,
    Check the below thread, you will be get some idea or Solution.
    Inventory Report by Query
    Query for Inventory Activity for whse & dates
    Item Stock Report
    Item Stock Report
    Regards,
    Madhan.

  • FIFO costing

    Hi forum,
    i am trying to build a Query/Crystal Report with costing on hand.
    In SAP how can i get or what table contains the cost of the on hand records.
    I am working with serialized items and i cannot get a correct value because the cost that i am getting (CalcPrice) is not the correct one; the cost i am getting is the cost when the item/serial was received.
    Now, the total valued is correct except that if i display/print the cost the total value doesn't balance correctly.
    Any suggestions?
    Regards,
    Manuel Roman

    Hi Manuel Roman,
    I could understand you requirement.  However, there is no easy answer.  Simply because, FIFO is calculated on the fly as it happens.  You do not have any power to recreate the historical event.  Further more, FIFO costing is on the item level, there is no way to calculate serial number level costs.
    All cost related transaction could be found in OINM tables.
    Thanks,
    Gordon

  • FIFO Costing issue

    Hello,
    How would I correct or adjust FIFO Costing? I thought that the basis of the FIFO costing is the posting date and not the system date.

    Hi Jaylord,
    As been mentioned by Gordon and Rohul, you could use Inventory Revaluation.
    However, as your question, FIFO calculation in any system should be based on system date / actual date. I don't think there is any system exist that capable calculate FIFO costing based on posting / document date, considering if any back-dated transaction occurred, system should re-calculate all FIFO cost for available stocks which received after those date, and add the possibility that some item already delivered, hence, system need to re-index all records in OINM table, it's all a big confusion and too convoluted.
    And believe me, accounting department won't like this idea even this kind of system exist. It's too much hassle to maintain the inventory ledger. Hope I don't misunderstood your question.
    Best Regards,
    Hendry Wijaya

  • Need guidance on Query for fine Tuning

    Hi ,
    Please help me on the below query while rewriting. Actually it is taking 2.56 sec to give 2.25 lacs records.
    I am trying to tune this query since 2 days,but not able to understand where to change & why it is taking that much time.
    Using : Oracle 10g version
    Tool : TOAD 8.6.1
    There are Indexes on every column used in Where clause but still some table scanning full.
    becoz of Inner Join it is taking much time, So Can anyone rewrite the below query for faster execution.
    SELECT workorder.fincode,
         workorder.istask,
         workorder.status,
    workorder.targstartdate,
         workorder.targcompdate,
         workorder.schedfinish,
    workorder.actfinish,
         workorder.estdur,
         workorder.wonum,
         workorder.mprn,
    workorder.sihousename AS wositehousename,
    workorder.sihouseno AS wositehouseno,
    workorder.sistreet AS wositestreet,
         workorder.sicounty AS wositecounty,
    workorder.siposttown AS wositeposttown,
    workorder.sipostcode AS wositepostcode,
         workorder.workorderid
    FROM (maximo.sr
    INNER JOIN
    (maximo.relatedrecord INNER JOIN maximo.workorder
    ON relatedrecord.relatedreckey =
    (CASE
    WHEN workorder.PARENT IS NOT NULL
    THEN workorder.PARENT
    ELSE workorder.wonum
    END
    AND relatedrecord.orgid = workorder.orgid
    AND relatedrecord.siteid = workorder.siteid
    AND relatedrecord.relatedrecclass = 'WORKORDER')
    ON sr.ticketid = relatedrecord.recordkey
    AND sr.orgid = relatedrecord.orgid
    AND sr.siteid = relatedrecord.siteid
    AND relatedrecord.CLASS = 'SR')
    LEFT JOIN
    frozen_quote@gqmfof
    ON sr.ticketid = customer_enquiry_ref AND sr.quotever = quote_version
    Explan Result:
    PLAN_TABLE_OUTPUT
    Plan hash value: 599875212
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Inst |IN-OUT|
    | 0 | SELECT STATEMENT | | 1569 | 272K| 3362 (1)| 00:00:41 | | |
    |* 1 | HASH JOIN | | 1569 | 272K| 3362 (1)| 00:00:41 | | |
    |* 2 | HASH JOIN RIGHT OUTER | | 1263 | 92199 | 417 (4)| 00:00:06 | | |
    | 3 | REMOTE | | 1 | 10 | 2 (0)| 00:00:01 | GQMFOF | R->S |
    | 4 | NESTED LOOPS | | 1263 | 79569 | 414 (3)| 00:00:05 | | |
    | 5 | MERGE JOIN CARTESIAN | | 3798 | 159K| 397 (3)| 00:00:05 | | |
    | 6 | VIEW | VW_NSO_1 | 1 | 14 | 3 (34)| 00:00:01 | | |
    | 7 | SORT UNIQUE | | 1 | 26 | 3 (34)| 00:00:01 | | |
    |* 8 | INDEX RANGE SCAN | SYNONYMDOM_NDX1 | 1 | 26 | 2 (0)| 00:00:01 | | |
    | 9 | BUFFER SORT | | 3798 | 107K| 397 (3)| 00:00:05 | | |
    |* 10 | TABLE ACCESS FULL | RELATEDRECORD | 3798 | 107K| 394 (3)| 00:00:05 | | |
    |* 11 | TABLE ACCESS BY INDEX ROWID| TICKET | 1 | 20 | 1 (0)| 00:00:01 | | |
    |* 12 | INDEX UNIQUE SCAN | TICKET_NDX1 | 1 | | 0 (0)| 00:00:01 | | |
    | 13 | TABLE ACCESS FULL | WORKORDER | 231K| 23M| 2943 (1)| 00:00:36 | | |
    Predicate Information (identified by operation id):
    1 - access("RELATEDRECORD"."RELATEDRECKEY"=CASE WHEN ("WORKORDER"."PARENT" IS NOT NULL) THEN
    "WORKORDER"."PARENT" ELSE "WORKORDER"."WONUM" END AND "RELATEDRECORD"."ORGID"="WORKORDER"."ORGID" AND
    "RELATEDRECORD"."SITEID"="WORKORDER"."SITEID")
    2 - access("TICKET"."QUOTEVER"="QUOTE_VERSION"(+) AND "TICKET"."TICKETID"="CUSTOMER_ENQUIRY_REF"(+))
    8 - access("DOMAINID"='TKCLASS' AND "MAXVALUE"='SR')
    10 - filter("RELATEDRECORD"."CLASS"='SR' AND "RELATEDRECORD"."RELATEDRECCLASS"='WORKORDER')
    11 - filter("TICKET"."ORGID"="RELATEDRECORD"."ORGID" AND "TICKET"."SITEID"="RELATEDRECORD"."SITEID")
    12 - access("CLASS"="$nso_col_1" AND "TICKET"."TICKETID"="RELATEDRECORD"."RECORDKEY")
    Regards,
    GR

    Add the NOCYCLE clause to your connect by statement CONNECT BY NOCYCLE PRIOR
    You also might want to add the organization ID into your join.

  • Query for Inventory Audit Report

    hi experts,
    I would like to create a inventory report  using Crystal Reports 2008 which looks exactly the same as Inventory Audit Report in SAP Business One 2007A
    Report requirement:
    List down all the items with its Item Code, Description, Quantity and Item Cost (easy right?)
    The only condition:
    I would like to filter my report by FromDate and ToDate.
    For example:
    Current date 15.07.2009
    If I run the report by putting in 01.01.2009 to 31.01.2009, the result will show me:
    item, with its respective info and most importantly the Quantity and Item Cost as at 31.01.2009 (similar to closing stock)
    Any query for above report?
    Please help.
    Thank you.

    Hi,
    It may not be so simple as you are trying to reproduce the historical value.  I believe you have to create a temporary table first.  Or you may use Command feather to get the required data in advance.
    Thanks,
    Gordon

  • Query for quotes not converted to Sales Orders

    Hello,
    I am relatively new to SAP B1 (little over a year now) and I am trying to build a query but I have no idea how to approach this one.
    I am trying to find Sales Quotes not converted to a Sales Order.  Sounds simple but here is where they start getting complicated.  I need to specify a date range (normally a year but could be quarterly).  Need to specify one or more items, groups, or vendors.  Need to display our cost for each item on the quote(s).
    Any help on this would be great.  I have used the query wizard in the past with some success but this one is getting way out of my comfort zone. 
    Many thanks to all who have contributed to these discussions.  It is nice knowing that I am not the only newbie around.
    Keith H

    Hi Keith.
    Following a little query for your request.
    Take note that query return only the ROWS of sales quote which are never converted in a sales order.
    It means that if you have a sales quote whit 1 rows and 1000 unit, and you convert the quote in a order for 500 unit, the quote is considered converted in a order and not displayed
    The cost is the price set in PRICE LIST 23 as you say in a your previous post.
    SELECT
    a.DocDate ,
    a.DocNum,
    a.CardCode,
    b.ItemCode,
    b.Quantity,
    d.ItmsGrpNam,
    b.Price as 'QUOTE_PRICE',
    e.Price as 'COST'
    FROM
    inner join QUT1 b on a.DocEntry = b.DocEntry
    inner join OITM c on b.ItemCode = c.ItemCode
    inner join OITB d on c.ItmsGrpCod = d.ItmsGrpCod
    inner join ITM1 e on b.itemcode = e.ItemCode
    where
    a.DocDate between [%0] and[%1]
    and b.TargetType <> '17'
    and b.ItemCode Like '%[%2]%'
    and e.PriceList = '23'
    EDIT:
    In your first post you say
    Need to specify one or more items, groups, or vendors.
    Please explain what you means for
    => one or more items
    in this point you can have some problem with the query manager...
    Hope that help
    --LUCA

  • Approval Query for AP Invoices Containing Budget Related GL Account

    Hi Experts,
    I would like to create a approval template for all AP invoices that include a GL account that is related to the budget. Can you please help me with the approval query?
    Thank you!
    Jane

    Hello Gordon Du,
    "B1 approval will only apply to document level. If you want to check line level, only the first line can be subjected to."
    I was thinking to trigger the approval process based on a document (AP invoice) containing relevant cost centres on a line by line basis as entered via one of the enabled dim fields.
    Writing a trigger query for each cost centre effected? This does not appear to be a good solution, what is a better direction. Is there another way? (PO are not yet used via SAPB1)
    Currently my invoices add, but do not trigger the approval process based on my attempts thus far.
    Can the originator manually choose an approval pathway?
    If this is against posting etiquette delete and advise.
    I am a relative newbie to SAP B1, so am happy to be pointed to relevant help files. I arrived via  google searching and arrived here.
    Thankyou.

  • How to Change Costing Methods Average Costing to FIFO Costing

    hi folks,
    i had requirement i.e i want to change from average costing to fifo costing in my current company?
    how can we change this?
    any solutions will be appreciated
    regards,
    sri

    Look at the default categories form to find the category that is is assigned for inventory.
    Then go to the category set and see what the level of control is. If it is master see if you can change it to organization. (If items are assigned you may not be able to).
    I think then you can change the attribute controls.

Maybe you are looking for