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

ALV Field Catalog Problem

Former Member
0 Kudos

I have a problem with one of my ALV fields. This field is declared as

vol1(12) TYPE p DECIMALS 6

in the internal table. However, when displaying I do not want this field to display the decimals.

We are using 4.7 and are currently upgrading to 4.7 Extensetion Set 2.0. This was ok before but when we upgraded to the extension set, that's when the problem occured. It does not seem to take into consideration the value of the field decimals_o which is the number of decimal places for output.

 DATA: ls_fieldcatalog TYPE lvc_s_fcat.
  CLEAR ls_fieldcatalog.
  WRITE p_date1 TO l_coltext.
  ls_fieldcatalog-fieldname  = 'VOLUME1'.
  ls_fieldcatalog-do_sum     = 'X'.
  ls_fieldcatalog-h_ftype    = 'SUM'.
  ls_fieldcatalog-outputlen  = 25.
  ls_fieldcatalog-decimals   = 6.
  ls_fieldcatalog-decimals_o = '0'.
  ls_fieldcatalog-datatype   = 'DEC'.
  ls_fieldcatalog-reptext    = coltext.
  ls_fieldcatalog-scrtext_l  = coltext.
  ls_fieldcatalog-scrtext_m  = coltext.
  ls_fieldcatalog-scrtext_s  = coltext.
  ls_fieldcatalog-colddictxt = 'M'.
  APPEND ls_fieldcatalog TO gt_fieldcatalog.

I also checked for OSS notes on it but didn't find any. Please help.

Thanks in advance!


Former Member
0 Kudos

Since decimals_o is a character field, have you tried setting it to '000000' instead of '0'? Why is this a character field anyway, any ideas?

0 Kudos

Yes, I tried that as well but it didn't work. Also, I have no idea why its a character field.

0 Kudos

I had the same problem, using note 797951 solved the problem for me