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: 

weekly report!

Former Member
0 Kudos

Hi All,

I have developed a report( weekly report) to get total number of the contents inside an internal table in a particular Date range. suppose if the date range is 01/01/2010 to 29/01/2010 ,the user first enter the date from the select-option then a weekly report in ALV appears to him. the dates like for example :

01/01/2010

08/01/2010

15/01/2010

22/01/2010

29/01/2010.

After getting these dates I have to find the sum of the contents inside that range between:

01/01/2010 & 08/01/2010 >>> total number of (Bookings) = 432132 (e.g)

09/01/2010 & 15/01/2010 >>>.....

16/01/2010 & 22/01/2010>>>>....

23/01/2010 & 29/01/2010.>>>.....

and so on,

i have manage to get the total sum of all the field contents but the date is the problem. it's getting the sum daily not weekly.

in the report that will be displayed in the ALV, the date type is D. and in the internal table to manipulate the data, I declaired (auth_date(2) type n). then i have used (auth_date+6(2) ) to get the weekly days.

Experts please help me to find a solution for this report.

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

Hi Eman,

you may add a WEEK field to your list, use

CALL FUNCTION 'DATE_GET_WEEK'
  EXPORTING
    DATE               = <date>
 IMPORTING
   WEEK               = <week>
 EXCEPTIONS
   DATE_INVALID       = 1
*   OTHERS             = 2
            .

set sort on that field in ALV, create subtotal and total for what you want to know weekly.

Regards,

Clemens

Former Member
0 Kudos

Thank you Sir,

although this way is good but it's not applicable to my code...

Can I do it manually instead of using a function?

0 Kudos

Hi Eman,

manually? Donwload to excel, use excel (week & sum) functions.

Regards,

Clemens

Former Member
0 Kudos

I've managed to solve this problem... Thanks!!