SAP S/4HANA Cloud Key User Extensibility – Create Custom Business Object – Part 3
Target Audience – Key Users of SAP S/4HANA Cloud and Developers
Blog applicability – SAP S/4HANA Cloud 1702, SAP S/4HANA Cloud 1705 and SAP S/4HANA Cloud 1708, S/4HANA Cloud 1805
In this part of the blog series, we will now see how to create a simple custom business object step-by-step. We will start from where we left on part 2 of this blog series. If you have directly landed on this blog, please look at the part 1 and part 2 of this series. Please note that you should have the pre-requisites already in place as discussed in the part 1 of this blog series.
Let’s go through the steps and see how to create a custom business object –
Log on to you SAP S/4HANA Cloud system. Once logged in you will arrive at your home page (Fiori Launchpad). Look for the tile ‘Custom Business Objects’. Normally, it should be under the group Extensibility.
Click on the tile and you would arrive inside the application. Inside, you would notice two tabs – Custom Business Objects and Custom Code Lists.
Custom Business Object – We will use this to create a new custom business object
If you recollect in part 2 of this blog series, we have started with an example of the following custom business object. Since we have already created custom code list in the part 2 of this blog series, now let us start with creation of custom business object based on the following table –
|Root Node (Supplier)||Fields||Length / Data Type||Custom Code List|
|Supplier ID||20 / Char||No|
|Supplier First Name||30 / Char||No|
|Supplier Last Name||30 / Char||No|
|Supplier Account Group||4 / Char||Yes|
|Supplier Country||20 /Char||No|
|Sub-Node (Role)||Supplier Role||10 / Char||Yes|
|Role Valid From||Date||No|
|Role Valid To||Date||No|
Once you are inside the custom business object editor, choose the tab – Custom Business Objects and choose New next to the search box
Once you click on new, provide the name of the custom business object. Note that, other fields – Identifier and Name in Plural will be filled automatically. If you want to change them, you can still do that. Provide the name and click on Create.
Once inside, you have now the choice to choose different options provided by the system and you can choose the relevant checkbox accordingly. Remember we have already discussed about these in part 1 of this blog series. For this blog, we will select all the options.
Next, scroll down a bit to the section – Structure and this is time when we would create the fields for parent node – Supplier. Click on the link – Go to Fields and Logic.
Once you click on the link, you will arrive inside the Edit Node editor. You would notice that, by default system has created some fields like – SAP_Description, SAP_CreatedDateTime, SAP_CreatedByUser and SAP_LastChangedByUser. These are created by system on its own and cannot be deleted. These fields will come only if you have chosen the two check boxes – Can be Associated and System Administrative Data.
Click on the new button to create new fields for the node – Supplier.
Enter the details of the new fields one by one.
Supplier ID – This needs to be a key field, so select the checkbox – Key
Supplier Name –
Supplier Account Group – Remember we had created a custom code list value for this field. So we would choose that as the Type
Next pick up the one you created in part 2 of this blog series
Supplier Country –
Next, we have two more tabs – Actions and Determination and Validation. We will cover this in a different blog.
Next click on back button to go back to the edit node screen. Here we will now add a new sun-node Role.
Again, click on New to create a new Sub-Node
Enter the name as Role. The other fields will be populated automatically
Now again click on Go to Fields and Logic and enter new fields for this node
Click on New to create new fields.
Create the new fields one by one.
Supplier Role – Remember this field type is code list that we created in part 2 of this blog series. We will use the same as we want to provide fixed values as F4 to the user for this field.
Valid From –
Valid To –
Next, we have, Action Tab and Determination and Validation tab that will be covered in a separate blog. Click on back button to go back to the edit node screen.
Once you are back in the Edit Custom Business Object screen, click on Publish button to publish and activate the new custom business object. At this moment, it will go through certain changes and the system will create certain artifacts in the background which you can see by switching on to the Log tab.
List of artifacts created in the background by the system.
Once published, the text Published in green will appear. As you notice from log, the system created the CDS views, OData and other artifacts automatically in the backend.
This completes the steps on how to create a new custom business object in SAP S/4HANA Cloud system. In the next blog, we will see how maintain the entries for this custom business object by using the generated UI. We will also create a new tile for this application and host it in the users Fiori Launchpad.
Congratulations you have successfully created a new custom business object in SAP S/4HAHA Cloud!
Rohit Khan, S/4HANA Regional Implementation Group
For any clarification or support, feel free to reach email@example.com
To access the previous blogs, choose the following links
- Part 1 – SAP S/4HANA Cloud Key User Extensibility – Introduction to Custom Business Objects – Part 1
- Part 2 – SAP S/4HANA Cloud Key User Extensibility – Custom business object – Creating Code List Values – Part 2
To access the next blog – part 4 of this series, choose below link –