Saturday, 20 April 2019

SAP S/4HANA Cloud Extensibility – Engraving sample scenario – Technical Setup – Custom Business Object Part-2

Custom Business Object


I will create a custom business object “Style” the purpose of the object should be that I can maintain the available styles for my engraving. The style should contain the layout of the engraving so which font, which font size, should it be bold, italic or underlined. The CBO could be used as a lookup in the imagined web shop, therefor I will expose the CBO via a custom communication scenario. With that I will be able to read the CBO and create new CBO entries from the postman application. I will also show you the option of a custom code list that I use as a value help for the bold field.

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Custom Reusable Elements


As I would like to show as many In-App features as possible I would like to create a look up table for the field bold that will later be part of the CBO. Therefor I will create a Custom Code List which can be reused for example in the CBO or in a Custom Business Logic.

Goto app: Custom Business Objects

Goto tab: Custom Code Lists

Press: “+”

Enter:

◈ Name (Style_bold)

Goto tab: Code Values

Press “+”

Enter:

◈ Code (01, 02)
◈ Description (Yes, No)

Press “Save and Publish”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Custom Business Objects


As mentioned above the Custom Business Object Style should define the layout of the engraving. Meaning which font, font size and bold, italic or underlined. I also want to be able to maintain the data on a UI in S4HC and I want to be able to expose the CBO data. Therefor I want that services are created so I can read the CBO information from the Postman application and also create new entries from there.

Goto app: Custom Business Objects

Press: “New”

Enter:

◈ Name = Style

Press “Create”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Select Checkboxes:

◈ UI Generation
◈ Service Generation
◈ Can Be Associated

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Goto tab: Fields

Enter the field values shown in the screenshot below

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Press “Maintain Catalogs”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Assign the Custom Business Object to one or more Business Roles.

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Select the checkbox for the Business Catalog and press “Publish”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

The publishing process is time consuming

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

When the publishing has been completed the “Go to Generated UI” link becomes available

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

You will be forwarded to the generated UI.

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

There you can maintain some initial

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Create custom communication scenario


In order to expose the CBO data, I need to create a custom communication scenario. This custom communication scenario together with the communication user and communication system will be used in a communication arrangement to have read and write access to the CBO data.

Goto app: “Custom Communication Scenario”

Press: “New”

Enter:

◈ Communication Scenario ID = Styles
◈ Description = Styles

Press: “New”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Press: “New”

Select:

◈ YY1_STYLE_CDS

Press: “OK”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Press: “Publish”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Create communication arrangement


The communication arrangement allows me to expose the CBO data. It opens up the possible communication for the CBO. There I will be able to find the URL that I can use later in the Postman application to make API call to from CBO.

Goto app: Communication Arrangement

Press: “NEW”

Enter: Scenario = YY1_STYLES

Press: “Create”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

Assign Communication System = SYSTEM_NM

Press: “Save”

ABAP Extensibility, SAP S/4HANA, SAP S/4HANA Cloud, SAP ABAP Tutorial and Materials

No comments:

Post a Comment