SAP Knowledge Base Article - Public

2993815 - Activation Error: Identifier is read-only and cannot be changed

Symptom

You receive the following error message when trying to save or activate an .ABSL script file in your custom solution within the SAP Cloud Applications Studio:

"Identifier 'My_Field' is read-only and cannot be changed" (where My_Field is the name of an element)

script_kba.png

“Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.“ 

Environment

  • SAP Business ByDesign
  • SAP Cloud Applications Studio 
  • SAP Cloud for Customer

Cause

Case 1:

The cause for this issue can be related to the Deployment Unit of the affected business objects.

You can directly access business objects that reside in the Foundation deployment unit from any deployment unit (DU). However, business objects in the Foundation deployment unit cannot access any business object residing in another deployment unit, not even by using asynchronous communication. You can only use a query to read the data of this business object.

In case your script was created on a business object that resides in the Foundation DU, you will not be able to write on elements from a business object that resides on the CustomerRelationshipManagement DU, for example.

Case 2:

You are trying to change data in a Validation / ActionValidation script. Validations can only read data and cannot change any values.

Resolution

Case 1:

You can assign the business object to another Deployment Unit by making use of the annotation in your BO: [DeploymentUnit(<deployment unit name>)] businessobject <name> {

Example: [DeploymentUnit(Foundation)] businessobject MyCustomBO {

Case 2:

You must move the custom logic to a supported script type such as an Event.

Keywords

SDK, PDI, Deployment Unit, validation, XBO, BO, DU , KBA , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , AP-RC-BDS-BO , ByDesign Studio BO definition/generation , How To

Product

SAP Business ByDesign all versions ; SAP Cloud Applications Studio all versions ; SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions