Technical Articles
Generating SAP Fiori table maintenance dialogs in SAP S/4HANA 2021
Introduction
Since there is no SAPGUI access to the ABAP Environment of SAP Business Technology platform the classic table maintenance using transaction SM30 and SM31 cannot be used.
Instead it is possible to create SAP Fiori UI’s as a maintenance UI for a customizing table. This process is called Business Configuration for SAP Cloud Platform ABAP Environment and has been nicely described by Thomas Schneider in the following blog post Business Configuration for SAP Cloud Platform ABAP Environment .
This blog post describes how you can use my openSource based RAP Generator to generator to generate such apps.
Please note:
In SAP BTP ABAP Environment an ADT based wizard is available to generate SAP Fiori table maintenance dialogs as described in the following tutorial:
so this blog post is nowadays only of interest for customers running SAP S/4HANA 2021 where the above mentioned ADT based generator is not supported.
As of version 2021 of the SAP S/4HANA we have in principle all the bits and pieces that are needed to create table maintenance dialogs that offer the following:
- Draft support for convenient data maintenance
- Multi Inline capabilities that allow to edit several lines of your table at once
- An enhanced transport API that provides a nice “Transport request” button in your SAP Fiori app
But … how to create SAP Fiori UI based on one table or a table with a second table that contains some texts with the above described features is not self explaining and the information is scattered across multiple locations.
Developing Transactional Apps with Multi-Inline-Edit Capabilities – SAP Help Portal
Since it requires a lot of manual steps to create all the repository objects needed it would be nice to have those being generated also on SAP S/4HANA 2021.
Generating SAP Fiori table maintenance apps
A while ago I published my RAP Generator that is able to generate a RAP business object based on one or more tables.
With the latest update of my generator there is now support for all the features needed to generate a SAP Fiori app that supports multi-inline capabilities, self registration in the Business Configuration App and code generation so that changes are automatically recorded in customizing transports.
In addition I have added a SAP Fiori Elements UI that can be started via the Fiori Elements Preview.
Prerequistes
You have to use an ABAP environment system in SAP BTP where you have to install the RAP Generator as described here:
https://github.com/SAP-samples/cloud-abap-rap/blob/main/README.md#download-and-installation
How to section
In this section I will describe how to generate the same app as described in the above mentioned tutorials that allows to maintain data for a holiday factory calendar alongside with description texts.
In addition this app is registered in the Business Configuration App and muti-inline support is added.
Last not least the code for persisting your changes to a transport request can be generated as well.
This however cannot be tested in the trial systems.
Step 1 – Create a package
We start by creating a package Z_RAPGEN_BUSINESS_CONF with ZLOCAL as the superpackage. Don’t forget to check the Add to favorite packages check box
Step 2 – Run the RAP Generator
Open the service binding of the RAP Generator
and press the New Project button.
In the popup enter the name of the root entity (here: Holiday) and the name of the package (here Z_RAPGEN_BUSINESS_CONF).
- On the object page of the RAP Generator project enter the implementation details:
Implementation type: managed semantic
Datasource type: table
Binding type: odata_v4_ui
Draft enabled: X
Then refresh the browser or simply press RETURN so that the additional fields become editable:
Multiinline Edit: X
Customizing table: X
Register for Business Configuration App: X
- Then click on the root entity Holiday to maintain the details for this entity.
Enter the name of the table zdmo_fcal_holi in the field Data Source and press RETURN.
You will notice that the mapping for the field names is performed automatically and that appropriate repository object names are being generated.
The press Apply.
In the object page of the RAP Generator project
- Select the root entity
- Press the button Add Child.
In the popup enter the name of the child entity (here: HolidayText).
Now maintain the details of the child entity and enter the name of the data source. This is the table zdmo_fcal_holi_t.
You will see that all the field names are mapped to your needs and that appropriate repository object names have been generated.
Press Apply.
Your will notice that in the screen section RAP Generator the generation status is shown which is actually Scheduled.
The status of this field now changes from Scheduled to In Process and finally to Finished.
When you click on the ADT link you will navigate back to your ADT and you can refresh the package and check that the following objects have been generated:
Step 7 – Publish the service binding locally
Open the generated service binding ZUI_HOLIDAY_S_O4 and press the Publish button.
You will now see that the service contains four entities
Holiday – which contains the holdiday days
HolidayText – which contains the language dependend descriptions
Holiday_S – which is the Singleton entity that has been generated in order to enable the multi inline edit feature. The RAP Generator simply takes the name of the actual root entity and adds a “_S” which denotes “Singleton” to the name it.
Language – The RAP Generator adds an entity Language as a value help if a field of type SPRAS is part of any of your entitites. Likewise it would add an entity for Currency or Unit of Measure if needed.
Step 8 – Test your service
You can start the Business Configuration App simply from whithin ADT. For this you have to right-click on your project and select Properties.
On the following screen click on ABAP Development and there on the URL that is denoted as System URL.
By clicking on this URL the SAP Fiori Launchpad of your ABAP environment opens. Here you have to select the tile Maintain Business Configuration.
This now opens the Business Configuration App where you should see the app Holiday_S_01 maintenance that you have just generated and published.
Please note:
When you do not see the app listed here please check if you have published your service locally. By publishing the service locally the appropriate authorizations for viewing it are added to the business catalog that is part of your Developer role.
When clicking on the list entry a SAP Fiori Elements app (similar to the preview app) will be started. But since multi edit is enabled it automatically will skip the “virtual” entity Holiday_S which is based on the singleton entity.
Here you can add mulitple rows to the Holiday entity. All the data you enter is saved automatically as a Draft. And it is possible to download the data as an Excel and paste multiple new values from such a Excel template back into your system.
Paste multiple entries
Pasting multiple entries works as follows.
- Select the data from your Excel
Press the button Paste.
- This opens the following dialogue
- Paste the selected data using Ctrl+V
Save data to a customizing transport
When you have chosen the parameter
“isCustomizingTable”: true
in your JSON configuration file you will see a button in your app that will allow you to select a customizing transport request.
Hi Andre Fischer
It's very much needed information. Thanks for this blog.
My concern/question is ... when we have this maintenance table working in FIORI launchpad of ABAP... Does it make sense to give access of this to a business user(not a developer) so that he/she can maintain entries?.. i mean this all functionality is relevant for developers only or for any other users as well.
Please suggest.
I think it depends on who is doing the customizing settings in your system. But the Maintain Business Configuration App is not a replacement for the SAP Fiori Launchpad.
So you deploy SAP Fiori Apps for End Users on the Fiori Launchpad (either on the ABAP Environment System or on BTP) and the Business Configuration App will be used to list all this kind of apps that are not used frequently to perform customizing.
Thanks Andre for your answer.
My requirement is giving customizing option for tables which are not frequently changed. For example: like maintaining regions in a table. So, as per your view, business config app will be fine for this. Do you have any further suggestions?
Hi Andre Fischer ,
we have similar requirements.
Is it currently possible to use multiInlineEdit without "Maintain Business Configuration"?
I tried to generate a Fiori Elements App from the generated service, but unfortunately the inline creation does not work as in "Maintain Business Configuration".
Is this even supported On Premise, if yes, what are the requirements here?
I´m a bit confused because there are few documentations on there with v2/v4:
https://ui5.sap.com/1.96.0/#/topic/cfb04f0c58e7409992feb4c91aa9410b
Cheers!
Marian
Hi Andre
Thanks for the nice Blog. Infact this will be very useful to replace GUI based table maintenance generator for cloud ready deployments.
We can also use In-App extension option of Custom Business Objects to generate Fiori App for this scenario. However, we should start the process for newly created DB tables. This approach mentioned here can be used for existing tables.
@Pankaj Yadav: As Andre mentioned configuration can be used by business user or any type of user based on your requirement. You may assign the newly created app to catelaog/group/Roles which you can assign to the user groups that you want to provide access to.
Kind Regards
Suresh
Hi Andre
Thank you for the nice blog. I try to download and follow the step in this Blog. But seems the class /DMO/CL_RAP_GENERATOR has error or on development progress?
Thank you
Which URL do you use to download it and in which kind of system do you try to install it.
The scenario here only works in an SAP BTP ABAP Environment system. The process of download and installation is described in the GitHub repository readme file
https://github.com/SAP-samples/cloud-abap-rap/blob/main/README.md#download-and-installation
Syntax errors can occur
a) when you try to install the main branch (which is meant to be used in cloud) in an on premise system because there the XCO library does not contain the latest features that are available in the cloud.
b) when you try to install the on premise version in an cloud system because there the use of the on premise version of the XCO libraries is not permitted.
If you just want to try it out you can also do so in the ABAP environment of SAP BTP Trial.
It’s Trial Time for ABAP in SAP Business Technology Platform | SAP Blogs
Kind regards,
Andre
Hi Andre
Thank you, downloaded the correct path, it's working fine.
Hi Andre,
Thank you for the nice blog. I am developing an object by fallowing your blog.
may i know what is this Schema and how it works here.
No internet connection to my sap system, will this work in that case?
Regards,
Surya
Hey Andre,
Thanks for the blog, few questions.
1. Can i just confirm that this only works at Cloud Platform with ABAP 2108 currently? and so is there a chance to implement this on-prem ABAP 2020? or the ABAP version must be at 2108 also? and we shall wait for the on-prem RAP Generator 2108...
2. If we implement FIORI Table maintenance on our current version ABAP 2020, we can just manually do managed RAP, so my question is how to tag it to a Transport?
Hi Gabby, did you find an answer for on-prem system?
Hi Andre Fischer , thanks for this very useful blogpost.
But I can't use my ZTABLE in your RAP generator. How can we use our Z tables with this logic?
Note: I'm trying on S/4Hana On Premise 2020 FPS01.
Error:
PUT operation failed.
Class name:
CX_XCO_GEN_PUT_EXCEPTION
Source position:
Line 25 of IF_XCO_CP_GEN_D_O_PUT~EXECUTE in CL_XCO_CP_GEN_O_PUT
Additional messages:
DDLS ZUYI_RAPCUSTOMERMAST: Use of Database Table ZCUSTUSERMAST is not permitted.
DDLS ZUYC_RAPCUSTOMERMAST: The data source "ZUYI_RAPcustomermast" does not exist or is not active
DDLS ZUYI_RAPCUSTOMERMAST: DDLS ZUYI_RAPCUSTOMERMAST was not activated
DDLS ZUYC_RAPCUSTOMERMAST: DDLS ZUYC_RAPCUSTOMERMAST was not activated
Hi Andre,
Thank you for the blog. I tried the same steps in my on-premise platform to create table maintenance and could generate the same. But I have few questions:
Thanks
Ishita
Hi Andre,
thanks for Your efforts, code generation for RAP saved a lot of time for me already. I am sure it brings new ideas for lot of us.
As You asked to put feature requests on GitHub as issue, here is one I could imagine about language dependent maintenance views and augmentation. Please review, whether You think it makes sense to have something. I lived with variatey of workarounds so far, to realize language dependent customizing in Fiori.
Thank you, kind regards
Attila
https://github.com/SAP-samples/cloud-abap-rap/issues/3#issue-1007485260
Hi Andre
Excellent solution to the table maintenance dialog problem 🙂
Just as an FYI, I had to manually provide myself with the Business Config role though and my customising transport is not visible. Could this be because it is a local request? (I'm using a licensed ABAP environment).
Thanks
Ian
Hi Ian,
thank you for your nice feedback and your remark with regards to the role you had to assign to your user.
You actually need a role based on the Configuration Expert – Business Process Configuration template and set setting “Write, Read, Value Help” to “Unrestricted” (the default is “No access”, when you create the role from the template.) as described in Thomas Schneiders blog post.
Business Configuration for SAP Cloud Platform ABAP Environment | SAP Blogs
If the problem persists, please let me know by opening a ticket for your licensed system.
Kind regards,
Andre
Hello Andre ,
I was creating multi inline and found that RAP generator only allows this feature for Binding Type OData v4 and not for V2 ?.
Is this the case ?
Can we use Multiline (Edit , create , delete option) , while creating artifacts manually , and not using Generator, for V2 protocol ? or this feature is not available only for V2 ?
Thanks and Regards ,
Shavneet Singh
I don't know and have to check with colleagues that are currently on vacation.
Hello Andre Fischer ,
In prerequisite for RAP generator, GitHub link of sample codes for on premise systems is not working.
Could you please replace this with working link.
https://github.com/SAP-samples/cloud-abap-rap/tree/On-Premise-2020
Thanks,
Harshal
Hi Andre,
I keep getting the below error when I try to save a new project.
Your changes could not be saved. A more recent version is available. To make changes to the latest version, please refresh the data.
The "Generate ABAP Repository Objects..." option is available on 2022 for On Prem. I was able to generate, activate the service and maintain entries on a transport via the "preview" option of the service binding.
Hello Andre Fischer,
Thank you for this great blog article and the work you've done for the RAP Generator.
I would like to try it on my S/4HANA 2021 ON-PREMISE (SP02) but I am facing the following issue while I pull the branch on-prem-2021 through abapGit :
For information, I am using the last version of abapGit.
Do you know how I could fix this issue ?
Thank you in advance and best regards,
Cedric
Hello,
Well it seems the problem come from abapGit which does not support SIA* objects (abapGit documentation - Supported Object Types).
Best regards,
Cédric
Same Issue here :/
HI Andre Fischer,
I have installed RAP generator in S/4 on-Prem 2021, the installation was sucess full however I was not able to see the New Project button in the application, Kindly help.
Regards,
Arun
What can be done if the Fiori Elements preview does not work with the RAP Generator (no popup when pressing “New project”)? | SAP Blogs
Hi Andre,
I have already done that but still not working. Please advise.
Thanks and Regards,
Arun
hi Andre Fischer,
Thanks a lot for sharing this wizard, it's very interesting and I was looking for an efficient replacement for the table maintenance view generator we are so used to.
I have a View Cluster (parent-child) of 2 Customizing-type tables, and I do not have the option of inserting new table entries into a Transport Request.
I imported your onPremise-2022 version of the generator/wizard, and it does not have the checkbox to identify this scenario as a "customizing table", which seems to be required to generate the required code to handle Transports.
Am I missing something please, or is there an easy fix to this problem?
Thank you.
In SAP S/4HANA 2022 there is now an ADT based wizard available that is specifically built for this scenario.
As I wrote this blog post is thus only targeted
Create a SAP Fiori based Table Maintenance app with SAP BTP, ABAP Environment | Tutorials for SAP Developers.
The reason why you have not seen the checkbox is probably because there are validations in place that check
a) that the table is of type "C".
b) that OData V4 is used as a binding type
--> I found while testing on 2022 that there are some issues that I need to fix to get this working again.
So I would recommend to stick to the SAP standard.
Kind regards,
Andre
Hi Andre Fischer
Is it possible to maintain holidays with language specific holiday text for multiple entries? using mass upload from a single Excel file?
We are looking for a way to meet this requirement.
Thanks,
Manoj
That should be possible since RAP business objects can always be implemented in a way that they are mass enabled.
Hi Andre,
Thanks so much for the blog. I successfully generated table maintenance dialog using RAP Generator. I have a question, maynot be related to RAP generator, I have created Travel App using RAP and created oData V4 service binding in BTP. I want to provide this app as a tile in the Fiori Launch Pad but I didnt find any useful documentation to achieve this. Same case with Table maintenance generator. Is it possible to tile'ise the end result on FLP rather than using "maintain business configuration" umbrella. Can you direct me to any blog or documentation that I can use.
Appreciate your support.
Regards
Kasi