Reuse a CAP Java Service
You will learn
- How to reuse a CAP project through NPM packages
- How to load sample data using CSV profiles
- How to use SQL Tools in the SAP Business Application Studio
- How to use the localized keyword
Now, that your products service is ready to be reused, you’ll build a bookstore application upon it.
In this tutorial you’ll create the model and the services of the bookstore application. After that you’ll initialize the SQLite database of your bookstore application with localized example data coming from CSV files.
You’ll then run your application – still without any custom coding required – and see the localization features of CAP in action.
Great Job! You have successfully developed the bookstore application and reused your products service from the previous tutorial.
In the next tutorial you’ll extend this application with custom code, to calculate the total
and netAmount
elements of the Orders
and OrderItems
entity. In addition, you’ll add custom code that will decrease the stock in the Books entity whenever an order is created.
-
Step 1: Create bookstore project skeleton
-
Step 2: Install reusable service as npm dependency
-
Step 3: Define bookstore domain model
-
Step 4: Define bookstore service
-
Step 5: Load sample data using CSV files
-
Step 6: Deploy bookstore domain model
-
Step 7: Configure database usage
-
Step 8: Use SQL tools in SAP Business Application Studio
-
Step 9: Run and test the bookstore application
- Back to Top