How to modify SAP S/4 Hana email template

In this blog, we discuss how to modify the S/4 Hana email template as per business requirements and add system fields. Also includes, saving changes and moving changes over to the production. The beauty of SAP S/4 Hana email template  is all of this can be done by one consultant or the end-user themselves with just a little training no need to have the Basis, Functional and technical part of your team . 

  1. There are no Tcode, Just type what you want.
  2. No Debugging just look around and find the details
  3. No code changes just a simple text-based editor
  4. No need to ask the basis team to release and import TR it can just be done by following simple export and import rules. So overall makes it easy but I still took time to get familiar with the new way of doing things more easily in the cloud, I miss the old Tcode based approach 

Steps on How to modify SAP S/4 Hana email template

  1. Find the template to update
  2. Updating the email content, adding system fields
  3. Steps to import and export the changes from the Dev to the production system

Find the email template to update

Open the “ Maintain email template “ app which would list down all the pre-delivered and custom templates as seen below

How to modify SAP S/4 Hana email template

Check some options available below

  1. Click on Change details to update the name of the template etc.

How to modify SAP S/4 Hana email template

  1. You could also copy the template, Create a new one or delete it with the buttons showing up at the top of the table

How to modify SAP S/4 Hana email template

  1. Open the template by Selecting the language and then click on it

How to modify SAP S/4 Hana email template

Updating the email content and adding System fields 

In the next screen you could add your text in the Body HTML tag section with the right HTML tags as you see below. Note there is also an option for adding Body Plan text as seen with the yellow box but then it does not have the proper formatting. If you are looking for Hyperlinks, Bold, line breaks and para breaks to be shown using Body HTML

Arrow indicates how you could add system fields. I am adding a copy of how we used the organization fields in the email.

Dear Sir or Madam,

Please find the billing document {{BillingDocument}} posted on {{BillingDocumentDate}} for the amount {{TotalNetAmount}} {{TransactionCurrency}} attached.

If you have any questions, please do not hesitate to contact us.

Best Regards,

{{_SalesOrganization._CompanyCode.CompanyCodeName}}

{{_SalesOrganization._CompanyCode._Address.StreetPrefixName}}
{{_SalesOrganization._CompanyCode._Address.AdditionalStreetPrefixName}}
{{_SalesOrganization._CompanyCode._Address.StreetName}}
{{_SalesOrganization._CompanyCode._Address.HouseNumber}}
{{_SalesOrganization._CompanyCode._Address.StreetSuffixName}}

{{_SalesOrganization._CompanyCode._Address.PostalCode}}
{{_SalesOrganization._CompanyCode._Address.CityName}}


How to modify SAP S/4 Hana email template

In order to add system, fields click on the “ Show data fields” option and a dialog box opens up with all available fields

There is no search on this dialog box so after scrolling for 5 minutes I came down to S where I see all my sales org specific fields which I wanted to use which I copied from the list and then added to the Body HTML and save the changes

How to modify SAP S/4 Hana email template

Modify Email template in S/4

This completes the changes to be done for the email

Moving changes to production

Now go to the export software collection app and add items

How to modify SAP S/4 Hana email template

To add items look for Form Template and you would see the email template you modified listed below .

How to modify SAP S/4 Hana email template

If however, the changes do not reflect here then please ensure that it is not part of any other collection. As a change can be part of only one collection if this was modified before and sent to production it would continue showing in the same collection with a different version

Even if different users make changes it keeps updating the same collection with a new version as you could see below.

How to modify SAP S/4 Hana email template

Once added it shows the email template as a line item as seen below. Now click on Export and it would then allow sending this change to production

How to modify SAP S/4 Hana email template

In production ensure to use the import collection app and import the changes

How to modify SAP S/4 Hana email template

Conclusion: How to modify SAP S/4 Hana email template

This completes the process and steps on how to modify SAP S/4 Hana email template. We are now able to complete the changes to the email template in S/4 and send changes from Dev to the Production system. 

Thanks for reading hope you liked the article and found it useful 

Read the Article posted on SDN here

Introduction- SAP Create Custom CDS View

SAP Create Custom CDS View can be used to generate the user’s own data access, in case they require access to data in the ERP system which is either not available in the standard apps or a report is needed to give more visibility to stakeholders or to create custom application that reads data from SAP.

