This is a list of common questions on Business Objects and Scripting in the SAP Cloud Applications Studio, that we frequently receive from partners and customers. I have tried to answer some of them here, and will keep adding to this list.
1. Why should I use scripting language?
You use the scripting language to implement the business logic for cloud partner solutions. This language is easy to learn. In the studio, script files are used to implement the business logic for events, validations, or actions of business object nodes.
2. When should I use the dump analysis tool in the Cloud Application Studio?
You can use the Dump Analysis tool window to list the runtime errors that have occurred in the tenant to which you have logged on. The tool window presents the dump information in a reader friendly format and supports you in finding the root cause of a dump.
If the Dump Analysis tool window is not visible in the studio, you can access it by clicking View->Dump Analysis .
3. What is the use of the debugging functionality in the Cloud Applications Studio?
Yes, you can use debugging to observe the runtime behavior of your solution and to locate logic errors. For more information related to debugging you may refer to the help documentation available in SDK.
4. How can I use the tracing functionality in the Cloud Applications Studio?
You can use tracing to record information about your code as it is being executed. From the Trace Explorer, you can run a local trace, run a trace for an end user, use incident traces for troubleshooting purposes, and view the results of a recorded trace.
The Debug toolbar provides buttons that allow you to start and stop tracing separately.
You can access the tracing functions as follows:
To enable the Trace Explorer tool window, click Debug->Windows->Trace Explorer .
The Trace Explorer provides a view of active and completed traces.
5. What are the different content types supported in the Run Performance Check ?
The Run Performance Check can be used on the following content types :
- Business Object(.bo)
- Extension Business Object(.xbo)
- ABSL scripts(.absl)
- UI Files
- Solution Level(Top level containing the solution name in Solution Explorer)
To find improvements in your solution, use the Run Performance Check option.
To execute the Run Performance Check at solution level, right click the solution and click Run Performance Check.
For more information related to this option you may refer to the following link https://blogs.sap.com/2018/02/06/sap-cloud-application-studio-performance-check/
6. What is Mass Enable Functionality?
You can specify whether a script file is to be executed for multiple instances of business object nodes, which is referred to as mass enabling.
If you work with mass-enabled script files, consider the following:
- To mass enable a script file, you select the Mass Enable checkbox in the Create Script Files dialog box.
- If you want to modify a mass-enabled script file so that it can only be executed for single instances of business object nodes, you need to delete the script file first and then re-create it.
7. What events are supported in scripting?
The following events are provided by the system:
This event determines the data of a node when the data has been changed. This is especially useful for derived data that needs to be updated immediately.
This event determines the current data of a node. Please note that if a BeforeSave script file has modified a business object node, the system doesn’t execute the code of an AfterModify script file for this same node anymore.
You can implement this event to modify transient fields (only available for business objects) of the current node of a business object. The system executes the After Loading event when it reads a node instance of a business object from the data base.
• On Delete:
The solution uses this script when the instance of the business object gets deleted and SAVE is triggered.
8. Why is my script file not getting called?
This might happen because, in your business logic, you have not changed the instance of the node for which you are expecting the script to be called.