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

Is there any function module? Fiscal week no problem

Former Member
0 Likes
1,713

Hi friends,

I want how to get physical week for given date.

Ie for 01-04-2009 week no is 1.

Is there any function module?

Pls suggest

Regards

Moosa

1 ACCEPTED SOLUTION
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,678

Try FM :GET_WEEK_INFO_BASED_ON_DATE

9 REPLIES 9
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,679

Try FM :GET_WEEK_INFO_BASED_ON_DATE

Read only

Former Member
0 Likes
1,678

Hi

U can try to use the fm DATE_GET_WEEK

Max

Read only

Former Member
0 Likes
1,678

Hi,

You can use function module GET_WEEK_INFO_BASED_ON_DATE.

in this the parameter WEEK gives 6 character output out of which first four gives the year and last two characters gives the week number.

Hope this works for you.

Regards,

Mansi.

Read only

Former Member
0 Likes
1,678

Hi,

Use the below code.

DATA: v_ersda TYPE sy-datum VALUE '20090618'.

DATA: v_month(2) TYPE c,

v_week(2) TYPE c,

v_full_week LIKE scal-week.

MOVE v_ersda+4(2) TO v_month.

CALL FUNCTION 'DATE_GET_WEEK'

EXPORTING

date = v_ersda

IMPORTING

week = v_full_week

EXCEPTIONS

date_invalid = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

MOVE v_full_week+4(2) TO v_week.

WRITE:/5 'Month = ', v_month.

WRITE:/5 'Week = ', v_week.

Regards,

Kumar Bandanadham

Read only

Former Member
0 Likes
1,678

Hi,

try this FM WEEKNR_GET.

hope it'll help u.

Regards,

Sneha.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,678

Hello Friends,

My question is:

Which of these FMs satisfy the requirement as per the OP?

Plz revert back.

BR,

Suhas

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,678

Hi,

What do you mean by OP??

You can get the week by using diff FM .

Rgds,

Sandeep

Read only

Former Member
0 Likes
1,678

Hi,

What do you mean by OP??

I want week no with respect to Fisical year (Apr2009-Mar2010) for input date?

regards

Moosa

Read only

Former Member
0 Likes
1,678

>

> What do you mean by OP??

OP means Original Poster in

Its worth knowing all other terms that are mentioned in the above thread..

Regards

Karthik D