INVENTORY STATUS WITH PRICE LIST

Dear Experts
I am using below query for my storck report ,now am looking to add price list which means closing stock multiply with price list 4.
Kindly advice me
Parikshit
Declare @FromDate Datetime
Declare @ToDate Datetime
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 @Whse = 'HOFG'
Select
@Whse as 'Warehouse',
a.Itemcode,
max(a.Dscription) as ItemName,
sum(a.OpeningBalance) as OpeningBalance,
sum(a.INq)  as 'IN',
sum(a.OUT) as OUT,
((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing
,(Select  i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM
from(
Select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
(sum(N1.inqty)-sum(n1.outqty)) as OpeningBalance,
0 as INq,
0 as OUT
From dbo.OINM N1
Where
N1.DocDate < @FromDate
and N1.Warehouse = @Whse
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
0 as OpeningBalance,
sum(N1.inqty) ,
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
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
0 as OpeningBalance,
0 ,
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) a, dbo.OITM I1
where
a.ItemCode=I1.ItemCode
Group By
a.Itemcode
Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0
Order By a.Itemcode

Hi,
You may try:
Declare @FromDate Datetime
Declare @ToDate Datetime
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 @Whse = 'HOFG'
Select
@Whse as 'Warehouse',
a.Itemcode,
max(a.Dscription) as ItemName,
sum(a.OpeningBalance) as OpeningBalance,
sum(a.INq) as 'IN',
sum(a.OUT) as OUT,
((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing
,I2.Price,I1.InvntryUom as UOM,((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT))*I2.Price as StockValue
from(
Select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
(sum(N1.inqty)-sum(n1.outqty)) as OpeningBalance,
0 as INq,
0 as OUT
From dbo.OINM N1
Where
N1.DocDate < @FromDate
and N1.Warehouse = @Whse
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
0 as OpeningBalance,
sum(N1.inqty) ,
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
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
0 as OpeningBalance,
0 ,
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) a
INNER JOIN dbo.OITM I1 on a.ItemCode=I1.ItemCode
INNER JOIN dbo.ITM1 I2 on I1.ItemCode=I2.ItemCode AND I2.Pricelist = 4
Group By
a.Itemcode,I1.InvntryUom,I2.Price
Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0
Order By a.Itemcode
Thanks.
Gordon

Similar Messages

  • PO in held status with price zero

    Hi Gurus,
    Here is an interesting challenge and perhaps a learning curve for us , as in my project we are facing a strange issue with Automatic PO creation from SC !
    The SC is created by choosing an item having product category , vendor , price and contract combination from MDM catalog and is fully approved. On approval the Automatic PO is created without going to Sourcing cockpit. (with the Sourcing setting).
    But surprisingly the PO is with ZERO value and goes in held status !! On clicking the Check button , following is the error message which crops up :
    Enter the price or set the 'Invoice Expected' indicator  (Item 1)   
    The invoice expected indicator is already set as observed in the Item data -> Follow-on-documents tab of PO.
    This behavior is happening only for the new company code configured with new currency both in R/3 and SRM system, however all other company codes are currently working fine with Automatic PO process. So what exactly is missing for this company code ?
    And interestingly if the SC(without MDM) -> Sourcing cockpit -> PO process is carried out the PO is in Ordered status without any errors !
    We are in ECC 6.0, SRM 5.0 and MDM Catalogue 5.5 environment.
    Kindly give your suggestions , if any further questions please revert back.
    Thanks and Regards,
    Vikas Mehta

    Hi,
      1 )Please check for the P.O created from SC with MDM catalgog. The price will be zero in the catlaogue itself.
    check the company code for the creator in PPOSA_BBP --attributes the company code is assigned (or) not
    2) For the SC created without MDM is free text .you have created using"Describe requriement" ..It  will go to the sourcing
    cockpit because for this SC there is no souce and source  has to be assigned . For this config settings to be done. This is 
    STD  SRM functionality
    Regards
    G.Ganesh Kumar

  • Price list concept /configure/usage

    Hello Gurus,
         what is price list , and how to configure it and use it ?
    thanks very much!

    Hi
    First creat a condition table with Sales org, distribution channel, Material, and Price list as selected fields.
    Then define Access Sequence and mention the Table no. u created with price list option.
    Then assign pricing procedure for price list option.( It may be different for customers).
    Then go to VK11 enter the condition type.
    Then u can enter the sales org. dist chan. Price list ex for whole sale or Retail or Industry. and enter the document currency.
    Then enter the list of material u want to configure..
    Reward if useful to u

  • Price List Configuration

    Can anybody help me out with how to confiure price list.If Can anybody provide me with step by step process of configuring new price list that will be helpful.
    I have a requirement new price list setup.
    1700/40/40
    Price List #27 - Please use - FIRST CALL  as price list name
    pkg'd disc.  = 25%
    e/one & Chem.  = 30%
    Filters  =  36.35%

    Hi
    First creat a condition table with Sales org, distribution channel, Material, and Price list as selected fields.
    Then define Access Sequence and mention the Table no. u created with price list option.
    Then assign pricing procedure for price list option.( It may be different for customers).
    Then go to VK11 enter the condition type.
    Then u can enter the sales org. dist chan. Price list ex for whole sale or Retail or Industry. and enter the document currency.
    Then enter the list of material u want to configure..
    Reward if useful to u

  • Does anyone know how to make this Box with prices?

    Hello!!
    I am making my 'wedding website' I am unware of what the 'actual term(s)' of how to call these element.
    I wanted to know if anyone knows if it is possible to make these price boxes with the amount filling box under it?
    Can you make something like this in MUSE (it seems perfectly possible) Can someone give me a hand or tutorial on how to do this.
    I was thinking of using some kind of widget or compositions. Many thanks! Here is the actual website to see it in action. Its under 'Gifts' section http://celebr8with.us/
    Thank you in advance!

    Hi
    The drop downs with price attributes would require custom coding on your end, but if you have a fixed price then you can use product information for sale purpose with price listed in the product itself.
    Something like this :
    http://muse.adobe.com/exchange-library/pricing-table
    Thanks,
    Sanjit

  • Updating one price list from another one

    Dear all,
    I need to update the price list A copying the values of the price list B only for the items of a specific item-group.
    How can do it using the SAP B1 client?
    I try using the Price List form (Updating with price list selection option) but I have an error message:
    Unable to update basic price list or rounding method for selection criteria item Message 3506-11
    I don't want to use the Special prices form.
    Can someone help me please?
    Best regards
         Emanuele

    Sorry... but is it not my case?
    I only need to update one price list (A).
    On the row of price list A, I set
          Base Price List = B
          Factor = 1
          enable "Update By Selection"
          Double-Click on the row of Price List A --> Select the desired ItemGroup --> Click OK
    Best regards
         Emanuele

  • HOw to query price list

    Hi All!
    How can i write a query with prices list.
    Ex: Itemcode, Itemname, warehouse, price list 1, price list 2, ,...price list 5
    I don't know the table store value of price list.
    Thanks!

    SELECT T0.[ItemCode], T0.[ItemName], T1.[PriceList],T2.[ListName],  T1.[Currency],
    T1.[Price] FROM OITM T0  INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN OPLN T2 ON T1.PriceList = T2.ListNum

  • Based Price List Updated Prices

    Hello.
    I'm having a problem with price lists and exchange rates. I.e., I've a price list defined in Kwanzaa, based in another one in USD. Everytime the USD exchange rate is updated, the prices in the Kwanza price list are updated too.
    Is there any way to prevent the prices in the Kwanza Price List to update?
    Thank you.
    Regards,
    Marta Silva

    Dear Ms Silva,
    I can suggest to delete the link between the two price lists and use a factor for the price list in Kwanzaa. If I understood correctly the price list in Kwanzaa does not have to change according to the exchange rate, so there is no need to link the two price lists.
    When you enter a factor a pop up message you asks you if you want to update the price list of that value. Then the factor is back to 1.
    Please, let me know if this helps.
    Regards,
    Marcella Rivi
    SAP Business One Forums Team

  • Customizing BCC UI IN ATG 10 SKU PRICE LISTS TAB

    we are working on migrating application from ATG 9 to 10. In our existing implementation we are using pricelists for pricing. we have multiple price lists and sale price for a price list was created by extending the Price item descriptor.
    And we have customized the UI under SKU price lists tab to display the SKU sale price.
    Now in ATG 10, due to flash based UI, the sale price column is not visible. How to customize UI to display the sale price under pricelists tab in SKU section.
    Any alternative design is also helpful.
    Any help is appreciated.
    Thanks.
    V@su

    You may not want to revisit your price item customization at this point, but you could probably eliminate your customization and the need to customize the Flex UI if you used a sale price list. ATG has always had full support for sale pricing in the SKU-based pricing calculators, but did not have full support for sale pricing in the price list calculators until recently (I think 10.0). With the new out-of-the-box features, you'd store sale prices in separate price lists and assign two price lists to every user, one for list prices and one for sale prices.
    I was going to refer you to the Commerce Programming Guide, but the section about implementing sale pricing with price lists has not been updated to match the code. The manual tells you to do things that ATG has already done for you. For example, there is now a salePriceList property defined in the user profile, and the comments in ItemPricingEngine.properties that you can edit to turn on price lists have been updated with the necessary calculator for sale pricing.

  • Help with creating a price list

    I'm just wondering if anybody could possibly help me when creating a price list?. I'm new to SAP so don't have a great knowledge of it.
    Our company needs to send out a wholesale price list to customers, however some of the items we stock do not include vat, when the price list is previewed it doesnt show which items include vat or exclusive of vat. this information could do with being visible to make it clearer to the customers.
    Is there anyway the priclist could be exported to microsoft excel etc for editing?
    many thanks.

    go to inventory--prce lists-Price List.
    double click on the price list you want.
    It will open the new window showing Items with prices.
    Click on the Excel icon on menu bar on the top.
    save file as .xls.

  • Inventory Price List

    Hi all
    How to list from Query Inventory Price List->Price List, double click on Price list No. to see all Items with Prices.
    Kedalene

    Hi,
    Or you may try this too:
    SELECT T0.[ItemCode], T0.[ItemName], T2.[ListName], T1.[Currency], T1.[Price]
    FROM OITM T0 
    INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN OPLN T2 ON T1.PriceList = T2.ListNum
    WHERE T2.[ListName] = '[%0]'
    Thanks

  • Inventory status for a date in the PAST with BATCHES with VALUE

    Hi,
    How can I get a status REPORT of all inventory as on a date in the PAST with BATCH numbers and VALUE?
    The following ready reports do not solve my problem:
    1. Inventory Status: This gives CURRENT date inventory QUANTITY only.
    2. Inventory in Warehouse Report: This gives CURRENT date only, no BATCHES.
    3. Inventory Audit Report: Doe not give BATCH numbers and ignores qty without transactions.
    4. Inventory Valuation Report: Meant for "what-if" only.
    5. Inventory Posting List: Does NOT give BATCH numbers
    6. Batch Number Transactions Report: Doe NOT give VALUE.
    I suppose an SQL will be required for this requirement?
    Thanks,
    Ajay Audich

    Hi Rozario,
    Thanks for the pointer. Could you or anyone of the gurus out there have a code for doing this which will achieve this?
    Thanks,
    Ajay
    Edited by: Rui Pereira on Dec 9, 2008 5:08 PM

  • Query help - Inventory, warehouse, Price List, AP PO, & wildcard search?

    Hi All,
    I have a query that does a lookup on inventory and returns useful info as onhand, committed, warehouse,
    various price list data etc. It is very useful for our telephone sales guys as they can see all the information
    they need in one quick search. There is a wildcard variable that searches both the ItemCode and ItemName
    fields to return possible results.
    I would like to add one further column to this query.. being the ETA (DocDueDate) of the most recent Open
    AP purchase order that relates to the Item.. if any. I want to return the rest of the result even if there is no
    AP Purchase Order open.
    I have posted two queries below. The first is the original query that works well. It offers wildcard search
    of the ItemCode and ItemName, but does not give me the ETA (DocDueDate) of any open AP Purchase
    orders for the item (what I want).
    The second query does give me everything thing I want returned, but only if I enter the exact ItemCode
    into the variable field. I can no longer do the wildcard search that I also want. Some of our codes are simply
    not practical to remember, and cannot be easily identified. this is why I need the wildcard search to look in
    both the Item and Name column and return possible matches.
    I have both queries below.
    This is the working original query...
    SELECT
    T0.[ItemCode],
    T0.[ItemName],
    CAST (T0.[OnHand] As INT) As ' Total On Hand', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=01) As INT) As 'Melb Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=06) As INT) As 'Demo Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=04) As INT) As 'Bill Car Stock',
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=05) As INT) As 'Brett Car Stock',
    CAST (T0.[IsCommited] As INT) As 'Committed',
    CAST (T0.[OnOrder] As INT) As 'On Order',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
    T1.[ItmsGrpNam],
    T2.[FirmName]
    FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
    INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
    WHERE T0.[ItemCode] Like '%%[%0]%%' OR  T0.[ItemName] Like '%%[%0]%%'
    ORDER by T0.[ItemCode]
    For Browse
    This is the new query with the AP PO DocDueDate lookup included. (Wildcard searches dont work anymore)
    SELECT
    T0.[ItemCode],
    T0.[ItemName],
    CAST (T0.[OnHand] As INT) As ' Total On Hand', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=01) As INT) As 'Melb Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=06) As INT) As 'Demo Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=04) As INT) As 'Bill Car Stock',
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=05) As INT) As 'Brett Car Stock',
    CAST (T0.[IsCommited] As INT) As 'Committed', CAST (T0.[OnOrder] As INT) As 'On Order',
    (SELECT TOP 1 T0.[DocDueDate] FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE T1.[ItemCode] = [%0] And  T0.[DocStatus] ='O' ORDER BY T0.[DocDate] Asc) As 'ETA',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
    T1.[ItmsGrpNam],
    T2.[FirmName]
    FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
    INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
    WHERE T0.[ItemCode] Like '%%[%0]%%' OR  T0.[ItemName] Like '%%[%0]%%'
    ORDER by T0.[ItemCode]
    For Browse
    As you can see in query 2, I used the same variable to attempt to lookup the DocDueDate from OPOR.
    This only works if I enter the variable exactly as ItemCode. No longer wildcard search.
    if anyone could offer any assistance it would be most appreciated.
    Best regards,
    John

    Hi István,
    Thanks! That works great.
    The only additional thing I need is to return the DocNum of the Purchase order (DocNum from OPOR). I attempted to do this by adding T.[DocNum] to your suggested query as per below... however it returns error "Only one expression can be specified in the select list when the subquery is not introduced wit EXISTS"
    SELECT
    T0.[ItemCode],
    T0.[ItemName],
    CAST (T0.[OnHand] As INT) As ' Total On Hand', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='01') As INT) As 'Melb Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='06') As INT) As 'Demo Whse', 
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='04') As INT) As 'Bill Car Stock',
    CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='05') As INT) As 'Brett Car Stock',
    CAST (T0.[IsCommited] As INT) As 'Committed', CAST (T0.[OnOrder] As INT) As 'On Order',
    (SELECT TOP 1 T.[DocNum], T.[DocDueDate] FROM OPOR T  INNER JOIN POR1 Tt ON T.DocEntry = Tt.DocEntry
    WHERE Tt.[ItemCode]=T0.ItemCode And  T.[DocStatus] ='O' ORDER BY T.[DocDate] Asc) As 'ETA',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
    (SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
    T1.[ItmsGrpNam],
    T2.[FirmName]
    FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
    INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
    WHERE T0.[ItemCode] Like '%%[%0]%%' OR  T0.[ItemName] Like '%%[%0]%%'
    ORDER by T0.[ItemCode]
    For Browse
    Any ideas?
    Many thanks,
    John

  • Re: open purchase order list with price unit

    Hi Guru,
    Please inform if SAP have transaction which can show the list of our open
    order complete with price unit of material.
    Thanks
    Regards
    siva

    i think to get price per unit with the open PO you have to develop an customized report so contact your ABAP team with your requirement and develop a customized report.
    regards,
    qsm sap

  • Price List on internal inventory transactions

    SAP 8.8
    On Sales docs and Purchase docs the price list to use comes from the BP card's price list.
    On internal inventory transactions, Good Receipt and Goods Issue, my docs default to Last Purchase Price. I want them to default to a different price list. (Employees are creating these docs and forgetting to change the price list.)
    Where can I set the default price list for these transactions?

    Hi,
    This default is not user selectable. System can only use item cost for those transactions.
    Thanks,
    Gordon

Maybe you are looking for