I would like to share some difficulties in SUP 2.0 which I faced in my project, for fetching values from SAP ECC 6.0 using the Credentials screen values.
The following How To will explain the steps I did to achieve what I was intended.
First of all I will explain what the requirement was. I need to development a mobile workflow application, which will prompt the user to enter login credentials. Once the user completes the login credentials successfully, the application should fetch all the details from the backend based on the entered username.
For achieving user authentication in my application, I am using Credential Request of SUP 2.0 and since we are going to start the application from the mobile, a Start Screen should be used for displaying the values from the backend.
For fetching the records from a backend, I need to invoke an Object Query:
SELECT x.* FROM <> x WHERE x.user =: username.
Since the first screen of the application is Credential Screen, we cannot invoke Object Query from this screen.
Note: Credential Screens are only used for storing Credential username and Credential Password.
But for me in order to fetch the records from the backend, I should invoke the above mentioned Object Query, with the Credential Username from the Credential Request Screen as the parameter. As a first step of this, I had created an MBO with above mentioned object query and with Cache policy Online. Since I am using Online Cache Policy, at least one load parameter should map to the Propagate to attribute. And deploy this MBO to the Unwired Server. Now comes the creation of Mobile workflow. Instead of creating the screens by our own let the wizard do it.
Now the workflow should appear like this.
The Credential Screen contains two edit boxes, Username and Password; from this the client “knows” that these keys are to be used for SUP authentication because the input keys are assigned to be username/password. This is done by means of setting the edit box’s advanced parameters as relevant for Credential Cache (username/password).The following screen will help to understand better these settings.
In the Start screen add one edit box, and create a key to this editbox manually.
Now here in this stage we need to set this edit box in such a way that it should be capable of getting the credential username. For achieving this select the Credential cache username checkbox for this edit box.
This will fetch the entered username from the stored credentials to the start screen edit box, and now we can very well invoke the Object Query to fetch the value from the backend with this edit box key in the Start screen.
On registering a device user and assigning this workflow to the device user, the application screen shots will be:
On entering the credentials on the credential screen and selecting the Submit button of type Submit Workflow, Here I just changed the edit box label in the Start screen from Login Username to Welcome Mr.
Then entered username from credential screen is automatically comes to the start screen. Now the user can very will select the menu item to which the object query is assigned and can retrieve the values from the backend with the entered username as parameter.