Item price - History

Hi,
I want the history of prices of items changed date, I checked AIT1 table which maintains price history but on which date the price is changed is not available. Is there any other table or how to find on which date the price is changed in history ?
Thanks

Try this man,
declare @price dec(19,6)
declare @prprice dec(19,6)
declare @dat datetime
declare @prdat datetime
declare @item char(20)
declare @pritem char(20)
Create Table #w
(dat datetime,mind datetime,maxd datetime,
  item char(20),pr dec(19,6))
Insert into #W
SELECT T0.[DocDate],T0.[DocDate],T0.[DocDate],
T1.[ItemCode],
T1.[Price]
FROM OPCH T0  INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
Where T0.DocType='I'
ORDER BY T1.[ItemCode], T0.[DocDate],T1.[Price]
Declare cu cursor for
Select item,dat,pr from #W
  for update
Open cu
Fetch next from cu into @pritem,@prdat,@prprice
Fetch next from cu into @item,@dat,@price
While @@FETCH_STATUS = 0
Begin
If @pritem=@item and @prprice=@price
Update #W
    set mind=@Prdat
   where current of cu
else
begin      set @Pritem=@item
     set @prdat=@dat
     set @Prprice=@price
end
Fetch next from cu into @item,@dat,@price
End
deallocate cu
select item Item,pr Price,mind 'From',max(maxd) 'To' from #w
group by item,mind,pr
drop table #w
Regards
Deepak Tyagi

