You can manually test the application from SAP Business Application Studio.
-
To edit the development credentials in the package.json file, replace the placeholders such as
{{b1-hostname}}
,{{test-user}}
,{{test-password}}
, and so on with the information of your ERP test system:"cds": { "requires": { "b1_sbs_v2": { "kind": "odata", "model": "srv/external/b1_sbs_v2", "csrf": true, "csrfInBatch": true, "[development]": { "credentials": { "url": "https://{{b1-hostname}}/b1s/v2", "authentication": "BasicAuthentication", "username": "{{test-user}}", "password": "{{test-password}}" } }, "[production]": { "credentials": { "destination": "b1", "path": "/b1s/v2" } } } } }
-
Run the command
cds watch --profile development
on the command line interface. This will start the web application with the above development configuration.
There are some points to consider in regards of the connection to the ERP system. In case of issues, the following sections may help.
The Create Project buttons are dependent on the setup of the destinations. Once the destinations are correctly configured and the application is deployed to SAP BTP Cloud Foundry runtime, the button to create projects will be active.
To test this button locally, edit a specific connector, for example, for SAP Business ByDesign connectorS4HC.js. In method createConnectorInstance, change the value of connector.isConnectedIndicator to true after the connector instance is created:
const connector = new ConnectorS4HC(data);
connector.isConnectedIndicator = true;
Note: Change this value because the Indicator value is dependent on the setup of destinations. Destinations only work on a deployed app and cannot be tested locally.
- Open the web application and open one of the poetry slams.
- Choose Create Project. The system creates a project in the desired ERP and displays the details in the Project Details section.
- Click on the project link and the system opens a browser window with the project overview.
Note: The same behaviour is for the SAP Business One destination and the Create Purchase Order button.
In case, the project or purchase order cannot be created in the ERP system, check the hard-coded business data in the connector classes with the configuration in the connected customer system. Therefore, search for the block comment needs to be adopted in the corresponding connector class.
- /srv/poetryslam/connector/connectorS4HC.js
- /srv/poetryslam/connector/connectorB1.js
- /srv/poetryslam/connector/connectorByD.js
The information above is specific to the ERP integration. Find additional hints in the tutorials Test and Troubleshoot and Test and Troubleshoot Multitenancy.