Skip to Content
Technical Articles
Author's profile photo Uladzislau Pralat

MB5L Transaction CDS View Equivalent

It is a common requirement to build custom reports base on MB5L transaction data (List of Stock Values: Balances). There is no CDS view equivalent to get this data. SAP offers  C_StockQuantityCurrentValue (Current Stock Quantity and Value) CDS view, but it is lacking Company Code and Account details. In my blog I explain how to add missing details to SAP standard CDS view.

As you can see from SAP documentation C_StockQuantityCurrentValue (Current Stock Quantity and Value) CDS view does not provide Company Code and G/L Account details

With some technical and functional knowledge it is easy to add missing details to standard view.

All it takes is to:

Create CDS view linking Company Code and G/L Account data

 

Propagate ValuationClass field in Current material price by cost estimate views

 

Lookup up Company Code and G/L Account data by ValuationArea and ValuationClass

 

Propagate Company Code and G/L Account in all subsequent CDS views

 

You can download CDS views from GitHub:

ZP_CompanyCodeGLAccount

ZP_CurrentMatlPriceByCostEst2

ZP_CurrentMatlPriceByCostEst1

ZI_CurrentMatlPriceByCostEst

ZI_MaterialStock

ZP_MatStkQtyValCur3

ZP_MatStkQtyValCur2

ZP_MatStkQtyValCur1

ZI_StockQuantityCurrentValue

ZC_StockQuantityCurrentValue

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jelena Perfiljeva
      Jelena Perfiljeva

      Nice post and thanks for sharing the code!

      Hint: for sharing on Github, it's easier to gather all code under one project and then it's just one link to share.