Skip to content

Conversation

@bjoern-jueliger-sap
Copy link
Member

This adds structured values and lists of structured values as possible types for parameters of checks that are included in a CHKV variant, which will be supported in a future release by the ATC Check Variant editor.

These structured values are the JSON representation of arbitrary ABAP structures whose fields are themselves not structured (i.e. correspond to the existing "value" JSON type here). Lists of structured values are correspondingly the JSON representation of ABAP table types whose line type is such a structure.

The format version has not been increased since JSONs from the earlier version are still fully compatible, as only optional fields have been added to the possible items of the parameters list.

@bjoern-jueliger-sap
Copy link
Member Author

Welp, apparently the automated compatibility check disagrees that adding these fields is compatible with a simple "Something was added". Perhaps it does not consider the required/non-required characteristics of added types correctly?

@albertmink
Copy link
Contributor

albertmink commented Oct 9, 2025

@bjoern-jueliger-sap this check is not required for a reason 😄 This isn't to suggest that the check is incorrect, but there's a possibility it might be.

@huber-nicolas huber-nicolas self-requested a review October 9, 2025 15:09
@huber-nicolas
Copy link
Contributor

@bjoern-jueliger-sap thanks for the pull request.
Can you adapt the example CHKV "z_aff_example_chkv", which is already uploaded into the main branch of this repository, so that it also shows the new structure value parameters in its json?

@bjoern-jueliger-sap
Copy link
Member Author

@bjoern-jueliger-sap thanks for the pull request. Can you adapt the example CHKV "z_aff_example_chkv", which is already uploaded into the main branch of this repository, so that it also shows the new structure value parameters in its json?

The current example is "real" in that it uses actual SAP-delivered checks, i.e. importing this into a current ABAP release would give a check variant you can actually execute. Is that required for the example?

If yes, we cannot add the new structures yet because there are no checks that use this feature yet.

@huber-nicolas
Copy link
Contributor

@bjoern-jueliger-sap thanks for the pull request. Can you adapt the example CHKV "z_aff_example_chkv", which is already uploaded into the main branch of this repository, so that it also shows the new structure value parameters in its json?

The current example is "real" in that it uses actual SAP-delivered checks, i.e. importing this into a current ABAP release would give a check variant you can actually execute. Is that required for the example?

If yes, we cannot add the new structures yet because there are no checks that use this feature yet.

If there are no checks which use these new structures yet, then it is ok for me to keep the example chkv as it is now

Copy link
Contributor

@wurzka wurzka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing your changes to the CHKV file format. @huber-nicolas asked me to have a look into it. Generally, it looks good to me. I just added two comments regarding names and titles.

Comment on lines +32 to +41
BEGIN OF ty_structured_value_comp,
"! <p class="shorttext">Component Name</p>
"! Name of a component of a structure
"! $required
field TYPE string,
"! <p class="shorttext">Component Value</p>
"! Value of a component of a structure
"! $required
value TYPE string,
END OF ty_structured_value_comp,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually recommend having the title (<p class="shorttext">...</p>) and the name of the component in sync or at least almost in sync (like value and Component Value). For field this is not the case. What do you think about renaming it to

Suggested change
BEGIN OF ty_structured_value_comp,
"! <p class="shorttext">Component Name</p>
"! Name of a component of a structure
"! $required
field TYPE string,
"! <p class="shorttext">Component Value</p>
"! Value of a component of a structure
"! $required
value TYPE string,
END OF ty_structured_value_comp,
BEGIN OF ty_structured_value_comp,
"! <p class="shorttext">Component Name</p>
"! Name of a component of a structure
"! $required
name TYPE string,
"! <p class="shorttext">Component Value</p>
"! Value of a component of a structure
"! $required
value TYPE string,
END OF ty_structured_value_comp,

or

Suggested change
BEGIN OF ty_structured_value_comp,
"! <p class="shorttext">Component Name</p>
"! Name of a component of a structure
"! $required
field TYPE string,
"! <p class="shorttext">Component Value</p>
"! Value of a component of a structure
"! $required
value TYPE string,
END OF ty_structured_value_comp,
BEGIN OF ty_structured_value_comp,
"! <p class="shorttext">Component Field</p>
"! Name of a component of a structure
"! $required
field TYPE string,
"! <p class="shorttext">Component Value</p>
"! Value of a component of a structure
"! $required
value TYPE string,
END OF ty_structured_value_comp,

Better proposals are welcome ;)

Comment on lines +59 to +64
"! <p class="shorttext">Parameter Structure</p>
"! A structured value of a parameter
structured_value TYPE ty_structured_value,
"! <p class="shorttext">Parameter Structure List</p>
"! A list of structured values of a parameter
structured_value_list TYPE ty_structured_value_list,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, but I'm struggling with making a better proposals. But maybe syncing it with value_list and value_range_list is a quick win:

Suggested change
"! <p class="shorttext">Parameter Structure</p>
"! A structured value of a parameter
structured_value TYPE ty_structured_value,
"! <p class="shorttext">Parameter Structure List</p>
"! A list of structured values of a parameter
structured_value_list TYPE ty_structured_value_list,
"! <p class="shorttext">Parameter Structure</p>
"! A structured value of a parameter
structured_value TYPE ty_structured_value,
"! <p class="shorttext">List of Parameter Structures</p>
"! A list of structured values of a parameter
structured_value_list TYPE ty_structured_value_list,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants