‎2008 Jun 18 7:39 AM
‎2008 Jun 18 7:40 AM
‎2008 Jun 18 7:42 AM
hi,
I want to run the report on weekly basis like every friday of the week.
Regards,
Srik
‎2008 Jun 18 7:45 AM
Ye then the FM day_in_week is useful
FUNCTION DAY_IN_WEEK.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(DATUM) TYPE D
*" EXPORTING
*" VALUE(WOTNR) TYPE P
*"----
PERFORM DAY_IN_WEEK USING DATUM
CHANGING WOTNR.
pass the date over here
if value is 5 execute ur report
Hope it helps
‎2008 Jun 18 7:46 AM
Sric,
use FM DAY_IN_WEEK pass sy-datum in date field and
if result is *5* means today is friday than do nothing
else.
pass error message
endif.Amit.
‎2008 Jun 18 7:41 AM
Hi,
DAY_IN_WEEK is the functio nmodule, which will return the day of the week.
Pass sy-datum to this fm and check for the day '5'. If it is '5', it's friday.
If not some ohter day.
Reward if helpful,
RSS
‎2008 Jun 18 8:25 AM
Hi,
You can use Code or Function module :
DATA: WOTNR TYPE P.
DATA: DIW_FIRST TYPE D VALUE '19790101'.
PARAMETERS: p_date type D.
WOTNR = ( ( p_date - DIW_FIRST ) MOD 7 ) + 1.
WRITE: WOTNR.Or FM
DAY_IN_WEEK.
You use the logic that if day is 5( ie o/p of above FM) schedule a job.
This will surely help you.
Plz reward if useful.
Thanks,
Dhanashri.
‎2008 Jun 20 10:49 AM
Hi Srik,
If your problem is solved, please reward teh points and close the thread.
RSS.
‎2012 Feb 08 9:25 AM