Skip to Content
0
Former Member
Apr 11, 2007 at 02:54 PM

Logic- SUMMING UP -Control Break

12 Views

Hi,

In the following code if value of the field (T_DATA-JUHGSBEST) is '999'. I don't want to consider while summing up .

How can we achieve this? Right now If I code like this..It is lready calculating the SUM.

SORT T_DATA BY MATNR SPTAG.

LOOP AT T_DATA.

MOVE T_DATA TO WA_DATA.

AT END OF MATNR.

SUM.

T_OUTPUT-MATNR = WA_DATA-MATNR .

T_OUTPUT-MGVBR = T_DATA-MGVBR.

T_OUTPUT-WGVBR = T_DATA-WGVBR.

IF T_DATA-JUHGSBEST NE '999'.

T_OUTPUT-JUHGSBEST = T_DATA-JUHGSBEST.

ENDIF.

APPEND T_OUTPUT.

CLEAR T_OUTPUT.

CLEAR : WA_DATA.

ENDAT.

ENDLOOP.

Regards

Vara

Message was edited by:

Vara K