Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions file-formats/chkv/chkv-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,67 @@
"description": "The value of the parameter",
"type": "string"
},
"structuredValue": {
"title": "Parameter Structure",
"description": "A structured value of a parameter",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Component",
"description": "Component of a structure as a key-value pair",
"type": "object",
"properties": {
"field": {
"title": "Component Name",
"description": "Name of a component of a structure",
"type": "string"
},
"value": {
"title": "Component Value",
"description": "Value of a component of a structure",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"field",
"value"
]
}
},
"structuredValueList": {
"title": "Parameter Structure List",
"description": "A list of structured values of a parameter",
"type": "array",
"items": {
"title": "Structure",
"description": "A structured value as a list of key-value pairs",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Component",
"description": "Component of a structure as a key-value pair",
"type": "object",
"properties": {
"field": {
"title": "Component Name",
"description": "Name of a component of a structure",
"type": "string"
},
"value": {
"title": "Component Value",
"description": "Value of a component of a structure",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"field",
"value"
]
}
}
},
"valueList": {
"title": "List of Parameter Values",
"description": "List of values for a multi-value check parameter",
Expand Down
32 changes: 28 additions & 4 deletions file-formats/chkv/type/zif_aff_chkv_v1.intf.abap
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,47 @@ INTERFACE zif_aff_chkv_v1
"! <p class="shorttext">Entry in Value List</p>
"! A parameter value in the parameter value list
ty_param_value TYPE string,
"! <p class="shorttext">Component</p>
"! Component of a structure as a key-value pair
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,
Comment on lines +32 to +41
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 ;)

"! <p class="shorttext">Structure</p>
"! A structured value as a list of key-value pairs
ty_structured_value TYPE SORTED TABLE OF ty_structured_value_comp WITH UNIQUE KEY field,
"! <p class="shorttext">Structure List</p>
"! A list of structured values
ty_structured_value_list TYPE STANDARD TABLE OF ty_structured_value WITH DEFAULT KEY,

"! <p class="shorttext">Parameter</p>
"! Parameter of ATC check
BEGIN OF ty_parameter,
"! <p class="shorttext">Parameter Name</p>
"! The parameter name
"! $required
name TYPE string,
name TYPE string,
"! <p class="shorttext">Parameter Value</p>
"! The value of the parameter
value TYPE string,
value TYPE string,
"! <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,
Comment on lines +59 to +64
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,

"! <p class="shorttext">List of Parameter Values</p>
"! List of values for a multi-value check parameter
value_list TYPE STANDARD TABLE OF ty_param_value WITH DEFAULT KEY,
value_list TYPE STANDARD TABLE OF ty_param_value WITH DEFAULT KEY,
"! <p class="shorttext">List of Range Values</p>
"! List of range values for a check parameter
value_range_list TYPE ty_ranges,
value_range_list TYPE ty_ranges,
END OF ty_parameter,

"! <p class="shorttext">Parameters</p>
Expand Down
Loading