Skip to Content

Create a SAP Fiori Shopping Cart App and Deploy it

Create a SAP Fiori app for a business object in Visual Studio Code and deploy it.
You will learn
  • How to create an ABAP package
  • How to create list report object pages
  • How to run SAP Fiori applications
  • How to deploy applications
  • How to check BSP library in Eclipse
mervey45Merve TemelJune 12, 2024
Created by
mervey45
June 6, 2024
Contributors
mervey45

Prerequisites

  • This tutorial can be used in both SAP S/4HANA Cloud, private edition system and SAP S/4HANA on-premise system with release 2023 FPS01. We suggest using a Fully-Activated Appliance in SAP Cloud Appliance Library for an easy start without the need for system setup.
  • The steps for fully-qualified Domain Name & SSL Certificates can be found here.
  • For SAP S/4HANA on-premise, create developer user with full development authorization
  • You have installed the latest Eclipse with ADT.
  • You set up VS Code for Fiori Tools

In this tutorial, wherever ### appears, use a number (e.g. 000). This tutorial is done with the placeholder 000.

This scenario describes the embedded deployment, which features an SAP Fiori front-end server (and the associated components) deployed along with the backend components in the same system.

  • Step 1

    In this step, we’ll create an ABAP package with the superpackage ZLOCAL.

    1. Select ZLOCAL > New > ABAP Package.

      package
    2. Create new ABAP package:

      • Name: Z_SHOPPING_CART_TIER1_###
      • Description: Package ### - Tier 1
      • Superpackage: ZLOCAL
      • Package Type: Development
      package
      Click Next >.
    3. Click Next >.

      package
    4. Click Finish.

      package
    5. Now continue with step 2 of Create an Shopping Cart Business Object. Move on with Enhance the Behavior Definition and Behavior Implementation of the Shopping Cart Business Object and Integrate released purchase requisition API into Shopping Cart Business Object. Afterwards, come back and continue with step 2 of this tutorial.

  • Step 2

    This step is for creating a list report object page. Open Visual Studio Code and open your visual studio projects folder

    1. Open Visual Studio Code and open your Visual Studio Code projects folder. Select the projects folder. Your created projects will later appear in this folder.

      object

      Hint: You can find your folder under: C:\Users\<userid>\projects.

    2. Select the menu on the top and click View > Command Palette.

      object
    3. Search for Fiori: Open Application Generator and select it.

      object
    4. Select Template Type: SAP Fiori, as template List Report Page and click Next >.

      object
    5. Configure data source, system and service:

      • Data source: Connect to a System
      • System: New System
      • System type: ABAP On Premise
      • System URL: https://mysystem.fqdn.com:44301
      • SAP client: 100
      • Service username: <your_username>
      • Service password: <your_password>

      Click the login symbol on the right side to log in.

      • System name: <your_system_ur>
      • Service: ZUI_SHOPCART_O4_### > ZUI_SHOPCART_###(0001) - OData V4
      object

      Click Next >.

      Hint: In case of invalid security certificate errors, follow this link.

    6. Select your main entity ShoppingCart and click Next >.

      object
    7. Configure project attributes:

      • Name: z_shopping_cart_tier1_###
      • Title: Shopping Cart ###
      • Description: A Fiori application.
      • Project folder path: c:\Users\<userid>\projects
      • Add deployment configuration: Yes
      • Add FLP configuration: Yes
      • Configure advanced options: No

      Click Next >.

      object

      An FLP configuration does not have to be created in Visual Studio Code, as this will be created in a later step using tools for setting up the Launchpad content.

      The project folder path has a further substructure.

      Hint: Your module name must be written in lowercase letters.

    8. Configure deployment:

      • Target: ABAP
      • Target system: <your_abap_system_url>
      • Enter client: 100
      • SAPUI5 ABAP Repository: zshopcart_###
      • Package: z_shopping_cart_tier1_###
      • How do you want to enter Transport Request? Manually
      • Transport Request: <your_transport_request>
      app

      Click Next >.

      Hint: If you want to copy your transport request, please do following: Open Eclipse, search your package Z_PURCHASE_REQ_### and open it. Open your transport organizer to see your transport request. The transport request of the superior folder needs to be chosen. Copy your transport request for later use. You can find your transport request underneath the Modifiable folder.
      app
    9. Configure Fiori Launchpad settings:

      • Semantic Object: z_shopping_cart_tier1_###
      • Action: maintain
      • Title: Shopping Cart ###
      app
      Click Finish.
  • Step 3

    In this step, we’ll run the SAP Fiori application, to check

    1. In the Application Information overview, select Preview Application to start the preview.

      deploy
    2. Log in with your credentials. Then select the first entry in the search bar.

      url
    3. Your browser opens. Click Go and check your application.

      url
  • Step 4

    This step describes the deployment of the created application.

    1. In the Application Information overview, select Deploy Application to start the deployment.

      deploy
    2. When prompted, check deployment configuration and press y. Open the URL at the end of the deployment log in browser to preview the application.

      deploy

      When the deployment is successful, you will get these two information back as a result: deployment successful.

      Hint: If an error message appears, use the Environment Check.

  • Step 5
    1. Open the URL to open the deployed application.

      deploy
    2. Click Go and check your application.

      deploy
  • Step 6
    1. Open Eclipse and check the BSP library in your package z_purchase_req_tier1_###. You can find your package under Local Objects (ZLOCAL) > User123. If you are not able to see BSP applications and SAP Fiori Launchpad app description items, refresh your package by pressing F5.
      library
  • Step 7

    Where can you start the deployment process?

Back to top