Skip to Content
author's profile photo Former Member
Former Member

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!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 19, 2005 at 04:34 PM

    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?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.