Skip to Content

Dynamic ALV - Format field value

Hi.

I'd like to know how to format fields of a dynamic ALV grid.

Today, in this column is coming values like:

599998900.00-

1000.00-

2000.00-

I'd like to format it like (Brazil's region number format):

599.998.900,00-

1.000,00-

2.000,00-

In fieldcat logic I'm using ls_fieldcat-datatype = 'CURR'.

I tryied to use these fields in fieldcat, but as this ALV is dynamic, I haven't any table to put as reference:

  • lt_fieldcat-fieldname = 'WAERS'.

  • lt_fieldcat-ref_tabname = 'BKPF'.

thanks.

Glauco

Edited by: Glauco Kubrusly on Apr 25, 2011 11:28 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2011 at 02:53 PM

    just use a refence in the fieldcatalog...

    lt_fieldcat-cfieldname = 'WAERS'. " fieldname for currency

    or directly

    lt_fieldcat-currency = 'BRL'. 

    regards, sebastian

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Sebastian.

      It works fine now. Tank you very much.

      This tip worked very well!

      " field for catalog
        CLEAR wa_catalog.
        wa_catalog-fieldname   = 'ZFIELD'.
        wa_catalog-ref_table   = 'ZTABLE'.
        wa_catalog-cfieldname  = 'WAERS'.
        APPEND wa_catalog TO gt_catalog.

      Glauco

      Edited by: Glauco Kubrusly on Apr 25, 2011 6:18 PM

      Edited by: Glauco Kubrusly on Apr 25, 2011 6:20 PM

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2011 at 02:44 PM

    Hi,

    Check the defaults in the SU01 transaction ,check defualts tab-->Decimal Notation change it to your requirement.

    Automatically in the alv it will display according to decimal notation.

    Prabhud@s

    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.