e13740e - 2025-10-09

Hello.

I'm trying to create a Parameterized Property(CDS V3.5 SP21) to avoid copy-pasting code for processing array elements. I can't seem to get any result. Perhaps I am making a mistake with the syntax. None of the declaration options below are accepted by the compiler.

If you know and use them (Parameterized Properties) in your work, please let me know.

Thank you in advance.

Option 1:
PROPERTY <property_name> : <data_type>
VAR_INPUT
// One or more index parameters are declared here
<index_name> : <index_type>;
END_VAR</index_type></index_name></data_type></property_name>

// Accessor for reading
GET
    // Code that uses <Index_Name> to return a value
END_GET

// Accessor for writing
SET
    // Code that uses <Index_Name> and
    // the implicit variable <Property_Name> to write a value
END_SET

END_PROPERTY

Option 2:
PROPERTY <property_name> (<index_name> : <index_type>) : <data_type></data_type></index_type></index_name></property_name>

// Accessor for reading
GET
    // Code that uses <Index_Name> to return a value
END_GET

// Accessor for writing
SET
    // Code that uses <Index_Name> and
    // the implicit variable <Property_Name> to write a value
END_SET

END_PROPERTY