In this How to guide, I will take you through the steps required to Download, Import and Deploy SAP Service and Asset Manager metadata definitions to Mobile Services.
Scenario:
1. Download SAP Service and Asset Manager 2310 metadata definitions.
2. Import in SAP Business Application Studio.
3. Deploy in SAP Mobile Services.
Step 1: Downloading metadata definitions
SAP Service and Asset Manager client application is developed with Mobile Development Kit (MDK), which is a metadata-based application development platform. Main application functionalities of SAP Service and Asset Manager are controlled by MDK metadata. With each release of SAP Service and Asset Manager, the complete set of application metadata definitions are released.
To find metadata files for SAP Service and Asset Manager releases, use SAP for Me software center:
https://me.sap.com/softwarecenter
Search By Category → SAP Mobile Solutions → SAP SERVICE AND ASSET MANAGER→ SAP SERVICE AND ASSET MANAGER → SAP SERVICE AND ASSET MANAGER nnnn. ‘nnnn’ is the release number of SAP Service and Asset Manager.
SVC ASSET MGR METADATA nnnn – SAP Service and Asset Manager application metadata. The file name has the format ASSETMGRMTADTA###_#-########.zip
Download the ZIP file. In case of multiple items, download the latest Patch Level ZIP file.
Step 2: Importing in SAP Business Application Studio
SAP Business Application Studio is a new SAP Business Technology Platform (SAP BTP) service that offers a modern development environment tailored for efficient development of business applications for the SAP Intelligent Enterprise.
SAP Business Application Studio is based on Code-OSS, an open-source repo used for building Visual Studio Code. Available as a cloud service, SAP Business Application Studio provides a desktop-like experience similar to leading IDEs, with command line and optimized editors.Contact your BTP Admin for BAS subscription and launch link. Sample link format:
https://<subaccount_string>.<region_string>.applicationstudio.cloud.sap/
- Launch Business Application Studio via link.
- Create the Dev Space.
A dev space is a pre-configured private environment (your own "virtual machine" on the cloud) where you can develop, build, test, and run using pre-installed runtimes and tools. Enter name of your choice and choose SAP Mobile Application.
- Start the Dev Space.
Upon creation of the Dev Space, start the dev space if it does not automatically start.
- Launch the Dev Space.
To launch the Dev Space, click the Dev Space Name hyperlink.
- Go to Menu, select File → open Folder.
Enter /home/user/projects and hit OK.
Once within Dev Space, choose Import (or) Go to Menu, select File → Import Project.
- Select the ASSETMGRMTADTA00P_1-70008341.ZIP file that was downloaded from Software Center. It will upload, extract and open the project automatically.
To manually open the project, Go to Menu, select File → open Folder.
Enter /home/user/projects, choose project and hit OK.
- Delete the SIGNATURE.SMF file.
- Go to Menu, Select View → Command Palette >CF: Login to Cloud Foundry.
- Enter Cloud Foundry Endpoint and login using preferred authentication method.
Select your Org and Space.
Note: You can find API Endpoint in SAP BTP Cockpit - Subaccount Overview.
- Add MDK Bundler externals from Branding SDK.
To find Branding SDK files for SAP Service and Asset Manager releases, use SAP for Me software center:
https://me.sap.com/softwarecenter
Search By Category → SAP Mobile Solutions → SAP SERVICE AND ASSET MANAGER→ SAP SERVICE AND ASSET MANAGER → SAP SERVICE AND ASSET MANAGER nnnn. ‘nnnn’ is the release number of SAP Service and Asset Manager.
bundlerExternals to be included are available in Branding SDK → SAPAssetManager → SAM.mdkproject → MDKProject.json
In Business Application Studio,
Go to Menu, Select File → Preferences → Settings.
Search for Mdk: Bundler Externals
Choose Edit in settings.json, add the externals from MDKProject.json like below and save.
Step 3: Deploying in SAP Mobile Services
SAP Mobile Services is a cloud-based offering that is complemented by various development tools such as the native SDKs for iOS, Android, the mobile development kit or SAP Mobile Cards.
Application is already created in Mobile Services via App Create Program. It can also be created manually in Mobile Services, but applicable only in non-productive environment. Refer
3320366 - SAP Service & Asset Manager Production App Create and Metrics and Checklist for more details.
Right click on the Application.app file in the project root directory and select MDK Deploy.
You will see a series of prompts to deploy the app.
Select Mobile Services as the deployment target.
Select standard as the Mobile Services landscape.
Select the appropriate application from Mobile Services.
Select No to Include source map file for debugging.
Select MDK 23.4+ as target MDK client version.
If the schema version of your project is lower than 6.0 and there are .ts files in the Extensions folder, you will be prompted to choose the target client version. Choose appropriate version based on your target MDK client version.
_SchemaVersion can be maintained in Application.app
In the .project.json file, Build section contains target client option configuration. Check detailed explanation in the following table:
Deployment process will be initiated. MDK: Deploy will perform following tasks.
- MDK Validation
- MDK Bundling
- Uploading bundled zip to your app in Mobile Services
- Deploying the bundle to your app in Mobile Services
If the application deploys successfully, a message with the current revision is displayed.
Confirm that the deployment is finished successfully in Mobile Services. This completes the metadata deployment process.
Install and start SAP Service and Asset Manager from the Apple App Store and Google Play Store on your device.
Next Article :How to apply metadata patch in SAP Service and Asset Manager