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

alv

Hi ,

can any one tell how to get % symbol in my alv grid display like how we get + and - symbols for numeric fields

eg: my field value is 10 it should be displayed as 10%

The field attributes are type p decimal 5 .

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 01:02 PM

    hi,

    Pass the value to the final internal table before passing the internal table to FM i.e, REUSE_ALV_...

    i.e,

    data : v_field1(20).
    * Here it_final field1 is of type char of required length 
    loop at it_final.
      v_field1 = it_final-field.
      concatenate v_field1 '%' to it_final-field1. 
      modify it_final index sy-tabix transporting field1.
    endloop.
    

    Now you use Field it_final-field1 in reference to your previous field ..

    Reagrds,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 08, 2008 at 01:03 PM

    Once you calculate the percentage value , you move that to char and concatenate with %. But this field looses the properties like SUM and Subtotals.

    The % thing can be done in the data populations..

    Run time it is not possible

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 08, 2008 at 01:03 PM

    Ramesh,

    % would be shown in ALV but only with Char type not type p.

    so you need to pass this value in char type then add % and use in ALV.

    Amit.

    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.