Skip to Content

internal table

frnds,

i'm using the table control statements at new, at end of..

but the prob. is that, it considers the fields to the left of the column of the field we use in the condition.

eg.

my itab is .

field F1 F2 F3

_______________________

1st row a1 b1 100

2nd row a2 b1 300

3rd row a3 b2 400

now if i use at new F2, or end of F2, and then SUM, still the values on the right are not added. Coz it considers each value of F1 as a new field.

any other method to sum the values on right, at the change of value of the field F2.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Nov 28, 2005 at 02:02 PM

    You could look into the ON CHANGE OF statement.

    Regard,

    RIch Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 02:03 PM

    Try 'ON Change of' field and ENDON clause.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 28, 2005 at 02:05 PM

    Hi Madan,

    you have to play with something like :

    F2_old like F2.
    
    if F2_old ne F2.
      move F2 to F2_old.
      write /1 value_of_sum.
      value_of_sum = F3.
    else.
      value_of_sum = value_of_sum + F3.
    endif.

    or you have to create the same table, clear the first colum, and make a quick sum.

    Rgd

    Frédéric

    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.