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 :

In my selection screen, i have select option for date ( latest finish date of the work order S022-SSEDD.

But my report should display work orders for every week, say in my selection screen if i enter date range as 06/08/2007 to 07/08/2007, it should display work orders for every week separately.

At present , my report is displaying all the work orders together for the date range entered, but i want to display then for every week.

Thanks.

~R

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Raghu,

Just define one range

ranges r_date for sy-datum.

start-of-selection.

r_date-low = sy-datum.

r_date-high = sy-datum - 7.

r_date-option = 'BT'.

r_date-sign = 'I'.

append r_date.

then use r_date in select query as in operator,it will get week data.

Thanks

Seshu

4 REPLIES 4

Former Member
0 Kudos

Hello Raghu,

Just define one range

ranges r_date for sy-datum.

start-of-selection.

r_date-low = sy-datum.

r_date-high = sy-datum - 7.

r_date-option = 'BT'.

r_date-sign = 'I'.

append r_date.

then use r_date in select query as in operator,it will get week data.

Thanks

Seshu

0 Kudos

Hello Seshu,

In the selection screen if i enter the date range as 04/04/2007 to 07/08/2007, then my program should display work orders and order types separately for all the 14weeks.

then i will download this data in an excel file and plot the graph for each week.

0 Kudos

Well,you need to write diffrent logic.

first you need to find out how many weeks depend upon date range in selection.

you can write normal select query with what ever data range user enters in selection screen.

now within loop,you know how many weeks - date range entered in selection-screen.

keep one variable as increment..

this variable fills 1 for 1 week,2 for 2 week data like this .

append this variable into internal table.

you have data in final internal table,use at new command with variable ,

when ever variable triggers then download the data into xls file.

to write the code - variable is typicall, you can get the number of weeks ,use that number in one variable,now use do variable times like this.

Thanks

Seshu

0 Kudos

Can i get sample code for this.

I want to extract work orders weekly, when i enter some date range in S_DATE say 06/06/07 to 07/07/07 then it should display work orders separately for each week.

I am able to display all the workorders together for the given date range, now i have filter it weekly.

I would appreciate if some one help me on this.

Thanks.

~R