WDA: OVS dynamically
I have a need to create F4 help for dynamically created input field.
I created component usage by name OVS.
When I dynamically create an input field I have to also create a context attribute. Than bind this context attribute to my input field.
The trick is when I create a context attribute I have to set some of its params so value help become available.
Here is what I do:
DATA: attribute TYPE wdr_context_attribute_info.
DATA: main_node TYPE REF TO if_wd_context_node_info.
main_node = wd_context->get_node_info( ).
"set name for the attribute
attribute-name = 'MY_NAME'.
"set data type for this attribute
attribute-type_name = 'some data type'.
"define F4 help
attribute-value_help_id = 'OVS'.
"add attribute into context node
main_node->add_attribute( attribute_info = attribute ).
For some reason this code does not produce clicable button right next to input field.
If instead of OVS I put OVR it does produce it but when I click on it it throws an erro message saying that component usage is not defined.
Why is my OVS not seen?
Regina Breuer replied
From SP10 there will be a method in IF_WD_CONTEXT_NODE_INFO, which you can easily use to define the value help.
In the meantime you concatenate 'OVR:' with you OVR component usage and set it as you value_help_id, in you case 'OVR:OVS'.
Then it should work.