cancel
Showing results for 
Search instead for 
Did you mean: 

Get Table Object in OData V4 Report

jasper_nan
Explorer

I have created an OData V4 service using Eclipse and used the List Report Page Template to create a project. After that, I used Guided Development to create a Custom Action.

Code:

ClickTest: function(oEvent) { MessageToast.show("Custom handler invoked."); console.log(this.getView()) }When clicking the button, an error occurs.
this.getView is not a function

But when i consume OData v2 Service with another project, Everything is working fine.

console.log(this.getView().byId("project3::sap.suite.ui.generic.template.ListReport.view.ListReport::ZYY1_SHIPSCHEDULE--responsiveTable"))

How can i get table object in OData V4? Are there any other methods?

View Entire Topic
Marian_Zeis
Active Contributor

I would recommend to set a breakpoint where your "this.getView" is to see what is available with "this.

When you would do this, you see that "this" is a instance of sap.fe.templates.ListReport.ExtensionAPI.

With the Property EditFlow you can use "getView".

With V2, "this" is a different instance.

jasper_nan
Explorer

Thank you very much for your answer.

According to the method you provided, I succeeded.

As a UI5 beginner, I gained a new debugging skill.