Skip to Content
0
Former Member
Sep 10, 2009 at 09:34 AM

Sum use to subract the negative values in At end of field control comand.

755 Views

Hi all,

I have the item values of both positive and negative values, the requirement was to display the I_DISPLAY-WRBTR value with a negative sign at its end if the posting key is 22.

So I used a variable V_WRBTR of type Nlength 14 to concatenate field I_DISPLAY-WRBTR of type quan length 13, with -ve sign if the condition for posting key satisfied. diplayed both fields ,under 1 column as the line items.

Now I am facing the problem for calculating the total per company code of this column.I used SUM in the AT END ofI_DISPLAY-BURKS. IT IS SUMMING THE NEGATIVE VALUES ALSO instead of subracting along with the positive values.

ex: V_WRBTR / I_DISPLAY-WRBTR

86.50-

30.50

then it should give the total as 56, instead its showing 117.00

Suggest me the possible reason n solution for this behaviour of SUM.

Thanks in advance,

Selina.

Edited by: Selina.selk on Sep 10, 2009 11:36 AM