FIFO Query

Hi Everyone,
I have a customer who is requesting a query that would pull the sales price and item cost from the A/R Invoice table.  They would like a list of all items sold by customer that would show the quantity ordered, unit cost and unit price.  However, it's a bit complicated by the fact that they use FIFO valuation method. 
Does anybody know where I might be able to pull the different FIFO layers from?  I haven't been able to find a lot of documentation in regards to the FIFO valuation and I haven't been able to find many standard reports in SAP to track FIFO. 
If anybody can shed some light, I'd appreciate it.
Thanks,
Amanda

Hi Gordon,
Thank you for responding.  I contacted SAP and I was actually making it more difficult than it needed to be.  If you look at the Item Cost on the row level for the invoice, it will show you the cost in the FIFO layer it used at the time.  I was able to pull that field into the query and it worked. 
I appreciate your help and thank you again for responding!
Amanda

Similar Messages

  • FIFO Query to generate report Which relates the out-quantity to in-quantity

    Dear Experts,
    I am trying to generate a report to find out the Inward documents of Items which are issued or transfered. Items are managed with FIFO. Certain Items are serially managed and certain not.
    I am using the tables OIVL, OIVE and OIVQ for getting the details.
    Now my problem is in certain situations the relation between OIVE and OIVQ returns more line items than required and not able to specifically found out the rows. (Same TreeID is used for several transactions)
    Please help
    Thanks and regards
    Ajith Gopalakrishnan

    Hi,
    This Query help you a lot as I made this query for displaying the recieve and out quantity of an item as per the date i.e. On which date you recieve how much quantity of an item and how much quantity you release of an item. and please amend the remaining transtype from the transaction table (OINM).
    In case of FIFO you know that First IN First OUT is followed so you can easily see that which item on a particular date you recieve and which item on a particular date you release...and if any more further enhancement you required then please let me know ....if will definitely make out some time to help you out.
    select distinct SUM(InQty)as InQty,SUM(OutQty)as OutQty,ItemCode,Dscription,DocDate, TransType,
    case TransType
    when '-2' then 'opening Balance'
    when '20' then 'Goods Reciept PO '
    when '59' then 'Reciept From Production/Good Reciept '
    when '15' then 'Deliveries '
    end as 'TransName'
    from (
    select ItemCode,Dscription,DocDate, InQty,OutQty,TransType from oinm ) as OINM
    group by DocDate,ItemCode,TransType,Dscription order by  docdate asc
    Thanks
    Randy

  • How can i create Inventory FIFO (FIRST IN FISRT OUT ) stock query ?

    I want to create  Inventory FIFO query from this
    I have a receive item table to store the receive item (IN) and i have requisition table  (OUT).
    I want to create a FIFO query  order by
    receiveID , the output i expect is
    How can i do this ?

    declare @Stock table (Item char(3) not null,[Date] datetime not null,TxnType varchar(3) not null,Qty int not null,Price decimal(10,2) null,ReqNo varchar(4) null)
    insert into @Stock(Item ,  [Date] ,        TxnType, Qty,  Price , ReqNo) values
    ('ABC','20120401','IN',    200, 750.00 ,null),
    ('ABC','20120405','OUT',   100 ,null , 'R001'  ),
    ('ABC','20120410','IN',     50, 700.00 ,null),
    ('ABC','20120416','IN',     75, 800.00 ,null),
    ('ABC','20120425','OUT',   175, null  , 'R002' ),
    ('XYZ','20120402','IN',    150, 350.00 ,null),
    ('XYZ','20120408','OUT',   120 ,null  , 'R003' ),
    ('XYZ','20120412','OUT',    10 ,null  , 'R004' ),
    ('XYZ','20120424','IN',     90, 340.00 ,null);
    ;WITH  RunningTotals as (
    select A.Item , A.Qty , A.Price ,  A.Total , total - A.qty AS PrevTotal,  rn FROM (
    select 
    Item , qty , Price
    , SUM(Qty) over (PARTITION BY Item order by [Date] ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as total 
    ,ROW_NUMBER() OVER (PARTITION BY Item ORDER BY  [Date] ) as rn
    ,[Date]  
    from @Stock where TxnType = 'IN' )  A 
     )-- Select * from  RunningTotals    -- >> Sort FIFO by date
    , TotalOut as (
        select ReqNo , Item,SUM(Qty) as Qty  from @Stock where TxnType='OUT' group by Item , ReqNo
    ) Select * from TotalOut -- >> Item that out FIFO
    I want to get the price of any item in any ReqNo from RunningTotals by FIFO

  • FIFO in pl/sql query or procedure

    Hi,
    I have two tables:
    1)Table of recieved items
    create table receipts
    (item_id number(5),
    recieved_date date,
    recieved_quantity number,
    receipt_id number(5));
    insert into receipts(item_id, recieved_date, recieved_quantity, receipt_id)
    values(668, '29/12/10', 400, 441);
    insert into receipts(item_id, recieved_date, recieved_quantity, receipt_id)
    values(668, '29/12/10', 100, 442);
    insert into receipts(item_id, recieved_date, recieved_quantity, receipt_id)
    values(668, '03/02/11', 150, 444);2)Table of sold items
    create table deliveries
    (item_id number(5),
    delivered_date date,
    delivered_quantity number,
    delivery_id number(5));
    insert into deliveries(item_id, delivered_date, delivered_quantity, delivery_id)
    values(668, '01/02/11', 10, 1301);
    insert into deliveries(item_id, delivered_date, delivered_quantity, delivery_id)
    values(668, '02/02/11', 450, 1303);
    insert into deliveries(item_id, delivered_date, delivered_quantity, delivery_id)
    values(668, '08/02/11', 15, 1305);
    insert into deliveries(item_id, delivered_date, delivered_quantity, delivery_id)
    values(668, '09/02/11', 90, 1306);I need to track down from which batch goods are taken (for each delivery) using FIFO method.
    FIFO priorities are RECIEVED_DATE, RECEIPT_ID for INs and DELIVERED_DATE, DELIVERY_ID for OUTs.
    Desired output should be something like this:
    {noformat}
    ITEM_ID          DELIVERED_DATE  DELIVERED_QUANTITY      DELIVERY_ID     FROM_RECEIPT    STOCK_QUANTITY(*)
    668          01/02/11     10               1301          441          390
    668          02/02/11     390(**)               1303          441          0
    668          02/02/11     60(**)               1303          442          40
    668          08/02/11     15               1305          442          25
    668          09/02/11     25(**)               1306          442          0
    668          09/02/11     65(**)               1306          443          85
    {noformat}(*)Where STOCK_QUANTITY is the remaining quantity from that batch at the moment after according delivery amount deduction.
    (**)If the delivery gets the goods from different batches, the row should be split to display the amount taken from each batch.
    How can I make pl/sql query/procedure to track down this?
    Any help is very appreciated.
    DB version is: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
    Thank you,
    Nikita

    Hi, Nikita,
    Thanks for posting the CREATE TABLE and INSERT statements; that's very helpful.
    Use the analytic SUM functuion to get a running total of how much has been receeived and delivered to date. I did this in the sub-queries deliveries_rt and reciepts_rt:
    WITH     receipts_rt     AS
         SELECT     item_id
         ,     received_date
         ,     received_quantity
         ,     SUM (received_quantity) OVER ( PARTITION BY  item_id
                                        ORDER BY          received_date
                                    ,               receipt_id
                                  )      AS received_total
         ,     receipt_id
         FROM    receipts
    ,     deliveries_rt     AS
         SELECT     item_id
         ,     delivered_date
         ,     delivered_quantity
         ,     SUM (delivered_quantity) OVER ( PARTITION BY  item_id
                                         ORDER BY      delivered_date
                                     ,                delivery_id
                                  )      AS delivered_total
         ,     delivery_id
         FROM    deliveries
    SELECT       d.item_id
    ,       d.delivered_date
    ,       LEAST ( received_total  + delivered_quantity - delivered_total
                , delivered_total + received_quantity  - received_total
              , delivered_quantity    -- *****  See correction, below  *****
              )          AS delivered_quantity
    ,       d.delivery_id
    ,       r.receipt_id          AS from_receipt
    ,       GREATEST ( received_total - delivered_total
                   , 0
                 )          AS stock_quantity
    FROM       deliveries_rt     d
    JOIN       receipts_rt     r  ON     d.item_id        = r.item_id
                        AND     d.delivered_total  > r.received_total  - r.received_quantity
                      AND     r.received_total   > d.delivered_total - d.delivered_quantity
    ORDER BY  d.item_id
    ,            d.delivered_date
    ,       d.delivery_id
    ,            r.received_date
    ,       r.receipt_id
    ;What role does item_id play in this problem? I made a guess, but guessing isn't a very good way to solve problems.
    It may help to think of each row as having a low running total (or low_rt, the total quantity up to, but NOT including the current row) and a high running total (high_rt, the total qualntity up to AND including the current row). In the sub-queries above, I only computed the high_rt, since it's easy enough to get the low_rt from that by subtraction.
    Each row in the deliveries table will be joined to a row in the receipts table if the running totals overlap, that is, if the high_rt of each row is greaterr than the low_rt of the other.
    Delivered_quantity is the minimum of the high_rt from either table minus the low_rt of the other, but it can never be greater than the delivered_quantity.
    Edited by: Frank Kulash on Mar 3, 2011 10:06 AM
    Brief explanation added.
    Edited by: Frank Kulash on Apr 23, 2013 12:56 PM
    <H3>Correction</H3>
    The computation of delivered_quantity in the main query should have 1 more argument to LEAST, like this:
    ,       LEAST ( r.received_total  + d.delivered_quantity - d.delivered_total
                , d.delivered_total + r.received_quantity  - r.received_total
              , d.delivered_quantity
              , r.received_quantity               -- ***  Added  ***
              )          AS delivered_quantityThanks to Jean Marie Delhaze ( {message:id=10980754} below) for finding and correcting my mistake.

  • Available Batch Quantity query in FIFO System

    Hi All ,
    I need a query which returns :
    Available Batch, with Available Quantity warehouse wise in the FIFO System.
    Thanks in Advance
    Ashish Ranjan

    Hi Ashish........
    Try this......
    SELECT Distinct T0.[ItemCode], T0.[BatchNum], T0.[WhsCode],T0.[Quantity], 
    T0.[InDate], T0.[Located], T0.[ExpDate], T0.[PrdDate], T0.[Direction] FROM OIBT T0
    Where T0.WhsCode='[%0]'
    Order By T0.[InDate]
    Regards,
    Rahul

  • 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

  • Query for a list of FIFO layers with quantity and FIFO cost

    Hi,
    Is there a report/ query where I could get something as follows:
    ItemCode1 - Open FIFO Layer1 - Quantity 1 - Open FIFO Layer1 Cost - Open FIFO Layer1 Inventory Value
    ItemCode1 - Open FIFO Layer2 - Quantity 2 - Open FIFO Layer2 Cost - Open FIFO Layer2 Inventory Value
    ItemCode1 - Open FIFO Layer3 - Quantity 3 - Open FIFO Layer3 Cost - Open FIFO Layer3 Inventory Value
    The total quantity and the total value of this would match the total quantity and total value of the Inventory Audit Report.
    I know OINM table has all detailed transactions, but I find it difficult to get what I want from OINM.
    Thanks,
    Ajay Audich

    Hi Ajay.....
    Please do refer Inventory Valuation Simulation Report for FIFO Method. It gives you the details as you required........
    Regards,
    Rahul

  • Some body please help about the Inventory FIFO (FIRST IN FISRT OUT ) query is very slow

    I have table ''tran_stock''  to store a transaction (IN-OUT) of the stock. 
    The problem is when the  transaction rows are more than 50000 the query to get the balance
    stock (Total 'IN' - Total'Out' by FIFO) is very slow . Somebody please suggest me to do this.
    This is my query
    ;WITH OrderedIn as (
        select *,ROW_NUMBER() OVER (PARTITION BY Stock_ID ORDER BY TranDate) as rn
        from Tran_Stock
        where TxnType = 'IN'  
    ), RunningTotals as (
        select  Stock_ID ,Qty,Price,Qty as Total,Cast(0 as decimal(10,2)) as PrevTotal ,  trandate , rn  from OrderedIn where rn = 1
        union all
        select  rt.Stock_ID,oi.Qty,oi.Price,Cast(rt.Total + oi.Qty as decimal(10,2)),Cast(rt.Total as decimal(10,2)) , oi.TranDate ,oi.rn 
        from
            RunningTotals rt
                inner join
            OrderedIn oi
                on
                    rt.Stock_ID = oi.Stock_ID and
                    rt.rn = oi.rn - 1
    , TotalOut as (
    select Stock_ID ,SUM(Qty) as Qty from Tran_Stock where TxnType='OUT'   group by Stock_ID
    ) ,  GrandTotal as 
    select
         rt.Stock_ID , rt.QTY AS original ,SUM(CASE WHEN PrevTotal > isNULL(out.Qty, 0) THEN rt.Qty ELSE rt.Total - isNULL(out.Qty, 0) END) AS QTY , Price , SUM(CASE WHEN PrevTotal > isNULL(out.Qty, 0) THEN rt.Qty ELSE rt.Total - isNULL(out.Qty,
    0) END * Price) AS Ending , rt.TranDate
    from
        RunningTotals rt
            LEFT join
        TotalOut out
            on
                rt.Stock_ID = out.Stock_ID
    where rt.Total > isNull(out.Qty , 0)
    group by rt.Stock_ID , Price , rt.TranDate  , rt.QTY
    ) SELECT * FROM  GrandTotal  order by TranDate  option (maxrecursion 0)
    AND  this is my Table with some example data
    USE [TestInventory]
    GO
    /****** Object:  Table [dbo].[Tran_Stock]    Script Date: 12/15/2014 3:55:56 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[Tran_Stock](
    [TranID] [int] IDENTITY(1,1) NOT NULL,
    [Stock_ID] [int] NULL,
    [TranDate] [date] NULL,
    [TxnType] [nvarchar](3) NULL,
    [Qty] [decimal](10, 2) NULL,
    [Price] [decimal](10, 2) NULL
    ) ON [PRIMARY]
    GO
    SET IDENTITY_INSERT [dbo].[Tran_Stock] ON 
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (1, 1, CAST(0x81350B00 AS Date), N'IN', CAST(200.00 AS Decimal(10, 2)), CAST(750.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (2, 1, CAST(0x85350B00 AS Date), N'OUT', CAST(100.00 AS Decimal(10, 2)), NULL)
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (3, 1, CAST(0x8A350B00 AS Date), N'IN', CAST(50.00 AS Decimal(10, 2)), CAST(700.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (4, 1, CAST(0x90350B00 AS Date), N'IN', CAST(75.00 AS Decimal(10, 2)), CAST(800.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (5, 1, CAST(0x99350B00 AS Date), N'OUT', CAST(175.00 AS Decimal(10, 2)), NULL)
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (6, 2, CAST(0x82350B00 AS Date), N'IN', CAST(150.00 AS Decimal(10, 2)), CAST(350.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (7, 2, CAST(0x88350B00 AS Date), N'OUT', CAST(40.00 AS Decimal(10, 2)), NULL)
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (8, 2, CAST(0x8C350B00 AS Date), N'OUT', CAST(10.00 AS Decimal(10, 2)), NULL)
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (9, 2, CAST(0x98350B00 AS Date), N'IN', CAST(90.00 AS Decimal(10, 2)), CAST(340.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (12, 2, CAST(0x98350B00 AS Date), N'IN', CAST(10.00 AS Decimal(10, 2)), CAST(341.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (13, 2, CAST(0x99350B00 AS Date), N'OUT', CAST(30.00 AS Decimal(10, 2)), NULL)
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (14, 2, CAST(0x81350B00 AS Date), N'IN', CAST(120.00 AS Decimal(10, 2)), CAST(350.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (15, 2, CAST(0x89350B00 AS Date), N'OUT', CAST(90.00 AS Decimal(10, 2)), NULL)
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (17, 3, CAST(0x89350B00 AS Date), N'IN', CAST(90.00 AS Decimal(10, 2)), CAST(350.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (18, 3, CAST(0x8A350B00 AS Date), N'OUT', CAST(60.00 AS Decimal(10, 2)), NULL)
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (19, 3, CAST(0x5D390B00 AS Date), N'OUT', CAST(20.00 AS Decimal(10, 2)), NULL)
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (20, 1, CAST(0x81350B00 AS Date), N'IN', CAST(200.00 AS Decimal(10, 2)), CAST(750.00 AS Decimal(10, 2)))
    INSERT [dbo].[Tran_Stock] ([TranID], [Stock_ID], [TranDate], [TxnType], [Qty], [Price]) VALUES (21, 1, CAST(0x85350B00 AS Date), N'OUT', CAST(100.00 AS Decimal(10, 2)), NULL)

    Hi,
    You dont have any Index on the table, so the filters (where part in the queries) and the sorting (order by, group by) make your query slow. it take time to sort or filter data without Index. It is like reading a book with 3k pages and trying to find a specific
    subject. You have to read the all books, but if you have "table of contents" which is the book index, then this can be done fast.
    * check the Execution plan (the image here show part of your query's execution plan). the query scan the all table 3 times...
    there is one sort that use 81% of the query resources... I will go sleep soon (it is
    23:58 In Israel now), and I don't know if I will have time to read the query itself and improved it, so lets start with indexes :-) 
    ** as a first step after or before you create the right Indexes you should remove the recursive all together. there is no reason for lopping the data when you can use it as a SET. This is where the relational database's power come to life :-)
    for example check this code. I only use your first part of the code using the first 2 CTE tables. compare result.
    ;WITH
    OrderedIn as (
    select *,ROW_NUMBER() OVER (PARTITION BY Stock_ID ORDER BY TranDate) as rn
    from Tran_Stock
    where TxnType = 'IN'
    , RunningTotals as (
    select Stock_ID ,Qty, Price, Qty as Total, Cast(0 as decimal(10,2)) as PrevTotal, trandate , rn
    from OrderedIn where rn = 1
    union all
    select
    rt.Stock_ID, oi.Qty, oi.Price, Cast(rt.Total + oi.Qty as decimal(10,2))
    ,Cast(rt.Total as decimal(10,2))
    , oi.TranDate ,oi.rn
    from RunningTotals rt
    inner join OrderedIn oi on rt.Stock_ID = oi.Stock_ID and rt.rn = oi.rn - 1
    select * from RunningTotals
    -- This will do the same as the above query
    select
    Stock_ID, Qty, Price
    , SUM(Qty) over (PARTITION BY Stock_ID order by TranDate ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as Total
    ,TranDate--,TranID, TxnType
    from Tran_Stock
    where TxnType = 'IN'
    order by Stock_ID
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Fifo method inventory valuation sql query.

    Dear all,
    I want to stock valuation by FIFO method. if some one have any solution please give me advise.
    thanks

    You won't get any answers with a question like that...
    What is "to stock valuation by FIFO method"?
    Give us an example.

  • Query related Internal buffer storage in PXi 7965R DMA FIFO ?

    Hello,
    I am establishing a communcation from HOST to FPGA by using DMA-FIFO. Maximum size for this FIFO is 1024. Now from the host side, I am writing a data of 1-D array (Unsinged 64bit integer) into the fifo, and from FPGA side, this data is being read from the fifo. Now as i  start the simluation, the default value of "Empty elements remaining" shows "10,000". further as the elements inside the fifo starts getting to read (at FPGA side), the "Number of elements to read" increases and when it reaches the value of 1024, then the "empty elements remaining" starts decreasing. The behaviour is described in the image (atteached).
    while observing this behaviour of the FIFO, i discovered that this DMA FIFO, (having max. storage elements of 1024) also has an (additional) internal storage space of 10,000 elements. I might call it as internal buffer of this FIFO. now my question here is that, where are these (10,000 elements) values stored ?. as it is from HOST side, so is it the CPU storage ? or what ?
    Thanks
    Anum Sheraz

    ok so I got my answer, its actually the default depth of the DMA FIFO. 
    Maximum size of this FIFO is set to be 1023, which is coerced to a value of 1029. I did a mistake in the picture (posted in last msg), Here is the correct one; 
    I've corrected the some of the figures. by noticing its behaviour, when the number of elements to read reaches 1027, then the remaining elementes starts decreasing from value of 10,000. and it reaches to max value of 11027 when remaining elements=0. I am confused with this figure "1027" !!! . why is this 1027 ? 
    as I have assigned maximum size of this FIFO to be 1023, which is coerced to a value of 1029, so Shouldn't it be 1029 ?.  

  • FIFO based pricing issue on sales orders!

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

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

  • Closing Stock Query

    Hi Members,
    We Want a report for closing stock according to the following parameters,
    1-Date from
    2-Date to
    3-Warehouse
    4-Document Series
    Query Report should contain with,
    Item Code - Item Description - Inventory UOM - Quantity - Item cost(FIFO Value) - Value
    (Inventory Audit Report can not use with document Series)
    Thank You
    Saman

    Hi Rahul,
    thank you for reply. You are correct. but in our company we use only 10 document series. under this 10 series all type of
    documents are available . so when we select a one series it is containing all of SAP B1 document type.
    Example-
    Series A- (Delivery , GRN, Return, A/P invoice,A/R Invoice, Payment .....ect) 
    Series B- (Delivery , GRN, Return, A/P invoice,A/R Invoice, Payment .....ect)
    Series C- (Delivery , GRN, Return, A/P invoice,A/R Invoice, Paymet .....ect)
    So Results of this Query  will be a meaning full One.
    Can You Suggest a Query for my requirement. I Hope Your Idea.
    Saman

  • FIFO Underruns in newer versions of Linux using the Ivy Bridge cpus

    I have been getting consistent results from my Lenovo Z580 where an error will apear when upgrading to a newer version of linux past 3.15.8. More specifically a "[drm:cpt_serr_int_handler] *ERROR* PCH transcoder A FIFO underrun".  This also includes transcoder B.
    I found the bug report https://bugs.archlinux.org/task/40952?p … sort2=desc  which near to the bottom of the page someone has stated building the kernel from git fixes the issue. There was aslo some reports on updating the bios to solve the issue but on the bios I have is current based on the lenovo support site http://support.lenovo.com/us/en/product … s/DS100928.
    lscpu info:
    Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    CPU(s): 4
    On-line CPU(s) list: 0-3
    Thread(s) per core: 2
    Core(s) per socket: 2
    Socket(s): 1
    NUMA node(s): 1
    Vendor ID: GenuineIntel
    CPU family: 6
    Model: 58
    Model name: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
    Stepping: 9
    CPU MHz: 1210.253
    CPU max MHz: 3100.0000
    CPU min MHz: 1200.0000
    BogoMIPS: 4990.71
    Virtualization: VT-x
    L1d cache: 32K
    L1i cache: 32K
    L2 cache: 256K
    L3 cache: 3072K
    NUMA node0 CPU(s): 0-3
    lspci info
    00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
    00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
    00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
    00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
    00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
    00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
    00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
    00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
    00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
    00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
    00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
    00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)
    03:00.0 Network controller: Intel Corporation Centrino Wireless-N 2200 (rev c4)
    lsmod info
    Module Size Used by
    fuse 84249 3
    ctr 3927 2
    ccm 8278 2
    xt_tcpudp 3207 3
    ipt_MASQUERADE 2250 1
    ip6t_rpfilter 1740 1
    ip6t_REJECT 3980 18
    ipt_REJECT 2505 20
    xt_conntrack 3425 7
    ebtable_nat 1916 0
    ebtable_filter 1927 0
    ebtable_broute 1493 0
    bridge 100134 1 ebtable_broute
    stp 1653 1 bridge
    llc 3729 2 stp,bridge
    ebtables 24586 3 ebtable_broute,ebtable_nat,ebtable_filter
    ip6table_raw 1352 1
    ip6table_mangle 1620 1
    ip6table_filter 1556 1
    ip6table_security 1372 1
    ip6table_nat 3585 1
    nf_conntrack_ipv6 9661 5
    nf_defrag_ipv6 26126 1 nf_conntrack_ipv6
    nf_nat_ipv6 3736 1 ip6table_nat
    ip6_tables 17729 5 ip6table_filter,ip6table_mangle,ip6table_security,ip6table_nat,ip6table_raw
    iptable_raw 1348 1
    iptable_mangle 1616 1
    iptable_filter 1552 1
    iptable_security 1368 1
    iptable_nat 3454 1
    nf_conntrack_ipv4 9474 4
    nf_defrag_ipv4 1499 1 nf_conntrack_ipv4
    nf_nat_ipv4 3728 1 iptable_nat
    nf_nat 13368 5 ipt_MASQUERADE,nf_nat_ipv4,nf_nat_ipv6,ip6table_nat,iptable_nat
    nf_conntrack 80172 9 ipt_MASQUERADE,nf_nat,nf_nat_ipv4,nf_nat_ipv6,xt_conntrack,ip6table_nat,iptable_nat,nf_conntrack_ipv4,nf_conntrack_ipv6
    ip_tables 18115 5 iptable_security,iptable_filter,iptable_mangle,iptable_nat,iptable_raw
    x_tables 17344 17 iptable_security,ip6table_filter,ip6table_mangle,ip6t_rpfilter,ip_tables,xt_tcpudp,ipt_MASQUERADE,ip6table_security,xt_conntrack,iptable_filter,ip6table_raw,ebtables,ipt_REJECT,iptable_mangle,ip6_tables,iptable_raw,ip6t_REJECT
    uvcvideo 74983 0
    videobuf2_vmalloc 3368 1 uvcvideo
    videobuf2_memops 2239 1 videobuf2_vmalloc
    videobuf2_core 30407 1 uvcvideo
    arc4 2064 2
    videodev 123032 2 uvcvideo,videobuf2_core
    coretemp 6388 0
    rts5139 313272 0
    iwldvm 170735 0
    media 12611 2 uvcvideo,videodev
    hwmon 3346 1 coretemp
    joydev 10367 0
    mousedev 10912 0
    snd_hda_codec_hdmi 40396 1
    led_class 3611 1 iwldvm
    intel_rapl 12460 0
    x86_pkg_temp_thermal 7311 0
    mac80211 495361 1 iwldvm
    intel_powerclamp 9442 0
    kvm_intel 135528 0
    snd_hda_codec_realtek 54803 1
    snd_hda_codec_generic 56366 1 snd_hda_codec_realtek
    snd_hda_intel 22831 4
    snd_hda_controller 22975 1 snd_hda_intel
    snd_hda_codec 104665 5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
    kvm 408583 1 kvm_intel
    iTCO_wdt 5663 0
    psmouse 94918 0
    iTCO_vendor_support 1929 1 iTCO_wdt
    pcspkr 2059 0
    microcode 17157 0
    serio_raw 5073 0
    snd_hwdep 6652 1 snd_hda_codec
    evdev 11784 14
    snd_pcm 83207 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
    ideapad_laptop 10439 0
    ac 3595 0
    thermal 9103 0
    sparse_keymap 3242 1 ideapad_laptop
    battery 7885 0
    iwlwifi 148746 1 iwldvm
    r8169 59191 0
    mii 4251 1 r8169
    cfg80211 437959 3 iwlwifi,mac80211,iwldvm
    snd_timer 19294 1 snd_pcm
    snd 61276 16 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
    wmi 8539 0
    rfkill 15971 3 cfg80211,ideapad_laptop
    shpchp 25706 0
    mei_me 10096 0
    mei 66784 1 mei_me
    lpc_ich 14008 0
    mac_hid 3273 0
    soundcore 5551 2 snd,snd_hda_codec
    i2c_i801 11364 0
    processor 25153 0
    ext4 494420 2
    crc16 1359 1 ext4
    mbcache 9155 1 ext4
    jbd2 82948 1 ext4
    algif_skcipher 6387 0
    af_alg 5020 1 algif_skcipher
    dm_crypt 17527 1
    dm_mod 85258 3 dm_crypt
    sr_mod 15026 0
    cdrom 35191 1 sr_mod
    sd_mod 37554 3
    crc_t10dif 1135 1 sd_mod
    atkbd 17006 0
    libps2 4571 2 atkbd,psmouse
    crct10dif_pclmul 4714 1
    crct10dif_common 1436 2 crct10dif_pclmul,crc_t10dif
    crc32_pclmul 2955 0
    crc32c_intel 14217 0
    ghash_clmulni_intel 4362 0
    xhci_hcd 149286 0
    aesni_intel 144871 6
    aes_x86_64 7463 1 aesni_intel
    lrw 3821 1 aesni_intel
    gf128mul 6018 1 lrw
    glue_helper 4737 1 aesni_intel
    ahci 24299 2
    ablk_helper 2100 1 aesni_intel
    cryptd 8537 4 ghash_clmulni_intel,aesni_intel,ablk_helper
    libahci 21772 1 ahci
    libata 174153 2 ahci,libahci
    ehci_pci 4152 0
    ehci_hcd 64619 1 ehci_pci
    scsi_mod 138333 4 rts5139,libata,sd_mod,sr_mod
    usbcore 188509 5 uvcvideo,rts5139,ehci_hcd,ehci_pci,xhci_hcd
    usb_common 1712 1 usbcore
    i8042 13666 2 libps2,ideapad_laptop
    serio 11018 9 serio_raw,atkbd,i8042,psmouse
    i915 797177 2
    video 12057 1 i915
    button 4765 1 i915
    intel_gtt 12856 1 i915
    i2c_algo_bit 5480 1 i915
    drm_kms_helper 39643 1 i915
    drm 244846 4 i915,drm_kms_helper
    i2c_core 41648 6 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,videodev
    journalctl of a previous attempt
    Aug 15 11:11:23 jdlptp kernel: [drm] Initialized drm 1.1.0 20060810
    Aug 15 11:11:23 jdlptp kernel: input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
    Aug 15 11:11:23 jdlptp kernel: ACPI: Lid Switch [LID0]
    Aug 15 11:11:23 jdlptp kernel: input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1
    Aug 15 11:11:23 jdlptp kernel: ACPI: Sleep Button [SLPB]
    Aug 15 11:11:23 jdlptp kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input2
    Aug 15 11:11:23 jdlptp kernel: ACPI: Power Button [PWRB]
    Aug 15 11:11:23 jdlptp kernel: input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
    Aug 15 11:11:23 jdlptp kernel: ACPI: Power Button [PWRF]
    Aug 15 11:11:23 jdlptp kernel: [drm] Memory usable by graphics device = 2048M
    Aug 15 11:11:23 jdlptp kernel: checking generic (e0000000 410000) vs hw (e0000000 10000000)
    Aug 15 11:11:23 jdlptp kernel: fb: switching to inteldrmfb from VESA VGA
    Aug 15 11:11:23 jdlptp kernel: Console: switching to colour dummy device 80x25
    Aug 15 11:11:23 jdlptp kernel: i915 0000:00:02.0: irq 40 for MSI/MSI-X
    Aug 15 11:11:23 jdlptp kernel: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    Aug 15 11:11:23 jdlptp kernel: [drm] Driver supports precise vblank timestamp query.
    Aug 15 11:11:23 jdlptp kernel: vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
    Aug 15 11:11:23 jdlptp kernel: fbcon: inteldrmfb (fb0) is primary device
    Aug 15 11:11:23 jdlptp kernel: [drm:cpt_serr_int_handler] *ERROR* PCH transcoder A FIFO underrun
    I've tested all the kernels > 3.15.8  but they seem to create the error above. My questions are
    Was there a change in the linux kernel options from 3.15.8?
    Am I using / missing a module that I shouldn't / should be using for my cpu?
    Last edited by acothi (2014-10-06 02:49:39)

    Hi acothi,
    I was getting the same error message for months. Linux kernel 3.16.3-1 finally fixed it for me. My system: Intel Ivy-Bridge i5-3570K CPU + Intel DH77DF Mobo with latest BIOS (dated 2013). Please update to latest kernel in [Core] and report back. However, I don't think that your SD card slot issues are directly related to this error message. I also recommend installing linux-lts kernel and adding a bootloader entry, so you can still be productive, even if the latest Linux kernel doesn't fix it for you.
    Afaik, this error has nothing to do with kernel options, but was introduced by a usual kernel commit (and seems to be fixed upstream).
    Cheers,
    Tolga
    Last edited by tolga9009 (2014-10-06 16:47:02)

  • FIFO - Goods Issue to Purchase relation

    Hello Experts,
    My client maintains the Inventory in FIFO model.
    They wants to know the corresponding purchase (GR PO/Invoice) of the Item issued (delivery/transfer) from a wharehouse. From whare I can generate this info? If any one is having a query to generate this info please share
    Thanks and regards
    Ajith G

    Hi,
    Check below link tooo
    Query for a list of FIFO layers with quantity and FIFO cost
    Thanks
    Deepak Tyagi

  • Query operation in file adapter

    Dear All,
    we have faced several issues in using polling for production env.
    We have to ensure sequential nature of data, which means FIFO order of inserts
    is there any alternative to using polling - Receive in file adapter ?
    Can we use {query database adapter  - invoke activity } in file adapter ?
    Please let me know if any body as any leads.
    Appreciate your response.
    Regards
    Arc

    we cant use Invoke activity for Read functionality for File Adapter but there is another way to achive this we can use two recieve activities in one BPEL please find the Sample here $BPEL_HOME\samples\tutorials\109.CorrelationSets
    Krishna

Maybe you are looking for

  • Can't adjust the default time scale when creating a new appointment in Outlook 2010

    Good Afternoon, I have found a question on these community boards that propose an issue that I am currently experiencing. The answer; however, was not the solution for me. I used the same name as the original post and will add the original text as it

  • How to make wild card search for a file using utl_file

    Hi Everyone, I want to write to a table from flat file.im using 9i release 2. can i perform filename* (wildcard) search n write to the matching files. Regards Manish

  • Exchange server 2010 exchange server 2013 sp1 2 servers one domain

    Scenario : Existing Server - Small Business Server 2011 with exchange 2010 \ Additional server on domain server 2012 r2 with exchange 2013 sp1 \ exchange 2013 sp1 installed on the second server but the exchange toolbox snap in fails, EAC login creden

  • Possible update problem with renderer

    I'm using a renderer to update a table where I present mails polled from a mailserver. If there's only one new mail to get from the server there's no problem, but if I get more than one mail when I do the check the table looses information on the mai

  • Before Updating to 8.1

    I see the new update 8.1 is available. I have 8.0.2 (20) presently. 1) What would be a good backup procedure to do before I try it ? (just in case) my guess is, copy User/Music/iTunes folder to another disk or Volume ? 2) I have an external FW backup