Closing Stock of a Material
If I know the Material Code and Plant then how can I determine the closing stock of that material for a particular date?
I know that from the table MARD I can get the value of today's closing stock. But how can I know any other days closing stock.
This is very urgent.
Regards,
Subhasish
Hi
Check this out.... <b>Though this is for Opening Stock</b>, you can have receipts and issues in that period for the material and then calculate the Closing Stock.
*& Form GET_OPENING_STOCK
******* USE THIS LOGIC FOR GETTING OPENING STOCK OF A BATCH ******
********** THE WAY ITS DONE (TO SOME EXTENT) IN Trxn MB5B **********
**************** VERY USEFUL TO GET STOCK FASTER **************
FORM GET_OPENING_STOCK .
DATA: TOTAL TYPE P DECIMALS 3.
CLEAR OPTOT.
REFRESH: IMARD, G_T_MSEG_LEAN.
CLEAR: IMARD, G_T_MSEG_LEAN.
*- Select data from IMARD
SELECT * FROM MARD INTO CORRESPONDING FIELDS OF TABLE IMARD
WHERE WERKS = P_PLANT-LOW
AND MATNR = OPBAL-MATNR.
IF SY-SUBRC = 0.
READ TABLE IMARD INDEX 1.
IF SY-SUBRC = 0.
TOTAL = IMARD-LABST.
ENDIF.
ENDIF.
*- Select data from MSEG and MKPF
SELECT
MKPF~MBLNR
MKPF~MJAHR
MKPF~BLART
MKPF~BUDAT
MKPF~CPUDT
MSEG~MATNR
MSEG~WERKS
MSEG~LGORT
MSEG~CHARG
MSEG~SHKZG
MSEG~MENGE
INTO CORRESPONDING FIELDS OF TABLE G_T_MSEG_LEAN
FROM MKPF AS MKPF JOIN MSEG AS MSEG
ON MKPFMANDT = MSEGMANDT AND
MKPFMBLNR = MSEGMBLNR AND
MKPFMJAHR = MSEGMJAHR
WHERE MSEG~MATNR = OPBAL-MATNR
AND MSEG~WERKS = P_PLANT-LOW
AND MSEG~CHARG = OPBAL-BATCH
AND MKPF~BUDAT GE P_DATE-LOW.
SORT G_T_MSEG_LEAN BY WERKS MATNR CHARG SHKZG DESCENDING.
IF NOT G_T_MSEG_LEAN[] IS INITIAL.
LOOP AT G_T_MSEG_LEAN.
IF G_T_MSEG_LEAN-SHKZG = 'H'.
TOTAL = TOTAL + G_T_MSEG_LEAN-MENGE.
ELSE.
TOTAL = TOTAL - G_T_MSEG_LEAN-MENGE.
ENDIF.
ENDLOOP.
*- Assign Stock
OPTOT = TOTAL.
ENDIF.
ENDFORM. " GET_OPENING_STOCK
Regards,
Raj
Similar Messages
-
FM for Opening And Closing Stock for Material
Dear All,
I need to Calculate the opening and closing stock of the material. If there is any FM for the same just let me know and if not kindly let me know the way out.
Regards
AmitHi!
The closing stock can be found in the MARD table.
And the opening stock should be always zero.
I think you wanted to know the yearly/monthly closing/opening stocks, then you have to gather all material documents from MKPF, MSEG tables, and calculate the stock, using the actual stock and subtract/add (depends on the movement type) the material document's quantity, until the given date.
I don't know any FMs for this, maybe someone could tell you one...
Regards
Tamá -
Dear all
Using MC.9 transaction we will get the closing stock of a material in any date directly.I want to know that from which table we will closing stock of a material in a particular date.From MBEW we will get current stock only but ieed the closing stock of a particular date..Help me if u have any idea..
Regards BIJU K SHARMAclosing stock showing in MB5B report for that date with the same filter conditions.
In closing stock u have to consider Stock.Avail. @ my hands
search for table MARD in that MB5B
refer.
Re: closing stock of a particular date -
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 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 of a particular date:Function Module
Hello Experts,
I m developig a report in which I want Closing Stock amount of a particular date.
Is there any funtion module for this, as in tables S031, mard I m getting Closing Stock as on date.
Pls suggest
PriyankaHi Priyanka,
I didnt find any function module for this purpose.
You can create your FM for this purpose.
You can refer following thread for the reference:
Re: closing stock of a particular date
Closing Stock of a Material
Re: Stock on a particulare date
Hope this will help.
Regards,
Nitin. -
Stock of a material as on given date
Hi all,
Is there any function module or any BAPI to calculate the opening and closing stock of a material as on the given date, based on which a customizing report is to be developed.. There was a Transaction MB5B to know the as on date stock, but it's taking longer time to use it in customizing report.Please let me know if any BAPI or any F.module is there to find the stock of a material as on given date.
Thanks in advance.
Edited by: Jaya on Apr 23, 2009 9:15 AMHi,
Try to develop a report using the logic of MB5B report and minimize the selection criteria
Regards,
Vikas -
Closing Stock For Each Period in Inventory Infocube
Hello Guru's,
Can we have closing stock of each material for entire period in Invnetory Infocube ? or through any logic or transformation routine can we create this keyfigure at infocube level ?
I know that to get Closing Stock ( Opening Stock + Goods Receipt - Goods Issue), we have to have Opening Stock as well for each month. in 0IC_C03 infocube, we only have Goods Receipt Qty and Goods Issue Qty keyfigures. We don't have Opening Stock and Closing Stock keyfigures as those are calculation which works during run time of query but still we want to have this information at Infocube Level.
Do please let me know your thought as i appreciate your help in advance.
Regards,
Komik Shahhi,
I will check that t code.
thanks and regards,
Devina -
Material opening and closing stock for a given day- Tables or FM
Dear Friends
i have to make a report , related to Material opening and closing stock for a given day , i check the T-Code- MB5B ,
it is not giving correct date . is any functional module is available ? . i checked some table like mbew , mard . it is also not giving correct requirement . Please helpHi
Goto transaction MC.9, Give your Material and,Plant and the date which you need to know the closing stock. Do make sure that in the high and low values you are giving the same date there. I guess no such FM are available for this. You can refer the [Link|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=15856] for some help.
Regards
Vinodh
Edited by: Vinodh_AN on Dec 15, 2010 9:19 AM
Edited by: Vinodh_AN on Dec 15, 2010 9:25 AM -
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 -
Tables/FM for opening/closing stock for material on given posting date
Hi All,
I had requirement of find the opening/closing stock for material on given posting date. The values we can find out using TCode - MB5B.
But I cannt use MB5B to extract data because I need to find detials for thousands of material.
Can you please adivce if their is any FM or tables through which i can find this detial on any given date apart from current date.
Thanks & Regards,Hi,
[https://forums.sdn.sap.com/click.jspa?searchID=19631709&messageID=6593903]
[https://forums.sdn.sap.com/click.jspa?searchID=19631709&messageID=6630975] -
Report of daywise Material/Vendor closing stock
Dear Friends,
there is a requirement of stock report of closing stocks for each day in a month. Suppose a month has 31 days then the report will show 31 lines for each day closing stock in one go for a single material.
Similar to vendor also. If we select a vendor for a particular period it should show 31 entries for each day's closing stock at vendor level.
Rquest to find some ways for the report.
Regards,
ASKTry to create a custom Report as per your requriment , also check the std report ME80FN it may help you.
-
MB5B Report table for Open and Closing stock on date wise
Hi Frds,
I am trying get values of Open and Closing stock on date wise form the Table MARD and MBEW -Material Valuation but it does not match with MB5B reports,
Could anyone suggest correct table to fetch the values Open and Closing stock on date wise for MB5B reports.
Thanks
Mohan MHi,
Please check the below links...
Query for Opening And Closing Stock
Inventory Opening and Closing Stock
open stock and closing stock
Kuber -
Hi,
We have a requirement in which a Customized report has to be developed. The report needs to display the opening stock , Total reciept, consumption and closing stock for supplier wise material.
We came across a standard report MB5B in which all these values are available. However inorder to display these values in a customized report we require a standard function module. Please provide us a std function module that can solve the purpose.
If the std module is not available (i dnt come across one) kindly porvide an alternaitve for the same.
Regards,
Milan ThakerHi,
Use Submit Statement to get the output data from MB5b.
Ex:
Create selection screen with required filelds and use like this
SUBMIT RM07MLBD with MATNR in r_matnr
with LGBST eq ''
with BWBST eq 'X'
with datum in datum
with bukrs in bukrs
with werks in werks
with lgort in lgort
with charg in charg
with bwtar in bwtar
with bwart in bwart
Rgds
Aeda -
Opening Stock and Closing Stock Calculation
Hi,
My report requirement is to display the material, opening stock for the lower date, closing stock for the higher date and the in between all stock operations..how to fetch the opening stock and closing stock for a particular material ???.. what are the tables and fields for calculating them??..
Thanks,
Sri
Edited by: Sri on Feb 13, 2009 8:33 AMHi
We have done a similar reports. One showing opening stock/Closing stock and another one showing all the transactions for a particular day. What we did was we developed a program to fetch data from MARD table for unrestricted, blocked & Qulaity stock(Our requirement talks only about these 3 stocks). And we scheduled the program exactly at system time 00.00 hrs with A class job.(today's closing day stock is nothing but tomorrow's opening stock)
And for the second report which needs to pick all the transaction for a particular day, we picked it from MB51 entries. It is nothing but query between MKPF and MSEG.
I hope this helps.
Maybe you are looking for
-
Set filename for file download
Hi i have a servlet that sends a file to the client to be downloaded. When the client requests the file the dowload dialogue pops asking if the user wants to download/open but the name of the file is always the servlet name were it originates. Is the
-
Installing AS Java in a multihomed server environment
Hi SDNers, We are about to install a BI, EP and SCM Development environment and we're considering using a server network to handle the communications between the servers so that it doesn't 'hit' the client network. I read an old SAP Network Integrati
-
Sync from OVI Nokia Suite 3.8.48
My Nokia phone broke with all contacts on it, non on the SIM. I have it dayly syncroniezed (bluetooth) with OVI but my last backup .nbu is from January this year. Is there any way to get the contacts stored in the OVI suite back on my new phone? Than
-
Unable to start weblogic(OSB) server in OEPE
Hi, I have oepe-wls-indigo-installer-11.1.1.8.0.201110211138-10.3.6-win32 for OEPE and osb_generic_11.1.1.7.0 for OSB.when I add server (weblogic 10.3 ) to eclipse its showing authentication failed and I am not able to start server. Any help is appr
-
How much better is VBR 2 Pass than VBR 1 Pass or CBR?
Hi, I had a 2 hour and 40 minute wedding on a Premiere Pro CS 5.5 Timeline. (I exported it as a QT Reference File from Final Cut Pro 7) I added my Encore Chapter markers in PPro and went File ----- Export ---- Media. Media Encoder opened and I set my