Generally, the data of an application is spread across numerous database tables. SAP create custom CDS view that permits you to model the data access without altering underlying database tables. You can reorganize the table fields and define the metadata of the fields that fit into one object but then are set in different databases. Follow these steps when you are ready to create an app through the SAP create Custom CDS view.

Below is the summary of the steps we would be following 

  1. Creating CDS View
  2. Specify Join condition
Check the logs and publish the CDS view which would be ready to use. 

Create Custom CDS view

Custom CDS view to create an app. Go to Custom CDS view and click on create to add new

SAP How to create custom CDS view

Specify the CDS view name, Label and scenario get automatically selected

However, I prefer to create an analytical dimension

Note the scenario once selected cannot be changed later.

SAP How to create custom CDS view

SAP How to create custom CDS view

Create the CDS view and then click to add data source 

  1. Click on Add button
  2. Type the data source in the search
  3. Select the data source

Note that it would show you the data source based on the Analytics data category so if your CDS view was a standard CDS view the Analytics data category if dimension would not show up

SAP How to create custom CDS view

This adds the primary data source. Now we add the associated data source to this

SAP How to create custom CDS view

And now add the join condition between primary and associated data sources

SAP How to create custom CDS view

Specify Join condition 

  1. Select cardinality
  2. Select how both primary and associated data sources are connected as seen below

SAP How to create custom CDS view

And select the fields needed from both views by selecting the specific field.

SAP How to create custom CDS view

So the fields show on the Elements screen now which was selected

Also remember to select the entire I_product and add as its own reference as highlighted below

SAP How to create custom CDS view

In the element Tab, you could specify the master data view. It is not mandatory but sometimes it does give errors. If it does not show the right view in the dropdown then use the previous step to add to the elements section where you could see _i_Product and then it would show up in the dropdown as below

SAP How to create custom CDS view

Check the log there should not be any error and publishing should be successful. Click on preview

SAP How to create custom CDS view

Check Preview and it opens up the next view where you would see the result of the CDS view created.

SAP How to create custom CDS view

Conclusion – How to Create Custom CDS View

In this article, we talked about the steps used to create an app with the help of the Custom CDS View. Which in general, are intended to be consumed by a UI, analytics, or other systems.

Follow these steps and it should be easy to create a Custom CDS view in the system.

If you would like to know how to use this CDS view created to create a custom analytical query please refer the blog  How to create Custom Analytical Query

S/4 Hana Creating Custom Analytical Query and publish as an app

S/4 Hana Creating Custom Analytical Query is a an app used for reporting and analysis Moreover, S/4 Hana Creating Custom Analytical Query offers the fields required to design a query. The user can select the required fields and set filters for the query.They can add restricted measures, calculated measures, and preview the query results hereafter following these simple steps, you can create various Custom Analytical Queries.We follow the below steps to create custom Analytical query

  1. Creating Custom Analytical query 
  2. Update display section
  3. Update filter section
  4. Publish as an app
 

Note that this blog refers the CDS view created before please refer to the link below on How to create CDS view

Create Custom Analytical Query

We can now use the custom CDS view created to create a new custom Analytical query

S/4 Hana Creating Custom Analytical Query

Specify the name and click on next

S/4 Hana Creating Custom Analytical Query

Go to field selection and select the checkbox and the fields would start showing on the right side “ Free” Section

S/4 Hana Creating Custom Analytical Query

Update display Section

  1. Select the row
  2. Then choose if you want to display it or not
  3. Which axis it should show up
  4. Sorting is enabled or not
  5.  Then click on up and down to change the sequence of the fields

S/4 Hana Creating Custom Analytical Query

Update filter section for S/4 Hana Creating Custom Analytical
Query

  1. Click on the filer to define filters
  2. Select the row for the specific fields to make a filter
  3. Then Check filter options and for now, I have selected user input value as a filter with “selection type” “Interval”

S/4 Hana Creating Custom Analytical Query

After publishing check the query  then this is how it looks like with just 1 filter which was added as the storage location

S/4 Hana Creating Custom Analytical Query

Publish custom analytical query as an app 

Open the view browser app and find your specific query and look for the application ID, Note that it may sometime take time to appear if you just published. 

S/4 Hana Creating Custom Analytical Query

Hereafter refer below image how it should look like S/4 Hana Creating Custom Analytical Query

Now select the Application ID and go to Custom catalog extension and search the using the APP ID and then add to the specific catalog you would like to see it in.

This would add the app to the catalog and then it would be shown as an app on the Fiori Launchpad. 

S/4 Hana Creating Custom Analytical Query