cancel
Showing results for 
Search instead for 
Did you mean: 

How count the total number of instances ?

Former Member
0 Kudos

I have 2 scenarios :-

1. How to get the total number of instances of the node in a BO?

eg :

businessobject BO1 {

element BO_ID;

node NODE1 [0..n]

{

element Node_ID;

element Status ;

element value:

}

}

I want to get total number of the NODES instances in the particular instance of the BO1. !!!?????

2. I want to make some calculations based on the attributes of the NODE1 , in the BeforeSave .absl of the Business Object BO1.

eg:

something like this :-

In BeforeSave of BO1.absl -

for ( all the instances in NODE1 )

{ if (NODE1.status == true)

{

sum = sum + NODE1.value

}

}

Please help !!!!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Your approach is correct.

You can use a standard Query or create your own Query to run through Datainstances.

Documentation with examples for Queries in ABSL see here: https://my020062.sapbydesign.com/sap/ap/ui/repository/SAP_BYD_WEKTRA/CP/sapLSUIContentPlayerTestPage...

Looking / Clincking for "SAP Business ByDesign Scripting Language" and "Syntax for Implementation of Actions and Events" and "Query"