cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP S4/HANA Public Cloud- Create Custom Business Object and Custom Reusable Elements

Atilay
Newcomer
2,248

Introduction

Hello, in this blog I will show you how to create custom business object (CBO) and custom reusable elements in S4/Hana public cloud. Then I will show you again what the code list I created in the custom reusable element does in the custom business object and why we created it.

Additional Information

Custom business objects help create business objects with SAP S/4Hana Cloud's user interface for extending data model fields, adding things like custom columns and calculation logic. With Custom Reusable Elements, you can customize the structure you create according to your needs and install it accordingly.

Custom Reusable Elements

Here I will create a house for sale ad example in the custom business object (CBO). The code list here will give us information about home types when we create an ad. First, let's create a custom code list from the custom reusable element.

Figure-1Figure-1

You can follow the images below to create the creation phase. After these steps, we are done with custom reusable for now.

Figure-2Figure-2

Figure-3Figure-3

Custom Business Object

We move on to creating our example in the custom business object. Here again, you can follow the steps in the image.

Figure-4Figure-4

Figure-5Figure-5

It is necessary to select these boxes when creating a custom business object. These boxes have the following meanings in numerical order:

  • 1-Determination and Validation: It enables the business object (Create, edit, save) to have logic added. It is employed for both validation and the presentation of error messages. This can only be used when custom business object (CBO) is in publish status.
  • 2-User Interface: It makes an interface for maintenance. Comparable to SM30. The maintenance interface needs to be set to a custom catalog in order to be used.
  • 3-Back End Service: It generates an OData API that the SAP S/4HANA system can use. Communication Arrangements can be established following the creation of the API. This also applies to SAP/S4HANA Cloud, and we may use SAP BAS to develop a new Fiori application. CRUD operations are also within our capabilities. With SAP S/4HANA On-Premise, we may use SAP Cloud Connector to make the generated OData accessible.
  • 4-System Administrative Data: Additional fields are created when this option is checked. The creation date, creator, last modified date, and last modified are these extra fields. When a user creates a new business item, these fields are automatically filled up.

Figure-6Figure-6

In the field section, you specify which fields you want to see in this house-ad table. In the picture, we use the house_type we created in custom reusable as the type of the house_type label. After selecting the type here, you can see the code list we created from the code list text on the right.Figure-7Figure-7

In the Node section, when we run the last application, we will see that the house is a field.

Figure-8Figure-8

You can also go to the fields section and select the node and add the fields of the node we added. After completing all the steps, you need to publish what you have done. After publishing, you can see what you have done in the log section.

Figure-9Figure-9

Figure-10Figure-10

After the publish phase, you need to perform operations numbered 1 and 2 from the general information section. These operations are;

  • 1. Maintain Catalogs: This is used to add the application to the catalog and create a box. When finished, it shows up in the launchpad and is allocated to the user.
  • 2. Go To Generated UI: This opens once it is fully published. brings up the user interface.

Figure-11Figure-11

Selecting the Maintain catalog, you can select the catalog you want to add by clicking add on this screen and publish it. If you want, you can also create a custom catalog yourself, assign it to it and publish it. After publishing, when you click go to Generated UI, the application opens as an interface. Figure-12Figure-12

Figure-13Figure-13

Figure-14Figure-14

You can open the application here by clicking Generated UI again. At the same time, you can go to the app finder, find the catalog you added the application to and add it to launchpad.

Figure-15Figure-15

Figure-16Figure-16

I created an example. Here you can see what the code list we created earlier and used in the fields does when creating an example.

Figure-17Figure-17

Conclusion

As a result, today I showed you how to create a custom business object(CBO) and how to create a custom code list in a custom reusable element. Then I showed you again what the code list I created in a custom reusable element does in a custom business object and why we created it. I hope it will be useful for you.

 

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Daphne_Mengwein
Product and Topic Expert
Product and Topic Expert

Please re-post as a blog post. Thanks!