Skip to Content
Former Member
Apr 19, 2005 at 01:34 PM

ALV Field Catalog Problem


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!