Friday 19 April 2019

SAP S/4HANA Cloud Extensibility – Engraving sample scenario – Technical Setup – Create custom fields, process extensibility and data exposure

This blog post is part of a blog series focusing on SAP S/4HANA Extensibility. It is one of 5 blog posts taking care of the technical setup of extensibility with a focus on In-App Extensibility. It also acts a the basis for the technical setups that will be done in the following technical blogs as well as in the process execution.

We start with the setup of the custom fields as we need them later in the Custom Logic and cannot implement the Custom Logic without the fields available.

I will create 4 fields:

◈ Engraving
◈ Style_ID
◈ Font
◈ Font Size

Engraving, Font and Font Size are all fields that should be visible on the Sales Order Item UI.

The Style ID will not be visible on the UI but will be used to derive the fields Font and Font Size

The difference will also be how the fields are filled.

The engraving field will be exposed to the outside via an API so when the field will be filled via the API call. The Font and Font Size will be filled in the custom logic in the custom business logic chapter. They will be derived based on the style id which will also be exposed via an API and be filled via the API.

Besides having the fields (Engraving, Font and Font Size) only on the Sales Order Item UI I also want to see them in the follow up process meaning the corresponding Outbound Delivery Item. To enable this, I will use the Process Extensibility which is part of the Custom Fields and Logic app.

Besides that, we need to enable the external usage of the Sales Order API where added our custom fields. To do this I will show how to setup a communication user, a communication system and a communication arrangement so I am able to call the API from the Postman application.

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Custom Fields and Logic including Process Extensibility


In order to not display the same steps for all 4 fields I will indicate which steps are relevant for which field.

Goto “Custom Fields and Logic” app

Relevant for Fields: Engraving, Style_ID, Font and Font Size

Press “+”

Select:

◈ Business Context = Sales: Sales Document Item

Enter:

◈ Label (Engraving, Style_ID, Font and Font Size)
◈ Tooltip (Engraving, Style_ID, Font and Font Size)
◈ Type (Text (Engraving, Font and Font Size) Number (Style_ID)

Press “Create”

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Goto tab: UIs and Reports:

Select: Enable for the “Sales Order Object Page”

Relevant for Fields: Engraving, Font and Font Size

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Goto tab: Business Scenarios:

Select: Enable for the “Sales Document to Delivery on Item Level”

Relevant for Fields: Engraving, Font and Font Size

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Goto tab: oData APIs:

Select: Enable for the “Remote API for SD Sales Order”

Relevant for Fields: Engraving and Style_ID

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Press “Save”

A second field “Engraving” for Business Context “Shipping: Delivery Item” will has been created

Relevant for Fields: Engraving, Font and Font Size

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Goto tab: UIs and Reports:

Select: Enable for the “Delivery Item GUI Application”

Relevant for Fields: Engraving, Font and Font Size

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Press “Save”

Communication User


A communication user is needed to setup external communication. It will be assigned to the communication system. I will use the communication user later in the API calls to authenticate myself.

Goto app: Maintain Communication User

Enter a “User Name” and “Description” for the communication user

Press “Propose Password”

Press “Save”

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Communication System


A communication system is needed to setup external communication. It will be assigned to the communication arrangement.

Goto app: Communication System

Enter:

◈ System ID
◈ System Name
◈ Host name

Assign Communication User

Press “Save”

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Communication Arrangement


A communication arrangement is needed to setup external communication. It bundles the information which system can be called, which communication user is assigned, which authentication method can be used and will provide the URL that is required to perform external API calls from the Postman application.

Search for Sales Order – Create, Read, Update, Delete

Find related Communication Scenario (in this case SAP_COM_0109)

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Goto app: Communication Arrangements

Press: “New”

Enter:

◈ Communication Scenario (SAP_COM_0109)
◈ Arrangement Name

Press “Create”

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Assign Communication System

Press “Save”

SAP S/4HANA Cloud Extensibility, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certifications

Highlights and Conclusion:

This blog shows how easy it is to setup custom fields, extend APIs and enable process extensibility  in the SAP S/4HANA Cloud system. It shows how it can be uses internally as well as the data can be exposed.

No comments:

Post a Comment