Quantcast
Channel: SCN : Blog List - All Communities
Viewing all articles
Browse latest Browse all 2548

Create SAP Mobility Custom App easily for SuccessFactors - Part 1

$
0
0

SFSF-Banner-SAM6.jpg

Creating Mobile Custom App for SAP SuccessFactors Part 1

 

Hi all,

 

Let me start with short introduction, my name is Yugesh Madabattula and I am Chief Technology Officer at Mobolutions, LLC.  Our company focuses on enterprise mobility applications and services and pledged to help businesses to harvest benefits of emerging technologies.  But this is not a sale pitch, so I get to the point sharing our team’s experience in getting SAP SuccessFactors (SFSF) mobile app “up and running” just in few days.

 

This post is our “reflection” on how to take an easy way in developing a mobility app for SFSF in HCP with detailed “turn - by - turn” instructions and hopefully it will help you to pass your “driving test” and get a “license to develop”

 

Part 1 “Getting Started

 

In this section you learn on “how to”:

 

  • Starting with SFSF
  • Setting up the mobile-ready OData user roles and permissions
  • Exploring SFSF OData API’s
  • Using RESTClient, testing and troubleshooting OData calls
  • Registering SFSF API to HCPms SMP
  • Registering users to SMP
  • Accessing SFSF OData from SMP on Cloud

 

SFSF Login

 

We assume you already obtained your SFSF demo client credentials and can login using similar link as below:

 

Screen Shot 2016-02-15 at 12.11.13 PM.png

 

Upon successful login you will land on the following page (if not, we bare no responsibilities what happens next … are you sure you were on the login page to start?)

Screen Shot 2016-02-15 at 12.32.46 PM.png

 

OData User Roles and Permissions

 

SFSF business processes can be exposed and consumed using OData API’s.  For accessing or creating the ODATA API’s the user need to have specific roles.  Make sure your user ID assignment has the following roles and permissions:

Screen Shot 2016-02-15 at 12.52.00 PM.png

 

SFSF OData API’s

 

Now the roles and permissions are set, let’s explore available OData APIs.  To access them, go to the Admin Center page and in the Tool Search field type “OData API Data Dictionary”

Screen Shot 2016-02-15 at 12.54.56 PM.png

 

The system displays the list similar to pictured below:

Screen Shot 2016-02-15 at 12.56.31 PM.png

 

For our challenge we decided to develop a mobile application for SFSF Employee Talent Profile allowing authorized users to search and find detailed information about the employee’s talent such as awards, education, certificates, training course and so on.  To “proof test” you can develop mobile app for any other business process in SFSF using our “turn-by-turn” instructions.

 

Return to the Admin Center page and type any employee name in the search bar:

Screen Shot 2016-02-15 at 1.00.03 PM.png

 

Select the Talent Profile for chosen employee.  The system will display employee record.

Screen Shot 2016-02-15 at 1.01.30 PM.png

 

Using dropdown option, you can navigate to desired record and display relevant details. In our case we are interested in the Talent Profile and want to learn out more about this employee:

Screen Shot 2016-02-15 at 1.43.22 PM.png

 

We were able to navigate to the right information now let’s use OData API’s to retrieve the same data from SFSF.  We need to go back to the Admin Center page and type “OData API Data Dictionary” in the Tool Search field.

 

TIP:  Use prefix “Background_XXX” to find all APIs related to the talent profile data.

Screen Shot 2016-02-15 at 1.45.51 PM.png

 

RESTClient and Testing OData

 

Congratulations, you are doing great so far and if you are still reading it, this means we did not mess up too badly either.

Next “turn” is to confirm if we can retrieve data using RESTClient.  We used Base URL for SFSF:

 

 

For testing purposes we selected one of APIs (under Entity Name): Background Awards as pictured below:

Screen Shot 2016-02-15 at 1.50.44 PM.png

 

Start the Firefox RESTClient and provide the following details:

 

 

NOTE:  Based on your use case, you can practice with different entity types and filters to get your desired results.

 

You have to complete authentication by providing appropriate credentials on the Basic Authorization:

 

  • Username: SFSFusername@CompanyID
  • Password: SFSF password

 

Screen Shot 2016-02-15 at 1.55.35 PM.png

 

In addition to authorization in the Headers section you need to select application/xml as a Content-Type.

 

The Request in your system should be similar as pictured below:

Screen Shot 2016-02-15 at 2.01.14 PM.png

 

As result the system will display the following Response information:

Screen Shot 2016-02-15 at 2.01.26 PM.png

 

You notice that our request was successful and we were able to retrieve the same information what has been displayed in the Awards section of the Employee Talent profile:

Screen Shot 2016-02-15 at 2.02.38 PM.png

 

Now you should be able to retrieve any desired data from SFSF using OData and to complete testing on RESTClient.

 

Registering SFSF API to HCPms SMP

 

It’s time to turn our attention to the process of mobile application development.

 

Depending on your environment you can consider either consuming OData directly into the mobile application or publish it on SMP first and then consume using SMP.

 

Even you are already familiar on how to register these services on SMP please bear with us and just follow along:

 

 

In the Create Application window provide and save all required details for your future app, for example:

Screen Shot 2016-02-15 at 2.26.07 PM.png

 

Upon saving your new application select the BACK-END tab and provide the details for your primary connections. Remember that

 

  • Username: SFSFusername@CompanyID
  • Password: SFSF password

Screen Shot 2016-02-15 at 2.27.59 PM.png

 

To validate that your entries are saved properly and working correctly you can ping the application:

Screen Shot 2016-02-15 at 2.35.28 PM.png

 

Registering users to SMP

 

Access RESTClient and register to receive APP CID:

 

 

You have to complete authentication by providing appropriate credentials on the Basic Authorization:

 

  • Username:  SMP server id
  • Pwd: SMP Password

 

In the Headers section you need to select application/xml as a Content-Type and for Request Body choose Android or iPhone.

 

<?xml version="1.0" encoding="utf-8"?>

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"   

xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">   

<content type="application/xml">

<m:properties>

<d:DeviceType>Android</d:DeviceType>

</m:properties>

</content> </entry>

 

After submitting the request, you need to verify the registration in the SMP for this application. If no errors occurred you find a new registration entry, for example:

Screen Shot 2016-02-15 at 2.50.43 PM.png

 

This entry confirms that registration is successful and X-SMP-APPCID is the Registration ID.

 

Accessing SFSF OData from SMP on Cloud

 

We have last test to perfom validating the SFSF Background Awards OData API via SMP using RESTClient (or relevant data for your case):

 

 

When prompted you have to complete authentication by providing appropriate credentials on the Basic Authorization window:

 

  • Username:  SMP server id
  • Pwd: SMP Password

 

In the Headers section you need to select application/xml as a Content-Type and for X-SMP-APPCID choose {Registration ID from SMP}:

Screen Shot 2016-02-15 at 3.00.01 PM.png

 

If your request is successful, the system will display the following Response result:

 

Screen Shot 2016-02-15 at 3.01.42 PM.png

 

Congratulations, we have achieved our Part 1 objectives and completed all necessary tasks for preparing our back end and middleware.

 

In the Part 2 we provide details on Front End development activities to complete our SFSF mobile app journey. Have a quick look at the SFSF mobile app screens which we will develop in Part 2 using SAPUI5 and HCP.

TP-01.PNG      TP-02.PNG      TP-03.PNG

 

We welcome your feedback and comments.  Please share your experience, challenges and successes.

Stay tuned for Part 2.

 

Thanks,

Yugesh Madabattula


Viewing all articles
Browse latest Browse all 2548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>