Add a Price List based on last purchase price

Hi!
I'm working with SAP B1 2005 A SP01 PL39 and I'm trying to add a Price List via DIAPI using this code in VB.net.
Dim oPriceList As SAPbobsCOM.PriceLists
oPriceList = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPriceLists)
oPriceList.PriceListName = "PriceList Z"
oPriceList.BasePriceList = 0  '// last purchase price
oPriceList.Factor = 1
oPriceList.GroupNum = BoPriceListGroupNum.boplgn_Group1
oPriceList.RoundingMethod = BoRoundingMethod.borm_NoRounding
oPriceList.Add()
The problem is when the Price List is added, the base price list changes and becomes "PriceList Z" instead of "last purchase price"!!
After i try to update the base price list from "PriceList Z" to "last purchase price" manually at Inventory > Price Lists > Price Lists and it works!
I even tested the code changing the base price list to "last evaluated price"...
oPriceList.BasePriceList = -1  '// last evaluated price
... and it works too! The Price List is added based on the last evaluated price.
I'm only having problems with last purchase price... why?

Thanks for the quick response Petr but my problem isn't solved yet...
As you can read in my first post, i've changed the code and based the new price list on the "Last Evaluated Price".
This "Last Evaluated Price" isn't in the OPLN table and the new price list (with last evaluated price based on) is added successfully.
The problem comes when i try to add a new price list based on the last purchase price.

