Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SET_DECIMALS_COLUMN

Former Member
0 Likes
2,023

I would like to use the method SET_DECIMALS_COLUMN of class cl_salv_column. I can't seem to locate an example of how to format what I am sending to the parameter Value. I tried sending it with '<ALV column name> DECIMALS 1'. I also tried other variations. Does anyone have a suggestion please.

7 REPLIES 7
Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,414

Hi Jason!

I suggest to use the logic behind write. Either you define a character field, which you can fill with write ... to (and decimals, unit or currency option) or you define a currency field linked to a currency amount field. You don't need to show the currency field, just fill it (in dynpro or ALV). Use currencies 1, 2, 3,... (they are at least defined in my release by SAP) if you don't have a 'real' one.

Regards,

Christian

Read only

0 Likes
1,414

Vivekanand,

Thanks for your support, however this documentation shows the concept and what class/methods to use. It does not show what format the data within the 'Value' parameter needs to have. Any other suggestions?

Kind Regards,

Jason

Message was edited by: Jason DeLuca

Read only

0 Likes
1,414

Any more suggestions? I am simply looking for what needs to be sent in the parameter 'Values' of method cl_salv_column. My interpretation of the Class documentation is to do this...

DATA: p_l_value TYPE REF TO cl_salv_column,

l_col_dec TYPE lvc_dfname.

l_col_dec = 'WA_COL1 DECIMALS 1'.

CALL METHOD p_l_value->SET_DECIMALS_COLUMN

EXPORTING

value = l_col_dec.

But this doesn't work.

Thanks in advance,

Jason

Read only

Former Member
0 Likes
1,414

Kindly refer the below link

http://help.sap.com/saphelp_erp2005/helpdata/en/6a/e4eb40c4f8712ae10000000a155106/frameset.htm

regards

Vivek

Rewards points if this helps

Read only

Former Member
0 Likes
1,414

Hi,

What is your requiement??Do you want to convert a value field to 1 decimal field??

Thanks,

Naren

Read only

0 Likes
1,414

Yes. The field is type p decimals 4. I don't want to change the type or do a type conversion to a new field. I would just like to use the functionality provided by the method and have the whole column displayed with only 1 decimal place in alv output.

Thanks,

Jason

Read only

Former Member
0 Likes
1,414

Hi,

Did you try the field DECIMALS_OUT as '1' in the ALV field catalog internal table..

Hope this helps..

THanks,

Naren