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

Date to Week Conversion

Former Member
0 Likes
5,951

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,334

Hi,

DATE_GET_WEEK : Returns week for a date

Reward if helpful.

5 REPLIES 5
Read only

Former Member
0 Likes
2,334

try fn module

GET_WEEK_INFO_BASED_ON_DATE

regards

shiba dutta

Read only

Former Member
0 Likes
2,335

Hi,

DATE_GET_WEEK : Returns week for a date

Reward if helpful.

Read only

Former Member
0 Likes
2,334

Hi,

Use the FM:DATE_GET_WEEK .

Import : YYYYMMDD; Export : YYYYNN, where NN is # of week.

Thanks,

Sandeep

Read only

Former Member
0 Likes
2,334

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>

Read only

Former Member
0 Likes
2,334

Thank you all for your swift responses.