Single value retrieval
By using the relationships between business objects, you define a path for the script to retrieve a single value for a variable. The script retrieves the value from a business object attribute that is related to the primary business object.
Example of an expression to retrieve a single value
If a script needs to retrieve the quantity declared on the distributed cost for the first PO line of a purchase order. The following relationship expression is used:
POLINE.POCOST.quantity
The expression is interpreted by the script in the following way:
- From the PO business object, traverse to POLINE business object by using the POLINE relationship and retrieve the first POLINE record.
- Traverse to the POCOST business object from the retrieved POLINE record by using the POCOST relationship and retrieve the first POCOST record.
- From the first POCOST record, retrieve the value of the ’quantity’ attribute and set it into the launch point variable.