Similar Messages

  • Price List Auto Update based on Last Purchase Price

    Dear Expert
                         I have a problem in updating the PriceList at one of my client site . They are making CST purchase
    Eg.    We are entering purchase through Goods Receipt PO item cost 100RS and CST tax 20 RS
             Then Copy to AP invoice . so the item cost is coming to 120 as CST is non deductible tax .
             If we goto Price list , it will clearly show last purchase Price is 120 every thing is fine till now
           Now the issue comes :- company is incurring frieght charges 10 Rs or any amount this also has to be included to cost that we are entering through Landed Cost . This 10Rs is automatically adding to cost . if we look the item cost it will be 130 this is also correct . But the Problem is that when we go to Pricelist we find that Last Purchase price as 110 that is 100 Rs base doc price +10 Rs Frieght (Landed Cost) . .
    Actually the Last Purchase Price should come as 130 (1002010) . We are dealing with 4000+ items it is difficult to mannually update the Price List .
    Regards
    Shihabuddin CC
    Jr . Consultant SAP B1
    CCS Technologies P Lrd

    Dear Shihabuddin,
    In most localization, price is for before tax price. If you want tax included in the price, you can create your own price list to calculate.
    Thanks,
    Gordon

  • Vendor list as per last purchase price!

    I need a query to display all vendors  as per last purchase price.
    Thanks...

    hi,
    try this one,
    SELECT T2.[CardCode], T2.[CardName], T0.[ItemCode], T0.[ItemName], T0.[LastPurDat], T0.[LastPurPrc]
    FROM [dbo].[OITM]  T0 INNER JOIN PCH1 T1 ON T0.ItemCode = T1.ItemCode INNER JOIN OPCH T2 ON T1.DocEntry = T2.DocEntry WHERE T2.[CardCode] = '[%0]'
    GROUP BY T2.[CardCode], T2.[CardName], T0.[ItemCode], T0.[ItemName], T0.[LastPurDat], T0.[LastPurPrc]
    regards,
    Fidel

  • DTW for Last Purchase Price

    Dear all,
    Can we import Last Pruchase Price to SBO using DTW ? so, I can see the historical of last purchase price when I open PO
    Best regards
    Wibisana

    Dear Wibisana,
    what is your pupose to update last purchase price list ?
    To update price list, you must have the explanation about how to update last purchase pricelist:
    Last Purchase Price List
    The prices in this price list are updated automatically by the system when the following transactions are performed:
    1.     When you enter an incoming invoice # see Purchasing
    1.     When you enter a goods receipt # see Goods Receipt
    1.     When you enter a positive opening balance for an item # see Inventory and Stock Postings
    1.     When you enter a positive inventory result that triggers a goods receipt # see Inventory and Stock Postings
    1.     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.
    1.     When data imports are performed
    If none of these transactions have been performed in the system for an item, the "Last Purchase Price" price list will not contain the item
    Only the list of the transactions mentioned above changes the price of an item in the "Last Purchase Price" price list.
    Even if you enter one of these transactions, but assign it the value 0, the price will not be included or updated in the "Last PurchasePrice" price list.
    You can refer other price lists to the "Last Purchase Price" price list with a defined factor. You cannot, however, change the prices in the "Last Purchase Price" price list manually.
    then you use the DTW template:
    1. item
    2. item_prices
    you can have both from this folder:
    C:\Program Files\SAP\Data Transfer Workbench\Templates\Templates\oItems
    then, in the DTW, you use object oItem.
    the DTW templates (item and item_prices) must contains the data where they will not act like import but update.
    in the item_prices, you must put :
    1. linenum : 0 for pricelist 1; 1 for pricelist 2; etc
    2. pricelist : 1 for pricelist 1; 2 for pricelist 2; etc
    actually, in the pricelist window, do you see that the pricelist last purchase price have base pricelist ? in the form, you will see that the 01 Purchase Price List have last purchase price as its base pricelist.
    So, in the template you must use it.
    After updating using DTW finished, you could try to use one of the item in the purchase order and see if the unit price changes or not.
    I will ask my friend to send the template if you need.
    Rgds,

  • Last Purchase Price wasn't updated after GR with 0 price

    I created Goods Receipt for the item with total 0. When I check last purchase price I see still a price from the previous document and not zero.
    How can I make last purchase price as zero?
    Thanks,
    Olga

    The Goods Receipt PO does not update the 'Last Purchase Price' list. The 'Last Purchase Price' list can only be updated by the following documents:
    AP Invoice
    Goods Receipt (Inventory Transactions)
    Initial Quantity (Inventory Transactions)
    Inventory updates e.g. Stock Posting
    Landed Costs
    Production Order
    Please refer the following WIKI
    [Does a Goods Receipt PO update the Last Purchase Price List?|https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=36438427]

  • In wich table are stored  the last purchase price of items?

    Hi all,
    My question is in wich table are stored the last purchase price of items and what is the best way to import items price directly to the last purchase price list.
    In ITM1 appears the prices of the list prices but no the last purchase price list.
    Thank you all again.
    Regards.

    Hi
    The last purchase price are not stored anywhere as well as the last evaluated price.
    However if you want to add or update this price you can use DTW in order to update this particular pricelist.
    Hope it helps
    Regards
    George

  • Last purchase price of item per plant

    Good day!
    Need help retrieving the last purchase price of an item
    per plant regardless of the vendor. i know they are in
    EINA and EIPA tables but i couldn't extract them.
    anybody knows a query for this?
    Thank you very much for your help.

    Thanks, Suda, I understand I cannot update the Last Purchase Price itself - should have made myself more clear. 
    What I want to do is change the Price List (field OPLN ListName) selection in the Item Master from one of our created lists to the Last Purchase Price price list.  That way, when we create purchase orders, the item price is filled in with whatever price we last purchased.  I don't want to manually create another last-price price list because I would have to constantly update it.
    Since I can manually change to the Last Purchase Price price list in the Item Master, there must be some way to do this for all items using the Data Import or the DTW?
    Thanks again,
    Shelby

  • Price List and Last Purchase Price.

    When a Price List based on the Last Purchase Price is created, we have found that a set of problems arise in companies using u201CGoods Receipt POu201D.
    EXAMPLE:
    Every article received from their suppliers are enclosed with a GOODS RECEIPT.
    After 20 days, the supplier issue an invoice including all the Goods Receipts provided during the corresponding month.
    Recall that the company has a List Price based on the Last Purchase price.
    But, since the Goods Receipt do not update the Last Purchase Price, all new articles in the database, are kept without a Selling Price, and the old articles are not subject to an updated Selling Price.  I enclose a draft to show this behavior.
    [http://s2.subirimagenes.com/privadas/previo/thump_1047037compraitem.jpg]
    You may note that SAP HELP explains:
    1.In addition, two price lists are automatically created and calculated by the system:
        - Last purchase price list u2013 the price list is automatically updated when an item enters the stock with its entering price.
        - Last evaluated price list u2013 the price list is automatically updated after you run the Inventory Valuation report.
    [http://s2.subirimagenes.com/privadas/previo/thump_1047038help-sap-b1-2007a.jpg]
    But this does not happen.
    Selling Prices are only updated when the corresponding invoice is entered, but this happen too late, since the invoice issued 20 days after by the supplier.
    In other words, it does not work properly for the company.   The example shows:
    1 Goods Receipt PO
    2 Item master data with Price calculated alter Goods Receipt processing
    3 base Price driven to zero.
    If Goods Receipts do not update the last Purchase, is not easy to understand why a Selling Price can be based in the Las Purchase Price.
    Our customer and me, think that there is a programming error.
    Otherwise, the system behavior has not be properly explained to SAP users.
    The described facts happen with SAP 2007A PL 49, and SAP 8 PL 5, both versions properly tested
    That we need:  That Goods Receipt update the last purchase Price and Price List could be constructed don Item bases cost.

    Hi Dana,
    I'm not sure if this will solve your problem, but, you can create a new price list which is based on the "Last Purchase Price" and set as a factor of 1.65. I'm not sure if the "Last Purchase Price" updates from the Goods Receipt or the PO though?
    Does this sound like it might solve your problem?

  • Last Purchasing Price

    Hi all,
    I have A issue for creating Z report based on material stocks in plant/storage location/BUM/Cur/stock/stock value/ inspection/ Inspection value/manufacture part/ Manufacturer name/ Purchse price/ Currency.
    This is the table description the client need. I have prepared the functional Specification for this issue.
    I am unable to give the detials in FS like how to pick up the last PO Purchase price for the particular material in FS logic flow. All the SAP price is based on Moving average price.
    In EKPO table we will get  the list of PO prices but how can I give logic that particular material should pick last PO price?
    Pls give solution for this issue.
    Thanks in Advance,
    GANESH

    Hi Ganesh,
    Get the List of POs from EKPO Table then arrange the POs list in ascending or descending  by AEDAT-EKPO (last Change date). Then accordingly pick the NETPR-EKPO.
    Thanks,
    Neeraj
    Edited by: Neeraj Saini on May 25, 2011 8:49 AM

  • Proposal: option to use 'last purchase price' in Purchase Order by default

    Hi,
    We have had with at least two customer the following requirement.
    When they generate a new A/P PO, they want SBO to fill the price column for an item with the last purchase price of that item/provider.
    We did this using an FMS selectign fields LastPurCur/LastPurPrc from OITM, but this last price is independent of the provider. ONe solution is using user-tables.
    What would be a very nice addition to SBO is the ability to handle a last purchase price by the pair item-provider, and some check somewhere, in order to enable the automatic fill of this value in the purchase documents (PO, Good Receipts, Invoices) based on this pair.
    If anyone has developed such a solution, I would be very glad to hear about it.
    Otherwise, please, forum moderators, consider this request for upcoming versions.
    Regards,
    Leo

    Leo
    Why not just use FMS to determine last price by item/provider?
    Regards
    Jeffrey

  • Powershell script to Scan Active Directory Attributes for Country and Department ,Then add to Sales Group then add to Distribution list based on Region

    Hey Scripting Guys,
    I have been in and out of Powershell last few years, not that great at it tbh !!! I'm looking for advice on how I can as in Title, Create a Powershell script to Scan Active Directory Attributes for Country and Department ,Then add to Group then add to Distribution
    list based on Region/Country
    I was thinking along the lines of get-aduser -LDAPFilter "(department=SALES France) and adding a where clause for country.
    Any help would be great.
    Dec

    So I have tried a few variations but get errors on both 
    get-aduser -LDAPFilter "(&(department=SALES)(c=us))" | Add-ADPrincipalGroupMembership -MemberOf "testgroup"
    get-aduser -LDAPFilter "(&(department=SALES)(c=fr))" | Add-ADGroupMember -identity "testgroup"
    Add-ADPrincipalGroupMembership : Object reference not set to an instance of an
    object.
    At line:1 char:86
    + get-aduser -LDAPFilter "(&(department=SALES)(c=fr))" | Add-ADPrincipalGroupMe
    mbership <<<< -MemberOf "testgroup"
    + CategoryInfo : NotSpecified: (:) [Add-ADPrincipalGroupMembershi
    p], NullReferenceException
    + FullyQualifiedErrorId : Object reference not set to an instance of an ob
    ject.,Microsoft.ActiveDirectory.Management.Commands.AddADPrincipalGroupMem
    bership

  • How can I obtain the last purchase price

    Hi,
    there is a method to obtain the list of last purchase price??
    Thx
    Best Regards

    hi,
    I've tried the PriceList Obj and GetItemPrice but nothing to do....
    I would like obtaining the second Price List row in the Price Lists Form (Inventory\Price Lists\Price Lists).
    If I enable Debug Information I can obtain ListNum but the first two rows have the ListNum set to -2 and -1
    With the PriceList.GetByKey method if I set the parameter with -1 or -2 doesn't work... There is a way to obtain this PriceList?
    Thanks a lot
    Best Regards

  • Last Purchase Price - OITM

    HI,
    We will be trying on the TEST system to do Goods Issues and Receipts to change the Last Purchase Price but because we use FIFO this may not give the result that we want ie in FIFO it is the the earlier price we want i presume?
    I have heard another way of changing the Last Evaluated Price in table OITM as this is also the Last Purchase Price but are unsure the best way to do this?
    Can anyone please suggest a way to update the Last Purchase Price ?
    Thank you,
    MB

    Hi Gordon,
    Do you mean these notes:
    The 'Last Purchase Price' list can only be updated by the following documents:
    u2022     AP Invoice
    u2022     Goods Receipt (Inventory Transactions)
    u2022     Initial Quantity (Inventory Transactions)
    u2022     Inventory updates e.g. Stock Posting
    u2022     Landed Costs
    u2022     Production Order
    If so, then do you think that the simplest and easiest way to update the Last Purchase Price would be by doing Goods Receipts ?
    Just not sure the affect it will have doing Goods Receipt with FIFO...cannot seem to find much about it.
    Best Regards,
    MB

  • Last Purchase Price Currency

    Hi Experts,
    My client purchases stock from all around the world.  When posting a Purchase Invoice in Dollars, the Last Purchase Price of the item is then changed to USD.
    Is it possible to always show the Last Purchase Price in the local currency (GBP)?
    Thanks
    Greig

    Hi Greig,
    we've had the same problem with one of our customers.
    To solve the problem we've used SDK and we've developed an addon which create/update an "own" last purchase price list.
    The prices in foreign currencys will be convert into local bp currency. And that price list will be used for reports an gross profit calculation instead of the system last purchase price list.
    I think that is the only way to do that.
    Kind regards
    Jacqueline

  • Query whit ListPrice "Last Purchase Price""

    hi,
    I am making a user query in which I want to use the list price "Last Purchase Price" but i can't because don´t find it on the table "OPLN".someone can help me?
    thanks.

    Hi Mariono
    The Last Purchase Price and Last Evaluated Price are on the item master table OITM.
    Kind regards
    Peter Juby

Maybe you are looking for

  • DVD Drive won't work! (DVD region settings?)

    My DVD drive does not seem to be working. I sent it in for servicing and was told that they changed the drive. However, it still does not accept/recognize DVDs at all when I insert them. I recently travelled overseas and changed my region from region

  • LSMW, Step - Specify Files option

    Dear Experts, Please explain the details at Specify files options in LSMW I want to know about following options - 1) Legacy data on PC (Front end) 2) Legacy data on the R/3 server (Application Server) 3) Imported data File for imported data (Applica

  • I have a macbook pro md318 late 2011 i want to know can i change hard drive from 500GB to 2TB????

    i have a macbook pro md318 late 2011 i want to know can i change hard drive from 500GB to 2TB????

  • Quicktime won't play live webcast....error msg about plug in

    Movie trlrs, advertisements, even archived webcasts can be viewed, but when I try to view a live webcast all I rcvd is the QT player loading the broadcast then stops. Clicking on the Q an error msg says plugin was found but an error has in the plugin

  • Help Me! (Nokia 5800 xpress music)

    I know that is my fault but i getted some viruses on my nokia 5800 xpress music! I do not know the type of the viruses but all i know is that is eating my memory! Even if i erased all things, i still have at sis aplications to much memori in phone so