Skip to Content
author's profile photo Former Member
Former Member

differenciating material total

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Feb 09, 2005 at 12:55 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 09, 2005 at 03:36 PM

    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
    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.