Closing stock with selling price
Dear Experts
I am using the below query to get the instock with value but its not giving option of datewise report.Can anybody modify my query so i can get Instock and value by datewise report.So any point i can see what was the instock and its total value.
SELECT T0.[ItemCode], T1.[ItemName], T0.[OnHand] as 'In Stock (TINS)',T1.[InvntryUom] as 'Pak Size', (T0.OnHand /T1.InvntryUom ) as 'In Stock (Carton or Pail)' ,T1.[CodeBars] AS 'Min Inventory', T2.[Price] as 'Selling Price', (T0.OnHand *T2.Price ) as 'Total',T3.[ListName] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN ITM1 T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OPLN T3 ON T2.PriceList = T3.ListNum WHERE T0.[WhsCode] =[%0] AND T1.[SuppCatNum] =[%1] AND T3.ListNum =1
Thanks in advance
Looking for your support
Parikshit
Dear Gordon
Thanks for your advice.But can you able to add selling price in below query which you have advice me. even i want zero item in query.
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @Group 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 = '[%2]')
Select
a.Itemcode,
max(a.Dscription),
sum(a.[Opening Balance]) as [Opening Balance],
sum(a.[IN]) as [IN],
sum(a.OUT) as OUT,
((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) as Closing
from(
Select
N1.Itemcode,
N1.Dscription,
(sum(N1.inqty)-sum(n1.outqty)) as [Opening Balance],
0 as [IN],
0 as OUT
From dbo.OINM N1
Where
N1.DocDate < @FromDate
Group By
N1.ItemCode,N1.Dscription
Union All
select
N1.Itemcode,
N1.Dscription,
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
Group By
N1.ItemCode,N1.Dscription
Union All
select
N1.Itemcode,
N1.Dscription,
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
Group By
N1.ItemCode,N1.Dscription) 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
thanks
parikshit
Similar Messages
-
Inventory opening and closing stock with value report
Hi All,
Is it possible to get details of both opening and closing stock with value of each items of last financial year (2009-10) in inventory report?
MizanHi..
you can try this query
Declare @FromDate Datetime
Declare @ToDate Datetime
set @FromDate =
(Select min(S0.Docdate) from OINM S0 where S0.Docdate >='[%0]')
set @ToDate =
(Select max(S1.Docdate) from OINM S1 where S1.Docdate <='[%1]')
select * from
SELECT T0.itemcode,
min(T0.Dscription) as 'Item Description',
min(B1.ItmsGrpNam) as 'Item Group', W1.Whscode, C1.Location,
(isnull((
Select sum(isnull(inqty,0))
from OINM O1
where O1.itemcode=T1.itemcode
and O1.Warehouse=W1.Whscode
and O1.docdate<@FromDate ),0)-
isnull((
Select sum(isnull(outqty,0))
from OINM O1
where O1.itemcode=T1.itemcode
and O1.Warehouse=W1.Whscode
and O1.docdate<@FromDate),0)
) as [Opening Stock],
isnull((
Select sum(isnull(inqty,0))
from OINM O1
where O1.itemcode=T1.itemcode
and O1.Warehouse=W1.Whscode
and O1.docdate>=@FromDate
and O1.docdate<=@ToDate and O1.inqty>0
and O1.transtype in (20,18)),0
) as [Purchase Quantity],
isnull((
Select sum(isnull(outqty,0))
from OINM O1
where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
and O1.docdate>=@FromDate and O1.docdate<=@ToDate
and O1.outqty>0 and O1.transtype in (21,19)),0
) as [Purchase Return Quantity],
isnull((
Select sum(isnull(outqty,0))
from OINM O1
where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.outqty>0
and O1.transtype in (13,15)),0
) as [sale Quatity],
(isnull
Select sum(isnull(inqty,0))
from OINM O1
where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
and O1.docdate<=@ToDate),0
isnull((
Select sum(isnull(outqty,0))
from OINM O1
where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
and O1.docdate<=@ToDate),0)
) as [Closing Stock]
FROM OINM T0
INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode
INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod
INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode
INNER JOIN OLCT C1 ON W1.Location=C1.Code
Group by T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location
) a
where (a.[Opening Stock]
+a.[Purchase Quantity]
+ a.[Purchase Return Quantity]
+a.[sale Quatity]+a.[Closing Stock]
) !=0
Regards,
Bhavank -
Can i create credit note request with selling price,but without material no
hi
can i create credit note request with selling price, but without material no.? which item cat. i should choose?
thanksHi,
The price is controlled for any item category with the help of the Item Category setting (VOV7 tcode) that is, the field Pricing under Business Data section.
Select the option X in the Pricing field.
Now for your case, the setting will be greyed out. as it is a text item....
To make it for entering any option ....then change the option to A in the Item Type field.
Reagrsd -
Opening and closing stock with sales order and with out sales order
hello,
any body please help me my client want to check opening stock and and closing stock in areport.
material contains batch and some material with sales order and some are with out sales order. my client is asking this in a single layout. please tell me isthere any teport or bapi or function module to get this report.
this is very uregent. and layout is requesting like opening stock, production stock, sales stock and closing stock.
please guide me to get this report.
Thanks & Regads
BhaktaTransaction MB5B
For sales order related use specila stock as E and use radio button indicator in stock type
For stock w/o sales order, use special stock indiactor as "space' and stock type valuated stock.
to get a perticular month,opening stock/closing stock enter the start date/end date as month start and end date.
See the o/p which will give the stock as required by you -
Closing stock with storage location
i am using MB52 transaction to findout closing inventory in each storage location for given list of stores. It's not comming in proper format.
some plz let me know is there any other transaction by which i can get abaove report as per following format
ARTICLE CODE-STORAGE LOCATION-SITE CODE-VALUEHi Charan
u can use the T code MC.9
It will give teh clsing stock for a period
You can drill down to storage location level here
Thx
Vikrant -
Valuation class wise stock report for opening and closing stock
Dear all,
My Clint is asking the report for the opening stock and closing stock with respect to valuation class is there any standard report is available please guide me
regards
pramodDear sir,
in my case matarial is split valuated matarial, matarial is maintained with two valuation classes
when seeing the report MB5B its not showing the price valuation class vise, its showing combined together only, again i am using the MC.9 there also same problem its not showing both the valuation class vise price its showing only one valuation class price, if we check for another valuation class price for that particular matarial its telling no data is availabel for the valuation class
regards
pramod -
Opening and closing stock report
Hi,
i have to develop a report in abap of stock (Opening and closing stock) with each material, plant, business area & monthly date wise. I got some fields from mseg like material number, plant, business area but i didnt get fileds like opening stock, purchase, consumption & closing stock
in report fileds should be like
material number
plant
business area
posting date
opening stock
purchase
consumption
closing stock
kinldy help <removed by moderator>
Moderator message: Welcome to SCN!
Moderator message: please search for available information, ask a functional consultant near you.
[Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
[Asking Good Questions in the Forums to get Good Answers|Asking Good Questions in the SCN Discussion Spaces will help you get Good Answers]
Edited by: Thomas Zloch on Nov 21, 2011 3:35 PMYes umesh from external 99% of your stock from mvt 101, 501 is very rare case & 561 is not from external source it is initial stock updation which will be done only once when you are going live & later 561 mvt will be normally blocked for use.
You can also sort in MB5B more than one movement type click on multiple selection (that is on yellow arrow icon) & in single value tab enter mvt 101 below that 501.
This will give you report for mvt types 101 & 501 in this way you can also sort reports for more than one mvt type.
Regards
Rang
Message was edited by:
Ranganath Mysore -
Opening and Closing Stock -Calendar Day Interval
Dear All,
Regards.I got a requirement where I need to calculate the Opening and Closing stock -Daywise..Did checked the related threads which stated to create 2 Restricted KF's upon Calmonth.Hence i tried the same replacing Calmonth with Calday,but those 2 Restricted KF's are empty at the Query output level!!!!!!!!(Note : 0TotalQtystock shows the Closing stock by default)..It would be really helpful if someone could take time to update on this..
Manythanks
ArunHi,
Stock key figures are normally set to calculate closing stock with respect to time. e.g. day end stock, week end stock, month end stock.
To calculate Opening balance -
1. create a new calculated KF on your stock key figure with no calculations.
2. Set exception aggregation as "First Value" for this calculated key figure in the query definition.
3. Use this calculated key figure instead of main key figure.
This setting works for all the time characteristics present in the cube.
Regards,
Anup -
Opening and closing stock from mb5b
Hi Experts
I am writing a code which will display goods reciept, issue, transfer, etc according to movement type .
I have done the coding but the problem is I am not getting the opening stock by period , I want to get sum (lbkum) sum (salk3) into some formulae column .. I want to get the sum of lbkum from mbewh joining mseg,mkpf as period -1
ie if I select 04.03.2009 , I want the sum of stock from mbewh based on period -1 . so what formale I have to write
to get the opening stock on the date selected . The date range is selected from mkpf .
I want to get stock on whatever date selected from mkpf.
SELECT SINGLE * FROM mardh
WHERE matnr = p_matnr
AND werks = p_werks
AND lfmon = p_buper
AND lfgja = p_gjahr.
Regards
Pirozyou can get all data using MC.9 report
here you can get opening and closing stock with values based on material, plant, storage location
Kindly make sure while giving period
here it will take period in month and year i.e if you want opening stock for April then you have to give it as 03.2008 to 03.2008 and closing as 04.2008 to 04.2008
Regards
Edited by: WISH on Apr 23, 2008 1:15 PM -
Opening stock with subcontractors
Hello Experts,
I am doing a report on Opening and closing stock with the subcontractors...
My report's requirement is..
Mat. No. - ekpo-matnr
Part No. - resb-matnr
Opeining stock (for Resb-matnr) - ( movement type 541542543+544 from Mseg)
Please advice me how to calculate opening stock for the Parts as ekpo-matnr is linked to ekbe-budat
and I have to take the opening stock by linking mkpf-budat. And for single material (ekpo-matnr)
there will be multiple part no (resb-matnr) and I want the openinig stock for each part no.
Please advice...your help would be highly appreciable.
Thanks
R.Karthik.
Edited by: Karthik R on Feb 17, 2009 4:38 AM
Edited by: Karthik R on Feb 17, 2009 4:39 AMHi,
I want to multiply finished good menge with raw material menge , both the menge are from different
tables.
eg - A pen is finished good and its raw materials are top , refill etc.
Matnr (finished goods) = Pen , Menge = 2 and its corresponding raw materials are:
Raw mat1 - its Menge is 5
Raw mat2 - its Menge is 3
Raw mat3 - its Menge is 2.
Now I have to multiply these whole raw mat menge with finished goods menge ie 2.
But when I tried only the first line ie Raw mat1 is getting caluclated.
Please advice. -
DP91-Debit memo request -selling price
Dear Friends,
the client requirement is to bill the his customer based on the equipment and manpower utilized
Now i have created a contract - has assigned the DIP profile in item category and the WBS element is attached in contract item level
based on the utilization/confirmation the DMR is created in DP91, there it is fetching only the cost which was maintained in KP26 and it is capturing thorough EK01 condition type. this subsequently copying to billing
I need to bill the customer with selling price, not the cost
in pricing procedureThanks for your explanation santhosh
In normal sales VPRS is the cost price of matrial
Here RRB EK01 is the cost of the activity/service , am i right santhosh?
one more thing, for working hours of manpower, in condition record per hour rate is maintained,
can i push only the quantity/working hours from Project systems?
example:
per hour rate is 15 USD in VK11 maintained
From WBS 10 hours is coming to DMR, so system will calculate automatically 150 USD in DMR
is it possible ? If yes , where is the configuration?
please help me to solve my issue
Regards,
pratheep -
Closing stock report with GRPO
Hai all
Please help me to write this query,
For example
I have query to take closing stock report ,but my requirement is ,i want split up for Closing stock and closingvalue
like, if i have 40 closing stock means i want details how 40 is arrived
for example i run closing stock report as on 2009-03-31
means i want this format
Itemcode ClosingStock Closing value
ITM001 40 460
ITM002 20 210.......
ItemCode GRPOno. VendorCode quantity Rate GRPO Date
ITM001 10001 V0001 10 10 2009-02-01
ITM001 10002 V0002 20 11 2009-03-15
ITM001 10003 V0003 10 14 2009-03-31
ITM002 10021 V0011 10 10 2009-02-11
ITM002 10022 V0015 10 11 2009-03-14Hai Jeyakanthan A
I want small change in your query
SELECT T0.ItemCode,T0.TransType, SUM(T0.InQty)-SUM(T0.OutQty) AS 'Closing Stock',SUM(T0.OpenValue) as 'Balance' FROM OINM T0
*where docdate <= '[%0]'*
GROUP BY T0.ItemCode,T0.TransType
Having
T0.TransType = 20 ORDER BY T0.ItemCode,T0.TransType
I tried this query for taking closing stock for given date, its giving me correct result
SELECT T0.ItemCode, T0.Ref1, T0.CardCode, T0.InQty, T0.Price, T0.DocDate FROM OINM T0 WHERE T0.TransType = 20 AND
(T0.DocDate >= '[%0]' AND
T0.DocDate <= '[%1]') ORDER BY T0.ItemCode, T0.Ref1, T0.CardCode, T0.InQty, T0.Price, T0.DocDate
In this query i want only the GRPO no,date,price.... for closing stock quantity
Edited by: Prasanna s on May 14, 2009 12:39 PM -
Comparing prices for a BOM with selling and distribution price
Good day
I have been working on a query to bring information for a crystal report required by a client they want to compare the finished BOM with the selling price or distribution price of that BOM. I am not understanding a scenario where this BOM is sold to a particular BP price will definitely vary with BP depending on the terms and special prices. Can anyone help me enhance my query to have valuable results.
SELECT
Distinct T0.Father AS [BOM Product N0.],
T0.Code AS [BOM Item Component],
T2.ItemName AS [BOM Description],
T0.Quantity AS [Component Qty],
T0.Price AS [Comp Cost],
(Select (t3.Factor * t0.Price * t0.Quantity)
from OPLN t3
where t3.ListName = '1.selling price' ) [Selling Price],
(Select (t3.Factor * t0.Price * t0.Quantity)
from OPLN t3
where t3.ListName = '3.distPriceList' ) [Distribution Price],
T0.PriceList AS [Comp Price List],
T1.ListName AS [Price List Name],
T2.AvgPrice
FROM ITT1 T0
INNER JOIN OPLN T1
ON T0.PriceList = T1.ListNum
INNER JOIN OITM T2
ON T0.Code = T2.ItemCode
Where T2.ItmsGrpCod NOT IN (101,110,105)Hi,
Special price is in OSPP / SPP1 /SPP2 tables. Check the table to find the link.
Thanks,
Gordon -
Material wise reciept and Issue report with Opening and Closing Stock
Hi
I need a report,Material wise Receipt and issue with Opening and Closing stock.Is there any standard report available in SAP ?
Or we have to go for Customised Report.
Please replyHi,
MB5B gives total receipts - if i click on the receipts i can view the multiple material documents - BUT is there any way to drill down the reciepts or view the breakup of the receipts on the same screen OR is there any other report for this.
Regards,
Laxmi -
Reports for Itemwise ageing and Stock with opening and closing
Dear All,
Is there any default reports in SAP for Item wise ageing and the stock status with
opening stock,In and Out stock and closing stock
for a given period.
Regards,
ShyamHi,
Thanks for the quick reply.....But is there any accurate query for that....Bcoz i found a query which shows the qty but nothing is coming in the value...
Regards,
shyam
Maybe you are looking for
-
When i boot up my mac mini on my bedroom TV...
there is no picture on the screen. But if i turn it on then off on my living room tv THEN turn it on connected to my bedrrom tv it works fine, untill I turn it back off again, any suggestions?? Ive just upgraded to Mac OS X Lion, and im using an HDMI
-
What's a good calendar service to use with iCal on iPhone and mac?
Sometime around iOS 7 and Mavericks updates, my Google calendar stopped playing nice with iCal on my phone. I'm wondering what other people are doing. I don't know whether it was Google or Apple that caused the issue, and I'm not too fussed either wa
-
Dbms_errlog permissions
Hi All, Can Some help me understand the issue for the below situation: DB Version Oracle 10G R2. I have created Table t in Schema A Created errlog table for t using dbms_errlog.create_error_log Created synonym for t and and public synonym err$_t and
-
Auto-printing a pdf to a printer name stored as variable?
Hi, I have an app that creates two different documents, both of which need to be printed. One is a letter-sized pdf, the other is a 4X6 label, also pdf. They need to be printed on different printers - the letter-sized one on a regular office printer,
-
Hey, I can't view some content of certain websites on any browser. I'm running on 10.9.2 and I have tried this on Chrome, Firefox, Opera and Safari and nothing seem to work. For instance, I can't view the videos on 11secondclub.com or login to digita