cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable Smart table Persistency Key

0 Kudos

Hi Experts,

I have configured smart table with oData service having vocabulary annotaions. Now we want to enable variant management for smart Table which will enable by providing the 'persistencyKey' for the Table.

Can any one explain the process creating the 'persistencyKey' which can be used by smart table.

Thanks in advance..

Regards,

Mahitheja.

0 Kudos

Thanks I have got a solution.

Former Member
0 Kudos

sorry,first ,my English is bad;

I want to know how to solve it, i face same problem about samrt variants , maybe share your solution and code,TKS!

0 Kudos

Hi Jerry,

For which scenario you are using Smart Variant.

Variant management as know enables to save inputs or filter based on individual user. For this you need to provide a unique name(Can be any specific) at persistence key parameter, this will enables the variant management once you deploy into launchpad.

Thanks,

Mahitheja.

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mahi,

This is the official SAPUI5 documentation on Smart Variant Management. There you will see that "percistencyKey" is the value for keyName that is used internally by the backend system to store the search variant ID. Once your UI sends a POST to store the variant, it sends its Name to the OData service. This in turn generates a key (GUID) for the variant that would be specific to the logged on user (same concept as saving variants on SAPGui). When you reload the UI, the Smart Table will retrieve all variants for the logged on user and display them. If you ever need to edit some of them the OData will send the GUID instead of a name.

Hope this clarifies.

Regards,
Ivan

former_member190063
Participant
0 Kudos

Hi Ivan,

will "persistenceKey" takes care all the user saved variants for individual users? Lets say, If User have saved one variant and closed the application. Later he reopened the same application. Will the saved variants appear in the application? Because I am using a Smart Filterbar and Smart Table.

Regards

Karthik S

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Karthik,

Just as long as the odata source is behind an ABAP system, that is true. All smart variants will be saved onto the ABAP system. Once your users log back in the system, the smart components will retrieve the data stored in the backend system and your users will see the variants that were saved.

If you are using the data source from other systems - such as Java Olingo or HANA XSODATA, then this will not be true as there is no service that can handle the storage of variants. Unless you try to reproduce the behavior of the ABAP service onto the mentioned systems.

Regards,
Ivan

former_member190063
Participant
0 Kudos

Hi Ivan,

Thanks for your response. Now I got a clear idea.

Regards

Karthik S

former_member190063
Participant
0 Kudos

Hi Ivan,

I have added "persistencyKey" in Smart Filter and activated the /sap/bc/lrep service in backend. I am able to save variants in the ui5 application. But when i launch the app second time in the browser, the user saved variants are not appearing. Do I need to add any extra code in view or controller file?

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

You should check the lrep service with F12. It should save the variant under the user logged in the application. Are you logged on the application?

former_member190063
Participant
0 Kudos

Yes Ivan. I have logged in the application. Could you elaborate how to test lrep service in F12?. I am testing the application as a standalone in IE browser. Will Smart Variant works in standalone app? Because somewhere I read smart variant management works only on Fiori Launchpad. But not sure how valid point that is.

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Have you tried with Fiori Launchpad yet?

former_member190063
Participant
0 Kudos

I didn't try running the app on launchpad. Because our app has to run only on IE browser as a standalone app. Here my doubt arises. Will Smart variants works in standalone UI5 app(Other than launchpad)?

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Karthik,

AFAIK: It should work just as well. Of topic: IE doesn't prevent you from running Fiori Applications just as long as if you are running it on a compatible version (I know IE11 works with the launchpad). I prefer running an Fiori application on top of the Launchpad because it give you the possibility to theme the application, integrated logon/logoff features, role based application groups, etc. Besides, it doesn't make a lot of sense delivering a Fiori App with a zillion features because it is not what the Fiori Design Principles tell us. Rather, one should design apps focused on simple tasks that can be accomplished with as little as 3 navigation clicks or less. So it makes more sense having several applications for each user than having just a single app that does it all.

Back to the original question: You may call service (name in SICF is: /SAP/BC/LREP) directly using the GET method like so: <host:port>/sap/bc/lrep/content/?sap-client=XXX. This will give you a json string with the application name, variant name and variant contents. Test this with different users to see how the system works.

Best regards,
Ivan