cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to bind function import to the element like smart table?

0 Kudos

I think question is very related to this one: https://answers.sap.com/questions/11459025/how-to-call-function-import-from-sap-ui5-and-get-t.html. However I do not want to bind JSON but setup smart table entity set returned from the import function.

There are lots of possibilities in annotation modeler and there is function import. However I can not find documentation how to use it in smart components except how to setup default columns for smart table.

dhiraj_more
Participant
0 Kudos

Hi,

Did you manage to do it or it is not possible.


Thanks,
Dhiraj

0 Kudos

dhiraj.more I gave the answer below. I am sorry for late response I did not notice the comment.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Unfortunately I couldn't find the solution with annotations so I created cache in the backend. There is now /CacheSet('here parameters used by the import function') bind to the SmartTable. When the Promise is resolved I do:

SmartTable.setTableBindingPath("/CacheSet('" +  cacheId  + "')/CacheProduct"); 
SmartTable.rebindTable(true); 

So the procedure in short is:

  1. I get the parameters
  2. Invoke async function that call function in the backend that fill the cache with import function.
  3. The response is send that the cache is updated
  4. I rebind the table to the given CacheSet

So it is alternative solution for the function import just to have normal Entity Set in order to bind the SmartTable. I hope there is (there should be) easier solution.