I previously explained how to Display Short Material Product Hierarchy Level Keys with ABAP CDS Views. But what if you want to use short Material Product Hierarchy dimensions instead of hierarchy levels? Displaying dimension is not an issue, but how to filter dimension by short key value? If this question challenges you, then my new blog is for you.
There is one line of code solution for this problem. It is often like that with SAP development. The biggest challenge is where to write that single line of code and what that line should be.
In our case the line of code is in ABAP CDS view dimension’s data element’s domain conversion route input function module. And the line of code is adding leading asterisk (*) before short dimension value key.
The line of code does the trick converting dimension short key value into pattern selection
For the sake of completeness, here is conversion route output function module. It takes care of displaying short Material Product Hierarchy dimension keys
This is how Material Product Hierarchy dimensions are defined
For ease of Material Product Hierarchy dimensions use, I also recommend to extend I_Material dimension CDS view
It is easy to define Material Product Hierarchy dimensions referring to I_Material attributes
Source codes can be downloaded from GitHub:
P.S. In case Patterns/Wildcards in prompts are not enabled in your Analysis for Office installation, please add <OperatorContainsPattern value=”True” /> string to your Analysis for Office configuration file C:\Users\<user name>\AppData\Roaming\SAP\Cof\Ao_user_roaming.config
Source: sap.com
No comments:
Post a Comment