cancel
Showing results for 
Search instead for 
Did you mean: 

WDA: OVS dynamically

Former Member
0 Kudos

Hello,

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?

Thank you.

--

Regards,

Georgy

Accepted Solutions (1)

Accepted Solutions (1)

former_member215843
Active Participant
0 Kudos

Hi Georgy,

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.

Regards, Regina

Former Member
0 Kudos

Hello Regina,

Thanks a lot for valuable input.

Your suggestion solves the problem!

10 points coming your way.

Thanks.

__

Regards,

Georgy

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Georgy,

I have a similar requirement wherein I have to provide the F4 help for a dynamically created attributes. but it's for an ALV table. Iam getting everthing. The problem with me is I have to get the context element i.e the entire row where Iam clicking.

In OVS method there is an option

elem_ovs = ovs_callback_object->context_element.

elem_ovs->get_static_attributes(

IMPORTING

static_attributes = STRUC_OVS ).

This STRUC_OVS should be the structure of dynamically created node and attributes.

I would not know my strucure since I had created dynamically.

what should I give in place of STRUC_OVS to get the context element.

Please Suggest.

Thank You,

Suresh.