Material Stock and Valuation History Tables in SAP

You might also like

Download as pdf
Download as pdf
You are on page 1of 15
97252018 Material Stock and Valuation History tables ~ how to read them | SAP Blogs Home Community / Blogs + Actions Material Stock and Valuation History tables — how to read them June 6, 2013 | 26,727 Views | Jairgen L more by this author MM (Materials Management) SAP ERP | batch | closing period | ebew extend | ebewh | enterprise resource planning | history | mard extend G+ sha fF share WF tweet jin. share Follow RSs hitpsblogssap.comy2013/08/06imaters-stock-and-valuaion-hstory-tables-how4o-read-thom as. 97252018 Material Stock and Valuation History tables — how to read them | SAP Blogs All stock and valuation tables in SAP have as well history tables since release 45, All those tables have the same name as the standard tables, but with a H at the end. [Standard table] History table] Function module Materiel Valuation MBeW MeewH — |weew_exTeND [Storage Location Data for Material [MARD Maro |MARD_exTEND Batch Stocks McHE McHeH — |acHB_exTEND Project Stock Valuation losew losewh — [asew_exteND [Special Stocks with Customer [MSKU sku |sku_extEND [Special Stocks with Vendor [MSLB Mss [suB_exTEND [sales Order Stock Valuation | EBEW EeewH — |eBew_exTeNo [Special Stocks from Vendor |KOL IwkotH — |wkot_exTeND Project Stock MSPR MsPRH — |sPR_exTEND Material Master Plant data MARC MARCH |MARC_ExTEND land some more This was implemented to speed up the period closing. But how these tables are updated is for many users cumbersome, they expect to see a record for each month in those history tables, but SAP does it differently. SAP explains the logic in Note 193554 - Stock/valuation data of previous periods still we can see in many discussions that this note was not fully understood. SAP does not update the history table when you execute MMPV to close the MM period The History tables are updated with first movement after a period closure. If there is no movement for several months, then you will not see any history record for all those months that have past. SAP writes only a history record for the month preceding a change in stock or value. hitpsblogssap.comy2013/08/06imateral-stock-and-valuation-istory-tables-how-4o-read-themy 205 97252018 Material Stock and Valuation History tables — how to read them | SAP Blogs All the periods between 2 records in a history table had the same stock/value all the time, hence you can take the value for those periods from the record following these missing periods. Here we see 8 history records for the valuation data MBEW of one material in one plant, created over a time span of 5 years: many would expect to see 60 records for 5 years, but we had only 8 months with changes in those 5 years, hence only 8 history records were created. acm | so00"000200000%260| zac ocr fsa savor sooosaoesaoean 260 xe oor fia 39.613, 000 |soooonoesaoean260| =e oo8 fos sss.eta,ou0 | 9.560.300, 08 F2eoceo0t000%0%200| sae ace for | 3.css-eo3jc00 | 216-540. 300, 00 Peccueocgo00a%s360| 28 oes fiz | 3.ces-ensena so0o2000200000%260| zac ost |i | sareosyena | tuecasecasr,e8 se¢o"000%00000%260| ze out fos | scosrensjeca | t1ecase.2ar, 23 And as proof a screen shot from MB51 Material Document list for the same material and plant hitpsblogssap.comy2013/08/06imateral-stock-and-valuation-istory-tables-how-4o-read-themy 97252018 Material Stock and Valuation History tables — how to read them | SAP Blogs ‘Material Document List 44> @¥0 69 @HS BX BSR 41 4999009010 2 fear se uses a ‘04.2008 “100-000 70 ZRAG S51 4900034874 1 20.12.2007 eee ee foot lament te Sd timmtes — Weenie ae eae — ee nn Se timmtent songtsiaa ee zRRc 101 50000118111 29.05.2007, 1.000 70. 3 JZRAC 601 4900034941 1 29.05.2007 Emm Se deere — ee Saeco : is oo: tapos: — «eae oo ao es — eee on You can see that the first movement to this material happened on May 22, 2007. This event triggered the creation of the history record for period 004 2007. The history record tells you that the stock and value for this material was zero at the end of April 2007 The next month with movements was December 2007, which caused a history record for November 2007 The movement from April 8, 2008 triggered the creation of 2 history records: for period 003 2008, and because there was a year change in between a record for period 12 2007 The movement type 301K (marked yellow) did not trigger any update in MBEWH table, because consignment stock has no value, hence no change to valuation, which means MBEW table is not affected. Finally we have movements in May 2011, and the first movement caused the creation of year end records of 2009 and 2010 and for hitpsblogssap.comy2013/08/06imateral-stock-and-valuation-istory-tables-how-4o-read-themy ans 97252018 Material Stock and Valuation History tables - how to read them | SAP Blogs the previous month 04 2011 Ifyou need to develop own ABAP reports with month end stock then you have to make use of function modules that understand this complex logic. The name of these function modules is starting with the table name followed by EXTEND (see table) To retrieve previous period data for all materials in valuation area ZRAG the coding should be like that select * from mbew into table mbew_tab where bwkey = *zRaG’. call function ‘MBEW_EXTEND’ exporting xvper tables mbew_tab = mbew_tab. Please read the SAP Note 415349 — Usage of modules XXXX_EXTEND for previous period values for detailed information because the function modules are not released Alert Moderator hitpsblogssap.comy2013/08/06imateral-stock-and-valuation-istory-tables-how-4o-read-themy sis 97252018 Material Stock and Valuation History tables - how to read them | SAP Blogs 27 Comments ‘You must be Logged on to comment or reply to a post. g Former Member June 7, 2013 at 4:45 am Very helpful Thank you. 3 Former Member June 12, 2013 at 9:12 am hi Jurgan, Thank you very much for giving conceptual clarification.. As per my understanding/study, the stock and value updated in history table for one perticular material is same as of closing stock and value which we can see in MBSB for that material at month end date. Regds, Nilesh g Former Member July 25, 2013 at 6:53 am Ihave been searching this information for long time. Thank you for your explanation Regards hitpsblogssap.com2013/08/06imateral-stock-and-valuaion-isory-tables-now-4o-read-themy or 92572018 Material Stock and Valuation History tables — how to read them | SAP Blogs Christian A Mehmet Ozgur Unal August 17,2019 at 1:20 pm thanks jurgen , this tables are as same as CO tables CKMLCR-CKMLPP i wiss, i could read stock and value updated based on day M.Ozgur UNAL } Mohsin Abbasi October 7, 2013 at 8:33 pm Hi Jurgen, Amazing One. e@ Best Regards Mohsin Abbasi 6 PRASOON AK January 3, 2014 at 6:43 pm Hi Jurgen. Very informative and simple presentation ‘Thanks for sharing Regards, AKPT hitpsblogssap.com2013/08/06imateral-stock-and-valuaion-isory-tables-now-4o-read-themy ms. 92572018 g Material Stock and Valuation History tables — how to read them | SAP Blogs @ Jirgen L_ Post author January 3, 2014 at 6:58 pm Thanks, that is my aim: to explain complex things in a way that it can be understood by everyone. | do not lke the doctor language of explaining things extra complicated to preserve the status of a special breed Former Member January 3, 2014 at 7:08 pm Excellent collection of tables, Good information thanks! Also you may wish to use MBSB. Report (RMO7MLBD) to inventory report beyond current and past period. ‘Sunil Wawdhane Jiirgen L_ Post author January 11,2014 at 10:00 pm 50 is the correct quantity Remember, the table is MBEWH which means valuated stock the receipt of 2 is not to stock, there is no storage location, itis a receipt to a PO with account assignment. Former Member March 3, 2014 at 9:31 am Great document! Thanks for sharing! hitpsblogssap.com2013/08/06imateral-stock-and-valuaion-isory-tables-now-4o-read-themy ans. 972572018 Material Stock and Valuation History tables — how to read them | SAP Blogs 3 Former Member March 12, 2014 at 8:08 am amazing, quite a good one. Thanks for sharing. 3 Former Member Apri 25, 2014 at :57 am Hi Jurgen, ‘Thanks for sharing this document, It helps a lot to understand this complex picture, Ihave one thing to ask what yo mean by receipt of 2 is not to stock , itis receipt toa PO with Account assignment. What is the difference between them. Thanks, Manish g Former Member Fobruary 10, 2015 at 8:49 pm A tle bit late but; when making a Goods Receipt that comes from a PO with acount assignment the “destination” of the material being received is not the Warehouse (or what you called “not to stock’), ‘The destination of that material is what the user indicated in the account assignment field in the PO, some of those account assignment “objects” are (as configured in my system): A. Asset B_ MTS prod /sales ord. C Sales order D_ Indiv.cust/project hitpsblogssap.com2013/08/06imatersl-stock-and-valuaion-isory-tables-now-4o-read-themy ons. 92572018 Y Zz One good example is a purchase directed to a Cost Center (ky); the value of the purchase will affect directly the Cost Center indicated in the PO, and you won't see quantity being received at any storage location as those “goods” where delivered directly to the responsible of that Cost Center Material Stock and Valuation History tables - how to read them | SAP Blogs Ind. cust. w. KD-CO Order MTS prod project Third-party GR mand Cost center Ind. cust, wlo KD-CO Network Project Proj, make-to-order Services 2 Way match ‘All new aux.ace."*. Unknown All aux. w/ GR mand. Vendor Consignment All aux acct.assgts Third-party Order MTO valuated with RA (business area). Regards, Adrian 3 Former Member Apri 25, 2014 at 5:04 pm very useful document hitpsblogssap.com2013/08/06imateral-stock-and-valuaion-isory-tables-now-4o-read-themy sons 972572018 Material Stock and Valuation History tables — how to read them | SAP Blogs g Former Member May 23, 2014 at 8:32 am thanks a lot, 3 Former Member June 3, 2014 at 3:30 am Helpful! Thank you~ ® Chu Tien Thanh September 16, 2014 at 7:23 am Very useful, thanks alot 3 Former Member February 16, 2016 at 9:07 am Hello Not sure if I missed the point above, but is it possible to read historical stocks (say, 2 years ago) directly through the FM MBEW_EXTEND or MARD_EXTEND? Is there any option programmatically to read these stocks? SAP standard has reports like MB5B / MC.9 etc that can help out; however, often we need to fetch these values in a report; is there an API available that could help us here? Thanks Asi hitpsblogssap.com2013/08/06imateral-stock-and-valuaion-isory-tables-now-4o-read-themy ss 92572018 Material Stock and Valuation History tables — how to read them | SAP Blogs @ Jiirgen L_ Post author Fobruary 16, 2015 at 9:16 am Do you not consider function modules as programs? MBEW_EXTEND can read 2 year old stock, MARD_EXTEND cannot. From OSS note 415349: Not all function modules can calculate these periods. Correspondingly not all function modules have all four parameters. 3 Former Member February 16, 2016 at 10:32 am Hello Juergen ‘Thanks for your note. | meant if these FMs can't do it, is there any other option programmatically? ‘Coming back to your point on the FM MBEW_EXTEND, could you tell me how we could read old stocks thru this FM. | tried using this FM with all different parameters and passing the current row from MBEW in MBEW_TAB as advised in the Note 415349, but it kept retuming me the same line item. Do we need to go back period by period? Let's take an example, the MBEW record I have is for 03/2014, and the last record in MBEWH is for 02/2014. Can I read 02/2012 stock through this FM directly? Regards Asijit g Former Member March 4, 2016 a 1:40 pm hi anit hitpsblogssap.com2013/08/06imatersl-stock-and-valuaion-isory-tables-now-4o-read-themy 2s 9psiz0%8 Matriol Stock and Valuation History tables ~ how to read them | SAP Blogs i got the same issue. get sales order stock ‘quantity to a given date in the past ( period ). if you need the coding just answer. i know, its a ile bit time past @ regards, Simon «¢ Jiirgen L_ Post author March 1, 2016 at 10:25 pm The first March posting should create this February entry, if it was posted in the March period and not backdated to post in February period. First search for OSS notes, if there is no suitable then open a call yourself g Juwin Pallipat Thomas March 2, 2016 at 8:15 am Sorry Jurgen, | thought my question was in an inappropriate place and hence had deleted my comment before you could reply. For the readers, Jurgen was replying to my following query: We had some materials + batches, where we found that the history table entries were missing eventhough the ‘st transaction in the new period has happened. | was asking him why this would have happened and if| should log a call to SAP for fixing this. | logged an incident with SAP and they confirmed my finding that the history table entries were in fact missing. They created the missing entries manually. Thanks. hitpsblogssap.com2013/08/06imateral-stock-and-valuaion-isory-tables-now-4o-read-themy 138 92572018 Material Stock and Valuation History tables — how to read them | SAP Blogs g Former Member March 16, 2046 at 5:24 am Dear Jurgen Sir, Really appreciated article and very informative...not only for functional it also very useful from technical perspective too. Regards, Vivek 3 ‘Andreas Lindholm November 23, 2016 at 11:50 am Hi Jurgen. Is this the post you refered to in my deleted question regarding Historical values of customer consignment stock? «¢ Jiirgen L_ Post author November 23, 2016 at 12:01 pm No, not directly as this is just about month end stocks and how the records in the historic tables work, You were looking for a transaction, you can just copy your subject line into Google to find what you asked for. g Dammah Sebiyam February 16, 2017 at 1:42 pm Hi Jurgen, hitpsblogssap.com2013/08/06imateral-stock-and-valuaion-isory-tables-now-4o-read-themy sans 92572018 Material Stock and Valuation History tables — how to read them | SAP Blogs Guten Tag, Ineed a pointer here. | got my developer write a cade in HANA to generate inventory (Valuated stock) from MBEW, MBEWH, EBEW, EBEWH, CKMLCR ete. Basically to generate period end inventory values, When this report is run for current period for a plant the values tie with GL. The difficulty is running it for previous periods like behavior in MBSL or S_P99_41000062 or any other inventory report, What are key fields SAP is using to look up or loop back for values in these tables for previous periods. We tried MBEWH-LFMON, MBEWH-LFGJA. Any pointer as to how my developer can code into HANA so when a report is run for say, previous period, logic able to determine last value for each stock in each plant and retum the same? Thank you Share &FolwQ@ © OO 6 @ w& Privacy ‘Terms of Use Legal Disclosure Copyright Trademark Cookie Preferences Sitemap _ Newsletter hitpsblogssap.comy2013/08/06imateral-stock-and-valuation-istory-tables-how-4o-read-themy 1515

You might also like