‎2009 Jul 17 8:59 AM
Hi All,
I have a selection screen with 3 selection options on there to run a report.
1) Today
2) Yesterday
3) This week
Now the first two are working fine but number 3 This Week isn't. Any reason why? This week basically means Monday to Friday of this week. E.g. If I have This week Clicked on Monday it would just show Mondays result, if I run this report on Wednesday with This week clicked it should show Monday, Tuesday & Wednesday.
Regards
Adeel
FORM posting_date .
*
CLEAR : rg_finl.
IF rb_1 = 'X'.
rg_finl-sign = 'I'.
rg_finl-option = 'EQ'.
rg_finl-low = sy-datum.
APPEND rg_finl.
CLEAR rg_finl.
ELSEIF rb_2 = 'X'.
rg_finl-sign = 'I'.
rg_finl-option = 'EQ'.
rg_finl-low = sy-datum - 1.
APPEND rg_finl.
CLEAR rg_finl.
ELSEIF rb_3 = 'X'.
rg_finl-sign = 'I'.
rg_finl-option = 'BT'.
rg_finl-low = sy-datum.
rg_finl-high = sy-datum - 7.
APPEND rg_finl.
CLEAR rg_finl.
ELSEIF rb_4 = 'X'.
rg_finl[] = s_budat[].
ENDIF.
*
ENDFORM.
‎2009 Jul 17 9:05 AM
Hi,
In the third case, LOW & HIGH values are reversed. Try changing them, might work.
LOW = SY-DATUM-7.
HIGH = SY-DATUM.
Regards,
Manne.
‎2009 Jul 17 9:05 AM
Hi,
In the third case, LOW & HIGH values are reversed. Try changing them, might work.
LOW = SY-DATUM-7.
HIGH = SY-DATUM.
Regards,
Manne.
‎2009 Jul 17 9:06 AM
Hello
You a wrong:
Instead
rg_finl-low = sy-datum.
rg_finl-high = sy-datum - 7.
you need:
rg_finl-low = sy-datum - 7.
rg_finl-high = sy-datum.
‎2009 Jul 17 9:07 AM
HI ,
use this Fm
HRWPC_BL_DATES_WEEK_INTERVAL
BWSO_DATE_GET_FIRST_WEEKDAY
for week calculation.
Regards,
Vijay
‎2009 Jul 17 9:10 AM
Hi All,
Thanks for your comments. It works now. Vijay, I know enought ABAP to get me by this was a problem by a programmer just trying to fix it.
Any chance you could help me with a code snipplet which I could write and get this working as per your FM?
Thanks
‎2009 Jul 17 9:08 AM
Change
rg_finl-low = sy-datum.
rg_finl-high = sy-datum - 7.To
rg_finl-low = sy-datum - 7.
rg_finl-high = sy-datum.Thanks
Venkat.