Implementation of Determination: Create Property 
Properties are defined in the implementing class of the determination. In the EXECUTE method of the implementing class the IO_PROPERTY parameter provides an object reference that offers the following methods for defining properties:
Entity |
Method |
Description |
|---|---|---|
Node |
SET_NODE_UPDATE_ENABLED |
Configure whether a node can be updated. |
SET_NODE_DELETE_ENABLED |
Configure whether a node can be deleted. |
|
SET_NODESUBTREE_CREATE_ENABLED |
Configure whether users can create nodes in a node subtree. |
|
SET_NODESUBTREE_UPDATE_ENABLED |
Configure whether nodes can be updated in a node subtree. |
|
SET_NODESUBTREE_DELETE_ENABLED |
Configure whether nodes can be deleted in a node subtree. |
|
SET_NODESUBTREE_CHANGE_ENABLED |
Configure whether nodes can be created, updated, and deleted in a node subtree. |
|
Action |
SET_ACTION_ENABLED |
Configure whether an action can be executed. |
Association |
SET_ASSOCIATION_ENABLED |
Configure whether users can navigate using an association. |
SET_ASSOCIATION_CREATE_ENABLED |
Configure whether users can create nodes that are connected to an subordinate node using an association. |
|
Node Attribute |
SET_ATTRIBUTE_ENABLED |
Configure whether users can see the attribute. |
SET_ATTRIBUTE_MANDATORY |
Configure whether users must specify a value matching the attribute. |
|
SET_ATTRIBUTE_READ_ONLY |
Configure whether users can only read the attribute. |
The following source code describes the implementation of a determination configured in the pattern Create Property.
Syntax
METHOD /bobf/if_frw_determination~execute.
DATA:
lt_root_data TYPE bobf_t_ci_root.
ls_root_data TYPE REF TO bobf_s_ci_root,
" clear exporting parameter CLEAR:
eo_message
et_failed_key.
" read the instance data of the root
io_read->retrieve(
EXPORTING
iv_node = if_ci_bopf_customer_invoi_c=>sc_node-root
it_key = it_key
IMPORTING
et_data = lt_root_data ).
" loop over all instances
LOOP AT lt_root_data REFERENCE INTO ls_root_data.
IF ls_root_data->status = '02'. " released
io_property->set_node_update_enabled(
EXPORTING
iv_key = ls_root_data->key
iv_value = abap_false ).
ENDIF.
ENDLOOP.
ENDMETHOD.