SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Add Business Logic to the SAP SuccessFactors Extension

In this phase of the development you will add the business logic of the extension.

Overview

🎓 beginner 15 min. SAP Cloud Application Programming ModelBeginnerSAP BTP Cloud Foundry Environment

You will learn

  • โœ”How to create the code file of the service module to attach the service handlers
  • โœ”How to write the service module code
  • โœ”How to organize your code in the CAP project
  • โœ”How to write the service handlers code
  • โœ”How to attach the service handlers to the service module events (OData operations)
Alessandro Biagi A Alessandro Biagi November 1, 2022
Created by September 28, 2022
Contributors

Prerequisites

Steps

Step 1 Create the service module code file
โ€”

The business logic of the application is implemented via custom service handlers for the various operations executed on its entities (create, read, update, delete, etc.). Those handlers are defined in a module within a JavasScript file with the same name of the service but with the .js extension.

So, now it’s time for you to create it.

On the left-hand pane of SAP Business Application Studio, (1) select the srv folder, then (2) click on the three dots to the right of the project name and (3) select New File.

Figure 1 โ€“ Create New File
Figure 1 โ€“ Create New File

On the dialog name the file projman-service.js and click OK.

Figure 2 โ€“ Set File Name
Figure 2 โ€“ Set File Name

Step 2 Code the service module
+
Step 3 Organize your code
+
Step 4 Code the service handlers
+
Step 5 Users READ handler
+
Step 6 Other handlers
+
Step 7 Attach the service handlers to the service module events
+
Step 8 Check your knowledge
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 8
1. Create the service module code file 2. Code the service module 3. Organize your code 4. Code the service handlers 5. Users READ handler 6. Other handlers 7. Attach the service handlers to the service module events 8. Check your knowledge

Learn more →