SAP Knowledge Base Article - Public

2773219 - Error While Activating the Script File: Identifier is typed. Collection type is expected.


You have created a script and during the save/ activation, below error occured:-

Identifier is typed as 'Node(X.Root)'. Collection type is expected, where X is the custom business object name.


SAP Cloud Application Studio

SAP Business ByDesign

SAP Cloud for Customer

Reproducing the Issue

  1. Login to SDK.
  2. Open the solution.
  3. Navigate to the script which you have created.
  4. Click on Activate.
  5. Error occured.


You are using Foreach loop in the script, but the type of the variable which you have declared is not of collection type.


For using Foreach loop, the type of the field which you are trying to loop should be of collection/ structure type. For example, Node name which you have declared in your custom BO can used as the type for the field Z, and you can use foreach with this field.


Error while activating the script error in action script error while using foreach loop Identifier is typed 'Node(BO.Root)' , KBA , identifier error when activating script , collection type is expected , identifier is typed , AP-RC-BDS-BO , ByDesign Studio BO definition/generation , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , Problem


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