Try to use variants and table personalisation on SAPUI5 SmartTable - sapui5

I want to use the variants to customise different filter and table variants on a SAP Fiori application, that use SAP Hana Cloud and Java backend.
As a background info:
I'm using a smartTable that is connected to the smartFilter by filterId property. On the table/filter I am able to access directly the data from the metadata by filing the entitySet / entityType property. I am using a real server not a mock server. In the table the properties regarding the personalization and variants are enabled (useTablePersonalisation="true", useVariantManagement="true"). I see that I have to specify the persistencyKey so that variants can display on the UI, but i don't know what value should i complete it with.
I read that smartTable and smartFilter are using SmartVariantManagement(a custom control of VarinatManagement) to accessed directly (without user interaction) SAPUI5 Flexibility Services regarding personalization data and management of the variant. But on SAP Help it says that:
Flexibility services are currently not available in SAP Hana Cloud Platform.
The services run on the ABAP front-end server and NetWeaver 7.31 SP11 or higher
Here is the link: http://help.sap.com/saphelp_hanaplatform/helpdata/en/a8/e55aa2f8bc4127923b20685a6d1621/frameset.htm
It is possible to use the variants and personalization?
How can I do it regardind my application specification?
Does anyone have an example application?
Thank you !

You can use them both at the same time.
For me the useTablePersonalisation="true" is working without any other changes. Rearding the useVariantManagement="true", I use showVariantManagement="true" also, and as you said persistencyKey="SmartFilter_Explored" is also needed to see Variant Management icon.
This is an example: https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.comp.sample.smarttable/preview
For me I can not test the variant management functionality when running the app from webide as it is needed an existing user for you. So I can test it only, when running it on launchpad.
PersistencyKey identifies the storage area and saves/retrieves the variants currently used.
This page helps you with persistency key (under Page Variant section):
https://sapui5.hana.ondemand.com/#/topic/06a4c3ac1cf545a7b51864e7f3aa02da
I hope it helped.

Related

Is SAPJCo specific to a SAP installation or can be reused between different SAP Boxes?

I'm trying to connect to a SAP system using SAP JCo. Our client is taking long time to download and give the SAP JCo. Is SAP JCo dll and Jar specific to a SAP Box or can be used across different boxes? Can I use a SAP JCo downloaded using SAP ID registered in our SAP Box and use it?
Note that the redistribution of the connector is not allowed by SAP.
-> if you develop an application for a customer, this customer has to download and provide you the JCO lib for his SAP installation.
See : https://support.sap.com/en/product/connectors.html
SAP JCo is library which can be used to communicate with any SAP on-premise system that supports SAP's RFC protocol. This is comparable to a database vendor specific JDBC driver.
Just provide the logon credentials and connect to any available system of this type.
You can find further general information about the SAP Java Connector here:
https://support.sap.com/jco
(Much appreciate trixx's suggestion in the comments; I am editing this reply to directly answer op's question instead of giving general statement)
SAPJco is not specific to an SAP installation. Assume you have a valid S-ID to access SAP software download page ("Connector" section) to download the JCO file. Once you download it, you can start with some simple examples. Here is one blog for reference.
(original reply was:
Your best bet would be to search in Google through keywords like "SAP JCO sample" to read some very basic examples, and try to practice from them. Once you start to get used to the design pattern, you can blend your requirement in and become productive. It is not difficult to get started. Keep learning and practicing. )

Trying to create a schema in IBM Watson IoT gives me 'Internal Error' - why..?

I'm trying to follow this guide: https://console.bluemix.net/docs/services/IoT/GA_information_management/ga_im_index_scenario.html#scenario
But as soon as I hit "Manage Schemas" in the device type section I get an "Internal Error", saying I should contact the Admin... I'm not able to create schemas. What's going wrong?
Thanks in advance!
Tom
It is not entirely clear what you are trying to achieve. If you are simply trying to retrieve the raw events that have been published by your device, then you need to use a URL for the form:
/api/v0002/device/types/{deviceType}/devices/{deviceId}/events/{eventName}
This is documented in the Watson IoT Platform API reference.
It is worth noting that, if this is all you are trying to achieve, you do not need to follow the guide that you referenced. It is possible to retrieve the raw events using the REST API simply by defining the Device Type and registering your device.
The guide that you referenced describes the Data Management capabilities of the Watson IoT Platform. These capabilities allow you to process the raw events in order to generate/compute state for the device. This is more involved than simply retrieving the raw events because you need to configure schemas for the events and the state and then define the mappings that tell the platform how to compute the properties on the state when an event is received. The computed state for a device is a different resource and needs to be retrieved using a different URL:
GET /api/v0002/device/types/{typeId}/devices/{deviceId}/state/{logicalInterfaceId}
This is documented here
It's a little confusing, but that Manage Schemas section of the UI is not related to the feature you're looking at as part of the guide you referred to.
The guide you're looking at outlines how to configure event schemas and logical interface schemas for a Device Type using REST API calls. If you wish to create this configuration using the web UI, this is possible too but you need to get to the Interfaces section from the Device Types view: see this image
In this case, I clicked on the Humidity Sensor Device Type and then, in the expanded view, clicked on the Interface tab. From there you can use the Simple or Advanced flows to create the configuration.
The reason for the error is because the component that provides the function on that page (Real time insights) is not present in the eu-de region. The page should not be present but for some reason is.
If you are planning on following that guide then this is a different part of the UI from the “manage schemas” page, and is located under the “interfaces” section in “device types”. The function defined in that guide is available in eu-de.

