This tutorial offers a step-by-step guide on developing and deploying the Music Festival Manager. Initially, you set it up as a multitenancy solution. Later, you enhance it with SAP S/4HANA Cloud integration and additional features.
If you prefer a quick start without further explanation and want to the application with all features, follow these steps:
Important
Update your Eclipse and ABAP Development Tools (ADT) to the latest versions to ensure you have all the necessary features for a smooth experience.
-
Enable the entitlements mentioned in the bill of materials of the multi-tenant application.
-
Create the software component in the SAP BTP ABAP environment. To create a software component, follow these steps:
- Navigate to your SAP BTP subaccount where the ABAP instance is created.
- Select the ABAP Environment Service Instance name under Instances on the Instances and Subscriptions tab in your subaccount. The ABAP landscape opens in new tab.
- Search for the Manage Software Components app and choose Create.
- Enter the following sample information:
- Namespace: Z
- Name: PRA_MF
- Description: Music Festivals
- Type: Development
- Choose Create. The software component is created and a page with it opens.
- Choose Clone. In the popup dialog, choose OK.
-
After creating the software component, you create an ABAP Cloud project in Eclipse. Then, you onboard the software component in Eclipse ADT.
-
Once done, you include the software component into the project.
- Right-click on Favorite Packages under your project and choose Add package.
- Select the software component created above, for example ZPRA_MF.
The software component is present in your local system in ADT.
-
You have to create the following packages manually under your generated package for software component.
- ZPRA_MF_SERVICE - Description: Music Festivals - Data Model and Services
- ZPRA_MF_UI_MNG_MUSIC_FESTS - Description: Music Festivals - Fiori App - Manage Music Fests
- ZPRA_MF_UI_MNG_VISITORS - Description: Music Festivals - Fiori App - Manage Visitors
Note
For detailed, step-by-step instructions on creating packages, refer to the Package Creation section.
-
- GitHub URL - https://github.com/SAP-samples/abap-partner-reference-application
- Branch - main
Note
For authentication, generate a Personal Access Token (PAT) from your Git account. Ensure that the token has the necessary scopes/permissions for the required operations, such as repository access, and use it in place of your password for secure authentication.
-
Pull the repository by right-clicking on the
ZPRA_MFpackage name under the abapGit repositories window and choose Pull.
Note
The pull operation doesn't succeed initially because the SAP Fiori application hasn't been deployed yet. Consequently, the ABAP objects related to the SAP Fiori application aren't pulled.
-
Choose Activate inactive ABAP development objects
(Shortcut - Windows: Ctrl + Shift + F3; Mac:Cmd + Shift + F3) to activate all the objects that are pulled from the Git repository. Follow the sequence below to ensure a successful activation of the objects:- Activate Dictionary Objects: Start by activating all dictionary objects. These include:
- Domains
- Data elements
- Database tables
- Activate Core Data Services: Start by activating all core data services. These include:
- Data Definitions
- Behavior Definitions
- Activate Source Code Libraries: Proceed to activate all source code libraries, such as classes.
- Interfaces
- Classes
- Activate Remaining Objects (Excluding Specific Ones):
- Activate all objects except the following:
ZPRA_MF_MusicFestivalZPRA_MF_VisitorZPRA_MF_UI_MUSICFESTIVAL_O4ZPRA_MF_UI_VISITOR_O4ZPRA_MF_LSTZPRA_MF_LPT
- Activate all objects except the following:
- Activate all remaining objects except
ZPRA_MF_LSTandZPRA_MF_LPT.
- Activate Dictionary Objects: Start by activating all dictionary objects. These include:
Note
- The activation process may fail for some objects due to dependencies or missing components.
Caution
Ensure that all ABAP objects, except ZPRA_MF_LST and ZPRA_MF_LPT, are activated successfully before proceeding to the next step.
-
Follow the steps below to publish the OData services in ADT:
- Open the ADT in Eclipse.
- Use the search functionality to locate the following service bindings:
ZPRA_MF_UI_MUSICFESTIVAL_O4ZPRA_MF_UI_VISITOR_O4
- Select each and choose Publish.
Tip
- To search an ABAP object in ADT, use the shortcut:
- Windows:
Ctrl + Shift + A - Mac:
Cmd + Shift + A
- Windows:
-
Follow the prerequisites steps before proceeding with SAP Fiori application development.
-
Now, let's deploy the Music Festival Manager and Visitors SAP Fiori applications.
-
Open SAP BAS and clone the ABAP Partner Reference Application repository.
-
Open the terminal in the abap-partner-reference-application folder and run
cd fiori-apps/. -
Replace the content below with your own:
i. Service URL - Search for <ABAP_SERVICE_URL> and replace it with your ABAP service URL.
ii. Destination - Search for <DESTINATION_NAME> and replace it with your destination name to connect to your ABAP service.
iii. Transport Request Number - Search for <TRANSPORT_REQUEST> and replace it with your transport request number in the ui5-deploy.yaml file for both the Music Festival Manager and the Visitors applications.
iv. Authentication Type - The
reentranceTicketauthentication type is mandatory when your SAP BAS and SAP BTP ABAP environment instances are in different SAP BTP subaccounts. If both instances are in the same SAP BTP subaccount, you can comment out this setting because it isn't required. -
Steps to Deploy the Music Festival Application:
- Navigate to the
musicfestivalsfolder. - Run the following commands in sequence:
npm install- Installs the required dependencies for the application.npm run deploy- Deploys the application to the SAP BTP ABAP environment.
- Navigate to the
-
Steps to Deploy the Visitors Application:
- Navigate to the
visitorsfolder. - Run the following commands in sequence:
npm install- Installs the required dependencies for the application.npm run deploy- Deploys the application to the SAP BTP ABAP environment.
- Navigate to the
-
Ensure that the deployment processes for both applications complete successfully before proceeding to the next steps.
-
Tip
- If the deployment fails on the first attempt, try to retrigger the deployment to resolve any transient issues.
- If you encounter an error stating "duplicate ID in SAP UI5 repository" during deployment, open your manifest.json file and update the id field under the "sap.app" section to a unique value. Then, try deploying again.
- After successfully deploying the SAP Fiori applications, return to the abapGit repositories window in ADT and perform the pull operation again to fetch the remaining ABAP objects related to SAP Fiori applications.
- Right-click on the
ZPRA_MFpackage name under the abapGit repositories window and choose Pull. During the pull operation, verify and keep the following objects unchecked:ZPRA_MF_MF_UI5RZPRA_MF_VSTR_UI5RZPRA_MF_UI_MUSICFESTIVAL__00001_IBSZPRA_MF_UI_VISITOR_O4_0001_G4BA_IBS
- Verify that all remaining objects are successfully pulled into the ABAP environment.
- Right-click on the
Note
These objects are already created during the deployment of the SAP Fiori applications and don't need to be pulled again.
-
Open the Launchpad Page Template
ZPRA_MF_LPTand update both visualizations under the sectionZPRA_MF_SECTION_MF:- Expand visualization section
- Select the visualization to update
- Update 'Tile Id' by clicking on browse, search with '*'. Select the first entry and click ok.
- Save the launchpad page template.
-
Follow the steps below to publish the business role templates in ADT to enable the necessary roles for the application:
- Open the ADT in Eclipse.
- Use the search functionality to open the following objects:
- Business role template
ZPRA_MF_DISP_BRT - Business role template
ZPRA_MF_UPD_BRT - Communication scenario
ZPRA_MF_CS_ENT_PROJ
- Business role template
- Select each and choose Publish Locally.
-
The Service Consumption Model as explained in Integration with SAP S/4HANA Cloud Public Edition guide needs to be created as this is not imported by abapGit.
- First, delete the imported class
ZCL_PRA_MF_SCM_ENT_PROJas this will be generated in the next step. - Please follow steps 1 and 2 of section Import SAP S/4HANA Cloud Public Edition OData Services and then continue with step 17 here.
- First, delete the imported class
-
Scope in the launchpad page and space templates to enable navigation and role-based access.
- Open the ADT in Eclipse.
- Use the search functionality to locate the following class:
ZCL_PRA_MF_SCOPE_PG_SP_TMPLT
- Right-click on the class and select Run As > ABAP Application (Console) to execute the scoping process.
-
Create the business roles and assign the business users in the ABAP landscape
-
To integrate your SAP BTP application with the SAP S/4HANA Cloud Public Edition, follow the steps outlined in this guide: Integration with SAP S/4HANA Cloud Public Edition.
You've successfully deployed your SAP Fiori applications.