cancel
Showing results for 
Search instead for 
Did you mean: 

How to suppress automatic keyfigure conversion in WD ALV?

0 Kudos

Dear experts,

I am having a problem with automatic input conversion in WD ALV.

I have a key-figures (type P length 9, decimals 2)in my ALV which has reference field of type if_salv_wd_c_field_settings=>reffieldtype_curr.

I process the changes by event ON_DATA_CHANGE which passes this change object:

r_param->t_modified_cells

r_param->t_inserted_rows

r_param->t_deleted_rows

r_param->t_error_cells

The thing is that the changes in table r_param->t_modified_cells are already converted into internal format. When user enters "1", I get here in this table value "1.00". But this internal value is not always correct because corresponding reference field with currency key may not be known yet (it is calculated later on background from other fields).

Therefore, for example for currency JPY which has no decimal places external value "1" is converted into wrong internal value "1.00" (the correct internal value is "0.01").

Therefore, I need to suppress the conversion by the ALV and do it myself once the currency key is known.

How can I suppress the automatic input conversion which is done by ALV?

There is no such problem in SAP GUI ALV! There is event DATA_CHANGE with similar change object:

io_data_change->mt_good_cells

io_data_change->mt_mod_cells

io_data_change->mt_inserted_rows

io_data_change->mt_deleted_rows

But all the changes in table io_data_change->mt_mod_cells are in an external format (exactly the way user entered them on the screen)!

Any idea?

Thank you in advance for your help.

Tomas

Edited by: Tomas Havlik on Oct 5, 2010 10:24 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

I have contacted the Web Dynpro ALV support directly to find out the answer.

There is no solution!

The WD ALV always convert the key figure into internal format. It is not possible to get the raw user input in WD as it is in SAP GUI.

Therefore, I use a workaround in my application - I remeber the number of decimal places of the old currency key and if the new currency key has different number of decimal places, then I shift the decimal point to the right or left correspondingly.