sort it_result by matkl matnr.
loop at it_result.
left-justified
at new matkl .
sum.
write :/1 sy-vline,2 it_result-matkl,29 it_result-kwmeng decimals 0 centered.
endat.
on change of it_result-matnr.
write :/ it_result-matnr under it_result-matkl left-justified,125 sy-vline.
endon.
endloop.
Actual o/p
01 group 170
mat1
mat2
mat2
02 group
mat4 20
Desired o/p
01 group
mat1 20
mat2 50
mat2 100
02 group
mat4 20
mat5 30
If found solution pls contact .
Thanx in advance.
Hi Dilip,
1) AT NEW MATKL and SUM sorry but i'll guess it's impossible -> so you must calculate your own sum with help field h_sum , if you you want to display the sum first
- or use AT END OF MATKL and SUM
2) pls <b>never</b> use on change of
but AT NEW MATNR
regards Andreas
Hi Diliip,
i'll guess you're a beginner in abap.
-> so try to create your list <b>easy</b> with fm REUSE_ALV_LIST_DISPLAY
e.g.
1) SE11 create structure Y_IT_RESULT from your itab
IT_RESULT
2) fill your itab
3) output
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_structure_name = 'Y_IT_RESULT'
is_variant = gs_variant
is_layout = lay
i_save = x_save
TABLES
t_outtab = it_result
EXCEPTIONS
OTHERS = 1.
4) Totals / sub-totals -> create your lay-outs
here're some demo's(reports) in SAP:
BALVSD01
BALVSD03
BALVSD04
BALVSD06
BALVST01
hope this helps
Andreas
Add a comment