Skip to Content

Input parameters and Variables are two diferent mecanism that HANA provide us to get interaction with final users.

In some cases, we need to include an input parameters / Variables with value help with the propose of provide more information when user have to choose an input value.

In this post I’m goint to explain the steps to create a custom value help and some tips that you have to take in mind to get start with this topic.

 

To learn more about input parameters and variables check this post out: Input parameters and variables in SAP HANA modeling

 

Assumptions

I’m going to assume readers has HANA envairoment with SAP ECC tables replicates (like SAP ECC on HANA,  or SAP ECC – SLT – HANA)

We use HANA 2.0 SP01 with Eclipse Neon (4.6.3) to do this tutorial

Problem phase:

Requirement

Customer needs a report where he can identify how many materials are there by material type.

 

Analysis

We know that this basic information of materials are in MARA table, so we need to develop a HANA view (Calculation view), count materials by material type and add material type value help as an input parameter.

 

Solution phase:

Create calculation view

 

We created a calculation view called CV_001_MATERIAL_BY_MATTYPE

Here we need to add MARA table as a projection and select MANDT, MATNR, and MTART fields

 

After that we need to creat a counter, so open Agregartion and add all fields to output

Now in the output section, create a new counter (by material) in calculated colums

Now before create an input parameter we need to have a value help HANA view, so, lets go to create it.

 

Create calculation view for value help

CV_0002_MATTYPE_VALUE_HELP

 

Here we need to perform a text join with T134 (Material typs) and T134T (Material type text)

 

 

Now it is an importat step, we need to add in semantics, a label colum info for material type field

With this our Value help view is ready, so activate it (Dont forget add a measure field, like counter, to activate the view)

 

Implement input parameter with custom value help view

In CV_001_MATERIAL_BY_MATTYPE‘s semantics choose Parameter/Variable tab and create an input parameter

  • Name: I_MaterialType
  • Label: Material type
  • Parameter type: Column
  • View/table for value help: use  CV_0002_MATTYPE_VALUE_HELP
  • Reference column: choose MTART field

 

Finally we need to add a filter with this parameter, so open MARA projection and apply a filter in MTART field

Thats it, if we use the data preview, we can see that the value help is working fine

 

by choosing ZSER material type we can see there is 11 materials created with this type

 

What about variables?

Is the same process, just choose variables insted input parameter and apply the same steps

 

Conclusion

The value help functionality is very important to take in mind when you are creating any kind of reports. This could be usefull when users are trying to find the correct input value to run our reports, and we need to be able to provide this tools to ensure our reports are, intuitives and easy to use

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply