‎2007 Aug 09 11:03 AM
How does ABAP do a conversion from a date to a weekly value?
On BW I have a problem where a date is being converted into a weekly value, but that weekly value is one week out. Is there a conversion table being used, or is it an algorithm that is being used to produce a weekly value?
‎2007 Aug 09 11:09 AM
Hi,
DATE_GET_WEEK : Returns week for a date
Reward if helpful.
‎2007 Aug 09 11:05 AM
‎2007 Aug 09 11:09 AM
Hi,
DATE_GET_WEEK : Returns week for a date
Reward if helpful.
‎2007 Aug 09 11:14 AM
Hi,
Use the FM:DATE_GET_WEEK .
Import : YYYYMMDD; Export : YYYYNN, where NN is # of week.
Thanks,
Sandeep
‎2007 Aug 09 11:16 AM
see these calender related FM's
<b>DATE_GET_WEEK will return the week that a date is in.</b>
WEEK_GET_FIRST_DAY
This function module returns the first day of the week passed. (This is always a Monday, regardless of whether it is a working day or a holiday.)
FACTORYDATE_CONVERT_TO_DATE
This function module returns the calendar date for the factory date and the factory calendar passed.
DATE_CONVERT_TO_FACTORYDATE
This function module returns the factory date for the date and factory calendar passed. You can specify with a parameter whether the next or the previous working day is returned if the day is not a working day.
RP_CALC_DATE_IN_INTERVAL
Add/subtract years/months/days from a date
SD_DATETIME_DIFFERENCE
Give the difference in Days and Time for 2 dates
MONTH_PLUS_DETERMINE
Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
DATE_CHECK_PLAUSIBILITY
Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
DATE_CONV_EXT_TO_INT
Conversion of dates to SAP internal format e.g. '28.03.2000' -> 20000328
DATUMSAUFBEREITUNG
Format date as the user settings
MONTH_NAMES_GET
It returns all the month and names in repective language.
DATE_IN_FUTURE
Calculate a date N days in the future.
regards,
srinivas
<b>*reward for useful answers*</b>
‎2007 Aug 09 11:40 AM