Display Result of SAP Report in Fiori Part 2

The last time we talked about how to create a Smart table Fiori application from a query using ALV list in this blogpost. Today’s post explains how to improve the program with some features for our client.

After we successfully displayed the result in the Smart table application, our client needed the following modifications:

  • Setting all columns to visible while the application is loading
  • Setting name for all columns
  • Implementation of searching and filtering
  • Setting lower column width


The solution:

We had to create the service with vocabulary based annotation and also had to redefine the extension method of the service with ABAP code in the SEGW transaction. This was necessary because in the transaction we had limited possibility to create the annotation.

The next step was to modify the service structure thus, we created our own types for the field and set the required names for the columns. After this step all fields had label property with the field name. This property is used by the smart table for naming of the columns.

The filtering and the searching are built into the smart table, so we didn’t need to modify the frontend of the application. When we set a filter or search for something, the frontend sends a batch for the backend. The backend has predefined variables for this data. With these variables we were able to implement these functions easily in the entitySet method of the service.

The smart table doesn’t have property for the column width, so we had to modify the frontend controller for this. The column type had width property, so we could lower this value for all column individually.