Skip to Content

How to sum HH:MM in OOPS ALV set_table_for_first_display

Hi All.

I have to find the total time in ALV which column is displayed as HH:MM.DO_SUM does not work hence field has content as HH:MM.Could you please help me to find total time or any other suggestion .

Regards.

Jay.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 12, 2017 at 08:48 AM

    Nagarajan,

    Kindly go through the code in the FM TIMECALC_DIFF. It is doing subtraction,you can follow the same for addition.

    Not at the level of ALV GRID but internally in the program you can process the data with a similar logic and get the sum of hours.

    Also you can explore the existing SAP FMs in SE37 with the keyword search *add*time*.

    (or)

    Refer to the below link

    http://sap.ittoolbox.com/groups/technical-functional/sap-abap/help-sum-of-times-hhmmss-in-alv-grid-3342814

    Kindly share if you got any other better solution to this.

    K.Kiran.

    Add comment
    10|10000 characters needed characters exceeded