cancel
Showing results for 
Search instead for 
Did you mean: 

set_attribute_reference_field method in POWL for OMR/KWD currency

Former Member
0 Kudos

Hello every one,

I am developing the custom WebDynpro application and I implementing the POWL with FPM.  The POWL is working well in general.

I have field NET_PRICE with field type BPREI and CURRENCY with field type WAERS in the POWL structure. The values are displaying correctly for all currency except for the currency OMR and KWD. The currency OMR and KWD will require displaying in 3 decimals but the BPREI is defined for 2 decimals.

I found the method 'IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_REFERENCE_FIELD to display the fields in 3 decimals in WD.  I used this method in normal WD views under Initial method and it working well, but It's not working in the POWL.

" currency reference
   lo_nd_data_info
->set_attribute_reference_field( EXPORTING
   name
= 'NET_PRICE'
   reference_field
= 'CURRENCY'
   reference_field_type
= if_wd_context_node_info=>reffieldtype_curr ).

Can you please any one suggest me on how to get this method used in POWL or do I need to control this in POWL feeder class to display in 3 decimals?

Thank you so much for your advice.

Thanks,

Senthil

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Senthil,

You have to pass the currency reference field 'CURRENCY' in method IF_POWL_FEEDER~GET_FIELD_CATALOG for the field CQ_REF of fieldcat.

Viz,

DATA: ls_fcat TYPE powl_fieldcat_sty.

ls_fcat-colid = 'NET_PRICE'.

ls_fcat-CQ_REF = 'CURRENCY'.

....

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Rama -

Thank you for your advise and yes your input helped me a lot and it works well now.

Regards,

Senthil

ramakrishnappa
Active Contributor
0 Kudos

Hi Senthil,

Its good to hear. Please close the thread by marking the reply as correct answer.

Regards,

Rama