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

Create Rule Service and Ruleset

Create and activate ruleset and rule service artefacts as part of Bonus Plan Percentage Calculation rules project.

Overview

🎓 beginner 10 min. ABAP ExtensibilityBeginnerSAP Business Technology PlatformSAP S 4hana Cloud

You will learn

  • โœ”How to create rule service which is the deployable entity of business rules
  • โœ”How to create ruleset to bundle rules with same output
Unknown U Unknown March 21, 2023
Created by March 9, 2023
Contributors

Prerequisites

Steps

Intro

Rule Service is an interface or an end point that enables an application to invoke a decision logic. In an online transaction or workflow, rule service is invoked by passing any relevant input from an application to the rule service in a stateless manner.

Ruleset is a logical collection of rules that helps you group business rules that govern a specific function. A ruleset links a rule or group of rules to a rule service.


For more information, you can read the help documentation:

Rule service

Ruleset

Step 1 Create rule service
โ€”

  1. Switch to Rule Services tab in Manage Rules Application.

  2. Click + to create the rule service.

    add rule service
    add rule service

  3. In the Details tab, enter the following rule service details:

    • Name as BONUS_PERCENTAGE_S4H or any name of your choice.

    • Label: Bonus Percentage Rule Service or any label of your choice.

    • Description: Calculates minimum bonus percentage for Custom Business Object of S/4HANA or any description of you choice.

    Label and Description are optional fields.

    define rule service props
    define rule service props

  4. Switch to Vocabulary tab.

  5. Click + and add the following rows one after the other.

  6. Select the following values from the drop down:

    NameUsage
    BONUS_PLAN_TTInput
    PERCENTAGEResult

    define vocabulary
    define vocabulary

  7. Switch to Annotations tab.

  8. Click + to add annotation to rule service.

  9. From the options, choose ABAP on HANA.

    define annotation
    define annotation

  10. Click Activate button to save and activate the changes.

    activate rule service
    activate rule service

    If activation is successful, then you will see the status of the rule service as Active.

    activated rule service
    activated rule service

  11. Click the rules project breadcrumb link to return to the project page.

    switch to project
    switch to project

Step 2 Create ruleset
+
Step 3 Test yourself
+
Step 4 Test yourself
+
Step 5 Test yourself
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. Create rule service 2. Create ruleset 3. Test yourself 4. Test yourself 5. Test yourself

Learn more →