on 10-22-2007 3:56 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.