openui5 navigation between components

I just want to use a login component, that handle the process for login, signin and recover password. I want to reuse this component in different openui5 applications.
What I cannot understand is how can I change from one component to another. I mean, once I authenticate in my login compomnent, and a controller validate authenticate the user, how can I change to another openui5 component.
I was trying to understand CrossApplicationNavigation in the AppNavSample but I cannot understand it. https://sapui5.hana.ondemand.com/sdk/test-resources/sap/ushell/demoapps/AppNavSample/localMinimalRenderer.html
Any ideas?
Do you mean SAPUI5 rather than OpenUI5? The control (and SDK) you reference is the Unified shell (ushell), which is a component of SAPUI5 only.
This control is the "Launchpad" for the SAP Fiori apps and is built from metadata of associated user roles from the backend SAP system which is why it is only part of SAPUI5 not OpenUI5.
If you do mean you want to use the Launchpad and are developing on a SAP system, you can find the documentation about "Cross-app navigation" here - http://help.sap.com/saphelp_uiaddon10/helpdata/en/09/4d968eb7c442208303427e82da92c9/content.htm?frameset=/en/09/4d968eb7c442208303427e82da92c9/frameset.htm&current_toc=/en/e4/843b8c3d05411c83f58033bac7f072/plain.htm&node_id=187&show_children=true#jump187.
However, your example - a login form, then the main application - suggests this is actually not what you want to do and instead you want to navigate in within specific views of an app. Check out this tutorial in the OpenUI5 documentation on "Navigation and Routing" - https://openui5.hana.ondemand.com/#docs/guide/1b6dcd39a6a74f528b27ddb22f15af0d.html
Further, your example of login + app actually sounds like it might need to be handled outside of UI5 itself on the specific backend/application/web server that you are developing against. UI5 can provide the appropriate frontend though.

Content Management in Bluemix

Is it possible to link a bluemix website with some kind of content mangement?
I'm trying to build a formular for an event registration website with bluemix.
It must be possible for the promoter of the events to decide which data the participants have to fill out. As an example for a business dinner there is no need to ask if he needs a flight or not and for another event it would be necessary to know it. So the content must be "adaptable" by the promoter because I don't want to write a new website for each event.
Does somebody know a solution for this problem?
Thank you very much for your help!
Deploy your site on IBM Containers and utilize the ssh capability to scp your content into the web app/site.
There are several possibilities:
create an application with a Cloudant backend. The data stored inside is free form. You then "just" need to define the valid form. I used angular.js and angular-formly (with the form definition stored in Cloudant, so you can edit it)
Use PencilBlue a Node.js CMS using a Mongo backend. Eventually it does all you need
Use a container with a common engine (e.g. Wordpress)
So you can act depending on how custom you want the solution to be. Let us know what works for you

PeopleSoft logins

I'm building a web application that will have access to PeopleSoft's database via jdbc.
Is it possible that I can use PeopleSoft's id/password for my custom application, so users accessing my website will not have to have another username/password?
Peoplesoft stores user details in the table PSOPRDEFN.
You will be able to verify the username against: PSOPRDEFN.OPRID.
The password field is: OPERPSWD.
Unfortunately the encryption function used for this field: hash() is available only from within peoplecode.
If you want to use a single sign on you should be able to do so by customizing the USERMAINT.gbl component perhaps in the saveprechange peoplecode, to save the password in a second field of your choice with an encryption algorithm that you can implement from JDBC as well.
If you want to reuse PeopleSoft security, you'd need to connect at a higher level than JDBC straight into the database. You could look at a component interface (codeable in Java) or send a SOAP message into PeopleSofts Integration Gateway - both methods would authenticate you against peopleSoft using its own security mechanisms.
The old way was to customize psuser.c to your needs and recompile as a new dll, used it your program, assuming you're on a Microsoft platform. As mentioned above, you could have a peoplesoft developer create a component interface ( or use the one that is delivered ). You can export wrapper Java or C/C++ code from a CI, a template. This code can then be used in an external program to call the CI. one way or the other, you have to interface with peopletools to call their decrypt for passwords.
Depending on how dynamic your business is, whether you add lots of employees each day, you could export psoprdefn using app messaging to another database. On the send, you could encrypt passwords however you like. But as you can surmise, this would not be real-time.
One thing I remember doing long ago was have a peoplesoft tech person develop a page the sole functionality of which was to call my java class and which obtained user/pswds as needed. Once I had them, I was good to go.
You can use the psjoa.jar , in that way you can signon via app.server using the same users and passwords in the psoprdefn table.
PeopleSoft has an LDAP integration ability but it has to be configured. If you are accessing via a Java wrapper around a component interface, a special account can be set up in PeopleSoft with access only to the underlying component, but the login/password would have to be passed into the component interface. This can be encrypted or sent over https.
PeopleSoft also has what it calls "row level" security - the ability to partition data sets so that for example your code could only access employee data within a specific business unit or accounting info for a particular line of business. This is all controlled within the PeopleSoft online security application.