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

Alv Total in end

Hi experts,

I am creating an ALV report in which i want total to be display in the end only how can i do this.I dont want any subtotal.

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 04:48 AM

    fieldcat-tabname = 'ITAB'.

    fieldcat-fieldname = 'TPRC'.

    fieldcat-seltext_l = 'Total Price'.

    fieldcat-do_sum = 'X'.

    fieldcat_datatype = 'CURR'

    fieldcat-col_pos = 7.

    append fieldcat to t_fieldcat.

    Check the link:

    http://www.sap-basis-abap.com/abap/alv-grid-list-with-sub-totals.htm

    Reward points if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 08:03 AM

    Hi,

    see the following code which i developed.Just what ever fields u want sum for that fields only u have to pass do_sum = 'X'.

    fieldcat1-fieldname = 'LFIMG'.

    i_fieldcat1-seltext_m = 'ACTUAL QUANTITY'.

    i_fieldcat1-do_sum = 'X'.

    APPEND i_fieldcat1 TO i_fieldcat1.

    CLEAR i_fieldcat1.

    i_fieldcat1-fieldname = 'NTGEW'.

    i_fieldcat1-seltext_m = 'NET WEIGHT'.

    i_fieldcat1-do_sum = 'X'.

    APPEND i_fieldcat1 TO i_fieldcat1.

    CLEAR i_fieldcat1.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = repid

    it_fieldcat = i_fieldcat1[]

    i_callback_top_of_page = 'TOP_OF_PAGE'

    i_callback_user_command = 'USER_COMMAND1'

    it_events = i_events

    TABLES

    t_outtab = i_vbup1

    EXCEPTIONS

    program_error = 1

    OTHERS = 2.

    IF sy-subrc 0.

    reward me a points if it is use full answer

    praveen

    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.