cancel
Showing results for 
Search instead for 
Did you mean: 

Currency Key Reference field in WebDynpro Table Column

Former Member
0 Kudos

Hi Experts,

I am using a WebDynpro table (not ALV) showing multiple currency fields in a single row - each one potentially referencing a different currency key e.g. Japanese Yen and USD in a single row.

My currency context attributes are already defined as currency types, but how can I assign different currency key references to each of my currency context attributes? Or is this somehow done as a property of the table column UI element?

Thanks for your help,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Peter,

There is no specific property for currency.

The amount field and the currency field must be in the same context element. The easiest way to declare the reference is in the DDIC, when the context node has this DDIC structure as node type. But you can also declare it dynamically with a method at the node info.

Ex: l_root_info = wd_context->get_node_info( ).

l_node_info = l_root_info->get_child_node( 'CUKY_DEFINED' ).

l_node_info->set_attribute_reference_field(

name = 'PRICE'

reference_field = 'CURRCODE'

reference_field_type = if_wd_context_node_info=>reffieldtype_curr ).

cheers,

Kris.

Former Member
0 Kudos

Hi Kris,

You answer is very helpful, but I do have a question about going the DDIC route. So you are saying that if I take a DDIC structure into my context with multiple currency keys as reference fields for multiple currency fields, then my WebDynpro context will know exactly which currency key is the reference for which currency field without having do do this programatically as you described? If that's true, can I bring a whole DDIC structure over to the context and then delete the 'Dictionary Structure' refrence from my context node, so that I can add my own additional fields to the context node? E.g. in the case of DDIC structure VBAP can I get all my currency fields and their reference fields from the DDIC from VBAP and then delete 'VBAP' as a 'Dictionary Structure' from my context node and add my own custom fields. The fields I would have brought in from VBAP still retain their type and everything after the deletion of 'VBAP' as a 'Dictionary Structure', so my question is will it also retain the node_info of what currency key goes with what field?

Please let me know if you happend to have done this before.

Thanks,

Peter

Answers (0)