Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CLASSICAL REPORT

Former Member
0 Kudos

in the classical report,i want to output the display of consolidated view in the common display of the output.

here in consolidated view,i want to sum all the fields aganist one customer.

So need to sort with the customer.

please guide me with the lines of code and the possible placement,

it would b great if you can.

4 REPLIES 4

Former Member
0 Kudos

Hi Tanisha ,

In Reports , we have wonderfull concept call control break events ,

make use of them , AT NEW - ENDAT,

AT FIRST - ENDAT,

AT LAST - ENDAT.

and for summation of any values use keyword SUM in AT LAST - ENDAT event .

Regards,

Aby.

Please close this thread as soon as your problem is solved.

Former Member
0 Kudos

Hello


loop at itab.
  at end of kunnr.
    sum.
    write: 'Total on customer:', itab-dmbtr, """etc
  endat.
endloop.

Former Member
0 Kudos

Hi,

Make sure that kunnr should be the very first field of your internal table.

Sort the Internal table based on kunnr.

loop at itab into wa.

at end of kunnr.

sum.

Write:/ 'Total value for this Customer is ' wa-f1.

endat.

endloop.

Former Member
0 Kudos

check sample code.

DATA : itab TYPE TABLE OF ekpo WITH HEADER LINE.

SELECT * FROM ekpo UP TO 20 ROWS

INTO itab.

APPEND itab.

ENDSELECT.

sort itab.

LOOP AT itab.

WRITE : / itab-ebeln, 20 itab-ebelp, 40 itab-menge.

AT END OF ebeln.

SUM.

ULINE.

WRITE : /40 itab-menge.

uline.

ENDAT.

ENDLOOP.