Skip to Content
avatar image
Former Member

CFIELDNAME issue with currency decimal ALV list display

I am using the following code to do the sum of the currency field with currency code in the subtotal place.

But when i am using the cfieldname fieldcat i have the decimal issue in the currency amount column. But i am getting the currency unit in the subtotal column.

* Total amount

  ls_fieldcat-fieldname = 'TOTAL_AMT'.

  ls_fieldcat-tabname = 'LT_TAB'.

  ls_fieldcat-col_pos = 5.

  ls_fieldcat-seltext_l = 'TOTAL PRICE'.

  ls_fieldcat-outputlen = 18.

  ls_fieldcat-do_sum = 'X'.

  ls_fieldcat-cfieldname = 'WAERS'.

  APPEND ls_fieldcat TO lt_fieldcat.

  CLEAR ls_fieldcat.

The currency amount has the type of p  lenght 14 dec 2. Please share your ideas!



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 02, 2015 at 10:42 AM


    Please provide a reference table and reference field in fieldcatalog with data type and length as you mentioned.

    Or you can provide it in Internal type and length field.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Prdeep,

      Can you check the field catalog type which you are referring should be as mentioned below.

      Data: t_alv_fieldcat    TYPE slis_t_fieldcat_alv,

      and this cfieldname  type slis_fieldname, " field with currency unit

      please follow the below sample stand SAP programs which may help you:






  • Nov 02, 2015 at 11:11 AM

    In field catalog add DATATYPE = 'CURR', also insure WAERS has DATATYPE = 'CUKY'.

    • How did you fill the amount field value (from a CURR standard field)
    • Did you execute The Consistency Check?



    Add comment
    10|10000 characters needed characters exceeded