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

Implement Logic for a Custom Business Object

Control your custom business object application with ABAP logic

Overview

🎓 beginner 20 min. ABAP ExtensibilityBeginnerCloudSAP S 4hana Cloud

You will learn

  • How to enable logic implementation for a custom business object
  • How to implement changing custom business object database
  • How to implement checking a custom business object before save
  • How to implement saving or reject saving of a custom business object
  • How to implement informing the end user about save
  • How to ease development and test already during implementation

Prerequisites

Prerequisites

  • Authorizations: Your user needs a business role with business catalog Extensibility – Custom Business Objects (ID: SAP_CORE_BC_EXT_CBO) and Extensibility - Custom Logic (ID: SAP_CORE_BC_EXT_BLE) in your SAP S/4HANA Cloud system

Steps

Our Example

A several tutorials spanning example will show extensibility along custom Bonus Management applications.

In the first parts a Manager wants to define business objects Bonus Plan for employees. A Bonus Plan is used to save employee specific rules for bonus entitlement.

Tutorial last checked for feasibility with SAP S/4HANA Cloud Release 2602

Step 1 Make key field Read-Only

As there was no backend implementation to set the mandatory key field ID so far, we were forced to set it from the UI to be able to save instances. Now, as we will implement the logic to set the ID in backend and nowhere else, we will set that key field to Read-Only for the UI.

  1. Enter your SAP S/4HANA Cloud system’s Fiori Launchpad.

  2. Start typing Custom Business Objects in the Launchpad search and open the App from the results.

    Custom Business Objects application from search results
    Custom Business Objects application from search results

  3. Select the business object Bonus Plan in Custom Business Objects application

  4. Start Edit Mode by executing the Edit Draft action.

  5. Switch to Fields section.

  6. Check the Read-Only box for key field ID.

    Check Read-Only box
    Check Read-Only box

Step 2 Enable logic development
+
Step 3 Implement After Modification logic
+
Step 4 Test during development and publish the logic
+
Step 5 Implement Before Save logic
+
Step 6 Test via the UI
+
Step 7 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 7
1. Make key field Read-Only 2. Enable logic development 3. Implement After Modification logic 4. Test during development and publish the logic 5. Implement Before Save logic 6. Test via the UI 7. Test yourself

Learn more →