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

percentage calculation

hi guru,

i have 2 vaues one is onspec total = 543 . 00

grand total = 1098.00

how i caculate percentage means i want (543 / 1098)*100

help me in alv ....

thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2008 at 03:46 AM

    Hi ,

    Build an internal table with the % field too .

    Let us assume there are 10 records with all the other fields values except the % ,then

    Loop at IT_TAB into wa_tab.

    compute Wa_tab-percentage = ( wa_tab-onspec * 100 ) / wa_tab-grand_total .

    modify it_tab from wa_tab transporting percentage where key1 = wa_tab-key1.

    clear wa_tab.

    endloop.

    Now use this internal table in ALV

    Reward Points if u find it useful

    -Sapsurfer

    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.