cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic list report on UI based on value help

ramesh_putta
Participant
0 Kudos

Hi,

I need to build the dynamic list report on the UI using the CDS views and restful ABAP model.
The list report should be built based on the values selected on the value help parameter.

For example, I have Item1 and Item2 in the value help. And lets say each item will have their own masterdata tables.
When the user selects Item1 from the value help, it should read from the Item1 masterdata tables and display as list report and
when the user selects item2, the list should come from item2's master data tables.
And please note these masterdata tables are not DDIC tables, they are HANA tables.

Appriciate any inputs here are would be great if you could point me to any existing examples.

Accepted Solutions (1)

Accepted Solutions (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

What you must use is a custom entity. Since the data is not part of DDIC table you have to use ABAP code to retrieve the same. This concept is also called an "unmanged query". Custom entities use an ABAP class that implement the 'select' method of the interface if_rap_query_provider.

Query Runtime Implementation - SAP Help Portal

Assuming that both master data tables from item1 and from item2 do have the same structure you could create a custom entity that has these fields.

In my RAP Generator I am using custom entities as value helps. For example a value help that shows the fields of different data source types (tables, CDS views, abstract entities).

The code uses different API's to retrieve those field names but returns it always in the same structre.

Custom query implementation class

cloud-abap-rap/zdmo_cl_rap_gen_get_data_src.clas.abap at main · SAP-samples/cloud-abap-rap (github.c...

Custom entity

cloud-abap-rap/zdmo_i_rap_generator_data_src.ddls.asddls at main · SAP-samples/cloud-abap-rap (githu...

Answers (2)

Answers (2)

ramesh_putta
Participant
0 Kudos

Hi Andre,

I tried the same approach(created custom entity and a abap class ) for one of my value help fileds, but the input parameters are not accessible from the ABAP Class.

I need to build the value help list based on the other input fields using the custom logic.

Is there any other way to access other input parameters in the ABAP class when the value help button is pressed?

Looks like they are only available to access when the 'GO' button is pressed.

Appreciate your help.

Thanks

ramesh_putta
Participant
0 Kudos

Thank you much. This is exactly what I was looking for.