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

Function Module which will take Wekk No & Return date range (from & To dat)

0 Likes
535

Hello everyone,

I need a Function Module which will take Week No as an input Parameter & return me the date range

(From date & To date of that week) .

Thanks in advance!

Cheers!

Moderator message: date calculation questions = FAQ, please search before posting.

Edited by: Thomas Zloch on Nov 2, 2010 5:25 PM

3 REPLIES 3
Read only

Former Member
0 Likes
502

Hi,

I dont think you will get in Standard, Please find available FM here http://wiki.sdn.sap.com/wiki/display/ABAP/ImportantFunctionModule+Names

Regards

GK.

Read only

Former Member
0 Likes
502

Hi,

Please check FM LAST_WEEK.

Pass the year and week number in input ( YYYYWK).

Thanks,

Anmol.

Read only

Former Member
0 Likes
502

Hi,

Please write the below logic..

data : v_date11 type sy-datum,

monday type sy-datum,

sunday type sy-datum,

v_count1 type i .

*v_count1 = 20 * 7. " Say U want details for 20th week , or give a parameter for week and multiply with 7*

v_date11 = '20100101'. " take the starting day of the year ....

v_date11 = v_date11 + v_count1. " add to the date

CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE' <-- call this FM

EXPORTING

DATE = v_date11

IMPORTING

  • WEEK = WEEK

MONDAY = MONDAY <-- will have the week starting day

SUNDAY = SUNDAY

Regards,

Srini.