Similar Messages

  • Modules for recommending new catalog item price

    Hi,
    we have catalog item price history, we have customer purchase history, which module(s) can/should we use to price a new product?
    Thanks
    hyang

    Hi, hyang,
    I think you might want to think about a metric you want to optimize, such as the monthly/weekly revenue of this new product, or number of items sold per month/week, while taking the price as an important factor. Then, from the historical sale history, you
    can train a model and see how price is impacting the metric. The model might give you some insight of the relationship between the price and the metric. 
    Alternatively, if you do want to directly determine the price, you can build a regression model, where the target is the price, the variables might include features of products, how long this product has been on market, the demand of this product, whether
    it is seasonal, holiday related product, etc. 
    Hope at least it can give you some hint at least.
    Thanks.
    Hang

  • Price history for any item-supplier combination

    Can I maintain a price history for any item-supplier combination, so that it defaults while I prepare a RFQ or enter a quotation in the system? If yes, where can I do this?If no, is there any workaround?

    I did not get your question
    i am assuming that you want to maintain a price history, say for ITEM A from supplier ABC
    and you want the price tod efault..which price to default from the history as there will be a list??
    You can use supplier item catalog to view pricing hsitory

  • Purchase Price History Report/ OM Price report

    Oracle Gurus,
    Can I maintain a price history for any item-supplier combination, so that it defaults while I prepare a RFQ or enter a quotation in the system? If yes, where can I do this?If no, is there any workaround?
    In future based purchase price history report, will send RFQ to supplier?
    Pleae advise, where we have this option in application.
    Thanks
    AK

    Me1p give u details ie.
    1) A material Purchased at what Price - You can see Price details with Purchase Order wise.
    2) From a Vendor you have purchased which material @ what price
    By using me23n what Price history you want to see.

  • Price history of Text material

    Hi All,
    I need a report for Price history of PO for the text material. Text material includes Asset, cosumable items etc. I have tried by using me1p but coud not get the result. please let me know the correct way to get that...
    Looking forward for your fruitful solution.
    thanks,
    mx

    Hi,
    As ME1P stores prices per inforecord, so to get the price history for the text material you
    have to maintain an info record per material group. You create an info record material group wise
    in ME11 t-code. In ME11 give the vendor number, plant and purchase organisation number and keep the
    Material field blank. Then in the next screen, you  maintian your material group and then
    in the purchasing data screen maintain the price.
    Then create a PO with this combination and the same will be updated in ME1P. You can also
    refer table EKBE.
    Thanks,
    Atal

  • Price History

    Hi,
    In PO Price History (Tx Me1P) system is showing all the items including deletion flag items also but we dont want to compare with deletion flag items hence how to get this?
    we have to use z report na?
    Thanks
    Prasad

    Hi Prasad
    Yes u r correct, it will show the price of the deleted entries also. I think for ur requirement u have to avoid the deleted entries for ur z report.
    Thanks
    Ravi

  • Last Purchase Price History

    Dear All,
    Is there any way we can have the Last Purchase Price History in SAP system?
    Our customer has 2 stock transfer. In those 2 documents, she has 2 difference last purchase price on the document. But actually, she didn't issue any GRPO of that item during the period between the 2 stock transfer. So the last purchase price should be the same. How can I find out all the document during that period which may affect the last purchase price in the system? Thanks a lot.

    When you enter an incoming invoice # see Purchasing
    PO - No
    When you enter a goods receipt # see Goods Receipt
    Goods Receipt: No
    When you enter a positive opening balance for an item # see Inventory and Stock Postings
    Not sure what. But they don't have opening balance for the items last month
    When you enter a positive inventory result that triggers a goods receipt # see Inventory and Stock Postings
    Not sure what?
    When a product with a BOM is manufactured, where the price of the product is calculated from the last purchase prices of the components # see Production.
    The item is not BOM
    When Landed Costs are performed. (Note: When adding AP invoice after landed costs was created, the last purchase price will remain unchanged)
    No landed cost for that item

  • Previous price history while releasing new PO

    hii Experts
    is it possible that system show previous price history of any item  while releasing new Po of that  items.
    ashwani tripathi

    in me28 u can not see..
    u have to creat another session with me1p
    here u can see records after a date also..
    this is the only option in Std.  SAP.

  • PO Price History Report

    Hello.  I'm trying to develop a PO Price History Report for our compnay  based on ME1P. This is the format I want my report to look something like this:
    h5Material Code    Mat.Description   Vendor Code   Vendor Descrip.    Qty    Price/ea   PO Number    Date
         1111111111     abcaba                 11111               abc abc abc          1      KWD 195  1010001002   21/05/2010
                                                               11111               abc abc abc          2     KWD 196  1010001003   21/04/2010
                                                                                    21111               bcd bcd bcd          1      KWD 195  1010001006  21/05/2010
    Total Qty:
         2222222222    xyz xyz                  11111               abc abc abc          1      KWD 195  1010001002   21/05/2010
                                                               11111               abc abc abc          2     KWD 196  1010001003   21/04/2010
                                                                                    21111               bcd bcd bcd          1      KWD 195  1010001006  21/05/2010
    Total Qty:
    This is the coding I've done so far:
    REPORT  Z_MM_POHISTORY.
    TABLES: EKPO, EKKO, LFA1, MAKT.
    TYPES : BEGIN OF tw_ekpo.
            INCLUDE STRUCTURE EKPO.
    TYPES : END OF tw_ekpo.
    types : BEGIN OF tw_ekko.
            INCLUDE STRUCTURE EKKO.
    types : END OF tw_ekko.
    TYPES : BEGIN OF tw_LFA1.
            INCLUDE STRUCTURE LFA1.
    TYPES : END OF tw_LFA1.
    types : BEGIN OF tw_MAKT.
            INCLUDE STRUCTURE MAKT.
    types : END OF tw_MAKT.
    types : tt_ekpo type STANDARD TABLE OF tw_ekpo, tt_LFA1 type STANDARD TABLE OF tw_LFA1, tt_MAKT type STANDARD TABLE OF tw_MAKT,
            tt_ekko type STANDARD TABLE OF tw_ekko.
    data : lt_ekpo type tt_ekpo, t_LFA1 type tt_LFA1, t_MAKT type tt_MAKT,
           lt_ekko type tt_ekko.
    data :  begin of lt_mix OCCURS 0,
            bedat type ekko-bedat,
            matnr type ekpo-matnr,
            werks type ekpo-werks,
            lgort type ekpo-lgort,
            EBELN type ekpo-EBELN,
            menge type ekpo-menge,
            BUKRS type ekKO-BUKRS,
            EKORG type ekKo-EKORG,
            NETPR type ekPO-NETPR,
            STATUS type ekpo-STATUS,
            LIFNR type ekKo-LIFNR,
            Name1 type LFA1-Name1,
            MAKTX TYPE MAKT-MAKTX,
            SPRAS TYPE MAKT-SPRAS,
            end of lt_mix.
    data : begin of lt_final OCCURS 0,
            bedat type ekko-bedat,
            matnr type ekpo-matnr,
            werks type ekpo-werks,
            lgort type ekpo-lgort,
            EBELN type ekpo-EBELN,
            menge type ekpo-menge,
            BUKRS type ekKO-BUKRS,
            EKORG type ekKo-EKORG,
            NETPR type ekPO-NETPR,
            STATUS type ekpo-STATUS,
            LIFNR type ekKo-LIFNR,
            Name1 type LFA1-Name1,
            MAKTX TYPE MAKT-MAKTX,
            SPRAS TYPE MAKT-SPRAS,
            end of lt_final.
    selection-SCREEN : BEGIN OF BLOCK blk01 WITH FRAME TITLE text-001.
    select-options : P_ORG FOR EKKO-EKORG, C_CODE FOR EKKO-BUKRS OBLIGATORY, PLANT for ekpo-werks, MATNR for ekpo-matnr,
                     PDOC_NO FOR EKKO-EBELN, PDOCDATE FOR EKKO-BEDAT OBLIGATORY, STATUS FOR EKPO-STATUS, LANG FOR MAKT-SPRAS,
                     VENDOR for ekKO-LIFNR.
    selection-SCREEN : end OF BLOCK blk01.
    START-OF-SELECTION.
      select a~bedat A~EKORG B~STATUS b~matnr b~werks b~lgort b~EBELN b~menge a~bukrs d~spras d~maktx a~lifnr c~name1 b~netpr
       into CORRESPONDING FIELDS OF TABLE lt_mix
        from EKPO as b INNER JOIN ekko as a on b~EBELN = a~EBELN
       JOIN LFA1 AS c ON c~LIFNR = A~LIFNR
       JOIN MAKT AS d ON d~MATNR = b~MATNR
       WHERE
       A~BUKRS IN C_CODE AND A~BEDAT IN PDOCDATE AND a~ebeln IN PDOC_NO AND D~SPRAS IN LANG AND b~matnr IN MATNR
      SORT lt_mix by matnr LIFNR BEDAT ebeln.
      loop at lt_mix.
        lt_final = lt_mix.
        AT END OF menge.
          SUM.
          append lt_final.
        ENDAT.
      ENDLOOP.
      LOOP AT lt_final.
        write: / lt_final-MATNR, lt_final-MAKTx, lt_final-LIFNR, lt_final-NAME1, lt_final-MENGE, lt_final-NETPR, lt_final-EBELN, lt_final-bedat.
        at END OF matnr.
          sum.
          skip.
          ULINE.
          write: / 'Total qty', lt_final-menge, 'Total Price: ' , lt_final-netpr.
          ULINE.
          SKIP 2.
        ENDAT.
      ENDLOOP.
      IF sy-subrc ne 0.
        WRITE: 'No records found!'.
      endif.
    When I run the report, Materials with same PO date are grouped together but the same material with another date doesn't get added to that group.
    I would really appreciate if anyone could help out.

    REPORT  Z_MM_POHISTORY.
    TABLES: EKPO, EKKO, LFA1, MAKT.
    TYPES : BEGIN OF tw_ekpo.
            INCLUDE STRUCTURE EKPO.
    TYPES : END OF tw_ekpo.
    types : BEGIN OF tw_ekko.
            INCLUDE STRUCTURE EKKO.
    types : END OF tw_ekko.
    TYPES : BEGIN OF tw_LFA1.
            INCLUDE STRUCTURE LFA1.
    TYPES : END OF tw_LFA1.
    types : BEGIN OF tw_MAKT.
            INCLUDE STRUCTURE MAKT.
    types : END OF tw_MAKT.
    types : tt_ekpo type STANDARD TABLE OF tw_ekpo, tt_LFA1 type STANDARD TABLE OF tw_LFA1, tt_MAKT type STANDARD TABLE OF tw_MAKT,
            tt_ekko type STANDARD TABLE OF tw_ekko.
    data : lt_ekpo type tt_ekpo, t_LFA1 type tt_LFA1, t_MAKT type tt_MAKT,
           lt_ekko type tt_ekko.
    data :  begin of lt_mix OCCURS 0,
            matnr type ekpo-matnr,
            bedat type ekko-bedat,
            LIFNR type ekKo-LIFNR,
            werks type ekpo-werks,
            lgort type ekpo-lgort,
            EBELN type ekpo-EBELN,
            menge type ekpo-menge,
            BUKRS type ekKO-BUKRS,
            EKORG type ekKo-EKORG,
            STATU type ekKo-STATU,
            WAERS TYPE EKKO-WAERS,
            BPRME TYPE EKPO-BPRME,
            NETPR type ekPO-NETPR,
            Name1 type LFA1-Name1,
            MAKTX TYPE MAKT-MAKTX,
            SPRAS TYPE MAKT-SPRAS,
            end of lt_mix.
    data : begin of lt_final OCCURS 0,
            matnr type ekpo-matnr,
            bedat type ekko-bedat,
            LIFNR type ekKo-LIFNR,
            werks type ekpo-werks,
            lgort type ekpo-lgort,
            EBELN type ekpo-EBELN,
            menge type ekpo-menge,
            BUKRS type ekKO-BUKRS,
            EKORG type ekKo-EKORG,
            STATU type ekKo-STATU,
            WAERS TYPE EKKO-WAERS,
            BPRME TYPE EKPO-BPRME,
            NETPR type ekPO-NETPR,
            Name1 type LFA1-Name1,
            MAKTX TYPE MAKT-MAKTX,
            SPRAS TYPE MAKT-SPRAS,
            end of lt_final.
    selection-SCREEN : BEGIN OF BLOCK blk01 WITH FRAME TITLE text-001.
    select-options : P_ORG FOR EKKO-EKORG, C_CODE FOR EKKO-BUKRS OBLIGATORY, PLANT for ekpo-werks, MATNR for ekpo-matnr,
                     PDOC_NO FOR EKKO-EBELN, PDOCDATE FOR EKKO-BEDAT OBLIGATORY, LANG FOR MAKT-SPRAS, STATU FOR EKKO-STATU,
                     VENDOR for ekKO-LIFNR.
    selection-SCREEN : end OF BLOCK blk01.
    START-OF-SELECTION.
      select a~bedat A~EKORG B~STATUS b~matnr b~werks b~lgort b~EBELN b~menge a~bukrs d~spras d~maktx a~lifnr c~name1 b~netpr a~waers B~BPRME
       into CORRESPONDING FIELDS OF TABLE lt_mix
        from EKPO as b INNER JOIN ekko as a on b~EBELN = a~EBELN
       JOIN LFA1 AS c ON c~LIFNR = A~LIFNR
       JOIN MAKT AS d ON d~MATNR = b~MATNR
       WHERE
       A~BUKRS IN C_CODE AND A~BEDAT IN PDOCDATE AND a~ebeln IN PDOC_NO AND D~SPRAS IN LANG AND b~matnr IN MATNR AND a~lifnr in vendoR
        AND b~werks IN Plant AND a~ekorg IN P_Org AND A~STATU IN STATU
      SORT lt_mix by matnr bedat ebeln lifnr.
      loop at lt_mix.
        lt_final = lt_mix.
        AT END OF menge.
          SUM.
          append lt_final.
        ENDAT.
      ENDLOOP.
      LOOP AT lt_final.
        ON CHANGE OF LT_FINAL-MATNR.
          WRITE: lt_final-matnr, LT_FINAL-MAKTX.
        ENDON.
        write: /60 lt_final-LIFNR, lt_final-NAME1, LT_FINAL-BPRME, lt_final-MENGE, LT_FINAL-WAERS, lt_final-NETPR, lt_final-EBELN, lt_final-bedat.
        at END OF matnr.
          sum.
          ULINE.
          write: /'Total qty', lt_final-menge, 'Total Price: ' , lt_final-netpr.
          ULINE.
          SKIP 2.
        ENDAT.
      ENDLOOP.
      IF sy-subrc ne 0.
        WRITE: 'No records found!'.
      endif.

  • Warning on Item price during contract and PO creation

    Hi Experts,
    When I create a contract, I put a material with mat. code and expect the system takes the standard price in the accounting tab of the material master.
    1/  Is there a way the system picks up the price auto. from the material master ?
    i.e. syst. warning during contract creation when I put the mat. code : +Effective price is 0.00, material price is 10.00 + 
    I do not understand why the syst. gives me this message (I have a standard price of 100 in MM and I put a net price of 100 during contract creation)
    2/  During PO creation, the syst. picks up the item price from the contract but I receive this message :
    Effective price is 100.00, material price is 10.00
    Again, I do not understand how the syst. indicates the mat. price at 10 (while I put 100 in MM and 100 in contract item level).
    Could anyone helps on this topic?
    Thanks in advance for your help.

    Any inputs will be much appreciated. Thanks

  • Item Price in report for every transaction

    Hi Guys.i am using the below queries for Stock report and i am getting the desired output  except the price calculation.
    In that query it is calculated like max(price) or avg(price) but instead of that i need the item price for that particular transaction  and also i need the prices for opening stock , goods issue, goods receipt and closing stock seperately in each column .
    pls provide me the updated query.
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    Declare @Group nvarchar(10)
    Declare @Whse nvarchar(10)
    Set @FromDate = (Select min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]')
    Set @ToDate = (Select max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]')
    Set @Group = (Select Max(s2.ItmsGrpCod) from dbo.OITB S2 Where S2.ItmsGrpNam = 'Group B')
    Set @Whse = (Select Max(s3.Warehouse) from dbo.OINM S3 Where S3.Warehouse = '03'  )
    Select
    @Whse as 'Warehouse',     
    a.Itemcode,
    max(a.Dscription) as 'Description',MAX(a.Price) as 'Price',
    sum(a.[Opening Balance]) as [Opening Balance],
    sum(a.[IN]) as [Receipt],
    sum(a.OUT) as [Issue],
    ((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) as Closing,
    ( MAX(a.Price) *  ((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) ) as ClosingValue
    from(
    Select
    N1.Warehouse,
    N1.Itemcode,
    N1.Dscription,N1.Price,
    (sum(N1.inqty)-sum(n1.outqty)) as [Opening Balance],
    0 as [IN],
    0 as OUT
    From dbo.OINM N1
    Where
    N1.DocDate < @FromDate and N1.Warehouse = @Whse
    Group By
    N1.Warehouse,N1.ItemCode,N1.Dscription,N1.Price
    Union All
    select
    N1.Warehouse,
    N1.Itemcode,
    N1.Dscription,N1.price,
    0 as [Opening Balance],
    sum(N1.inqty) as [IN],
    0 as OUT
    From dbo.OINM N1
    Where
    N1.DocDate >= @FromDate and N1.DocDate <= @ToDate and
    N1.Inqty >0
    and N1.Warehouse = @Whse
    Group By
    N1.Warehouse,N1.ItemCode,N1.Dscription,N1.price
    Union All
    select
    N1.Warehouse,
    N1.Itemcode,
    N1.Dscription,N1.price,
    0 as [Opening Balance],
    0 as [IN],
    sum(N1.outqty) as OUT
    From dbo.OINM N1
    Where
    N1.DocDate >= @FromDate and N1.DocDate <=@ToDate and
    N1.OutQty > 0
    and N1.Warehouse = @Whse
    Group By
    N1.Warehouse,N1.ItemCode,N1.Dscription,N1.price) a, dbo.OITM I1
    where
    a.ItemCode=I1.ItemCode and
    I1.ItmsGrpCod = @Group
    Group By
    a.Itemcode
    Having sum(a.[Opening Balance]) + sum(a.[IN]) + sum(a.OUT) > 0
    Order By a.Itemcode
    Regards,
    Vamsi

    Hi Gordon,
    We are maintaining different Price Lists  so is it possible to give the input in the query to select the report based on which price list???
    Or else  is it better to create an udf in item master data for Standard price of the item and display it in report??
    And i have another doutb that while i run the inventory audit report  and the query it is showing different values .. why is it so??
    pls give me the solution for the same,
    thanks in advance..

  • Vendor price history

    Hi folks,
    I am looking for a report that will provide Vendor price history for a material. Is there any standard SAP report or any  table that gives this information?
    Sincerely,
    Sanjay

    Hi,
    Use transaction ME1P.
    Regards,
    Naveen

  • Cash Discount at header is not reducing line item price

    Hi Experts,
    While putting cash discount at header, it is not reducing price of the my total line item. I am having total line item price = 100 USD (10 USD * 10 Qty). I am entering 10 USD as cash discount at header. It is not reducing total line item price to 90. Also in my accounting document 10 USD (cash discount) is going to my tax account.
    Please advise.
    Regards,
    Kamal

    Hi,
    The cash discount case will only be applicable in connection with terms of payment.  You will have to define your customized discount condition type in M/06 and assign it to your PO pricing schema via M/08 transaction.  Make sure it shall not be set as 'Statistics' condition type.
    Cheers,
    HT

  • Item Price in warehouse is not defined. Continue!

    Hello everyone,
    I created a new User - Defined Field at Item Master Data. I entered a number in this field and pressed Update button. After that, SAP showed a system message: "Item price in warehouse is not defined. Continue?" as picture:
    I pressed Yes and Update button. But the number wasn't saved. I don't know what it is. Could you help me, please?
    Thank you very much.
    Regards,
    Dong Pham Nhat

    Hi,
    If you add item master data without item cost, then you get above system message. Refer below screen shot.
    2. Do you updating this cost from above UDF by FMS?
    Thanks & Regards,
    Nagarajan

  • Get Item price based on Price List

    Hi all,
    anyone has some sample of how to get the price for an item based on a specified price list, selected by the user, following the SAP's rules for assigning item price?
    I've used the GetItemPrice method, but it doesn't need a price list reference and i think it gives back the basic price of the item.
    I'm able to get the price list and the item code. How can i get the correspondig price (unit price) for that item?
    Thanks in advance.
    Nick

    Thanks Rasmus,
    i've done. I get the PriceList currently selected by the combo box and update the price list used by the BP, and after that i use the getitemprice.
    So it should work now, i get the correct prices related to the pricelist selected and i think that using the getitemprice the price that i obtain follows the sap B1 logic in assigning prices.
    After that i'm considering to set back the pricelist on the BP to the one that is originally stored in the BP.
    Thanks for your help

Maybe you are looking for

  • Behaviour of * in S_tcode object

    Hello,         does anyone knows the behaviour of * in S_tcode aothorization object. 1) If i assign ME* in S_Tcode in role manually.do i will get auth ME00 and ME01 tcode execution rights. but in my case i am not able to execute ME01. Regards Nilesh

  • Adding new element to BPEL for use in PL SQL type, has binding errors

    Figured I might as well post this here since I haven't gotten a single reply in 3 days anywhere else :/ I have a BPEL service that calls a PL SQL procedure. I have added a new element to the BPEL called quote_cart_line. All I had to the BPEL to accom

  • Steps to create webdynpro

    hi all,        i'm new to webdynpro.. Can you send me the step by step procedure to create webdynpro objects Regards Suprith

  • Update cannot be applied for CS6 products

    Hello, I ran the update for some of my products and I got these errors: Adobe Illustrator CS6 Update (version 16.0.3) There was an error downloading this update. Please quit and try again later. Error Code: U43M1U49 Dreamweaver CS6 (to version 12.0.3

  • Can someone explain to me Vector Class !!

    Can someone explain to me, or tell me where I can find a good tutorial about Vector class.....in simple terms....any good simple, easy to understand tutorials??? Thank you. Rod