cancel
Showing results for 
Search instead for 
Did you mean: 

First Day of Week in Data Entry Profile

Former Member
0 Kudos

Does anyone know if there is a standard SAP RFC i can use in my Web Dynpro application to get the First Day of Week entry in a user's Data Entry Profile?

Thanks,

-Kevin

Accepted Solutions (0)

Answers (1)

Answers (1)

sridhar_k2
Active Contributor
0 Kudos

You can use below Function Modules for that,

DATE_GET_WEEK - gives the year and week for input date

WEEK_GET_FIRST_DAY - input as 200743 (year and week)- it will return starting of the week

GET_WEEK_INFO_BASED_ON_DATE - takes current Date and return Start and End of the week(Standard BAPI).

Regards,

Sridhar

Former Member
0 Kudos

Thank you Sridhar, this is very helpful.

I have one problem though. If I have my first day of the week set to Saturday, and I view the table in Record Working Time, I can see the week begins with Saturday.

But when I use the Function Modules you offered, the First Day of the Week comes back as Monday. Do you know what would cause this difference?

Thanks,

-Kevin

sridhar_k2
Active Contributor
0 Kudos

Hello Kevin,

Function Module returns the System Date from that SAP System(R/3). I have checked this BAPI with '200743 - current week' GET_WEEK_INFO_BASED_ON_DATE, it returns proper data like Start Date and End Date.

I Assume, you are using this in your Java WD. You can write your own function for this. This will return the day of the week.

Calendar xmas = new GregorianCalendar(2007, Calendar.SEPTEMBER, 23);

int dayOfWeek = xmas.get(Calendar.DAY_OF_WEEK);

wdComponentAPI.getMessageManager().reportSuccess("Day : "+dayOfWeek);

Note : - week starts with 0 . 0 - Monday 6 -Saturday.

Regards,

Sridhar