Application Development and Automation 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: 
Read only

weekly report!

Former Member
0 Likes
658

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
Read only

Clemenss
Active Contributor
0 Likes
610

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

Read only

Former Member
0 Likes
610

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?

Read only

0 Likes
610

Hi Eman,

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

Regards,

Clemens

Read only

Former Member
0 Likes
610

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