cancel
Showing results for 
Search instead for 
Did you mean: 

WDABAP currency quantity reference fields

Former Member
0 Kudos

Hi,

I have a input field for amount and one for currency in my view. How can add the currency as the reference to the amount field so that the formatting of the amount field is appropriate?

Prakash Sethia

Accepted Solutions (1)

Accepted Solutions (1)

former_member215843
Active Participant
0 Kudos

Hi,

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, e.g.

  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 ).

Regards, Regina

Answers (0)