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

need week number

Former Member
0 Likes
1,058

1) How to get the current week number?That is it, can be from 1 to 52... 1 is this first week of January, and 52 should be the last week in December

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,032

use FM DATE_GET_WEEK

1) How to get the current week number?That is it, can be from 1 to 52... 1 is this first week of January, and 52 should be the last week in December

6 REPLIES 6
Read only

Former Member
0 Likes
1,033

use FM DATE_GET_WEEK

Read only

Former Member
0 Likes
1,032

Hi,

Use this FM-

GET_WEEK_INFO_BASED_ON_DATE

And DATE_GET_WEEK.

Check this link for coding

http://abaplovers.blogspot.com/2008/05/sap-abap-function-module-te-get-week.html

Read only

Former Member
0 Likes
1,032

Hi,

try with

DATE_GET_WEEK

anirban

Read only

Former Member
0 Likes
1,032

Hi,

chk this



REPORT  ztest_cha5.

DATA : week like scal-week.

call function 'DATE_GET_WEEK'
  exporting
    date         = sy-datum
  importing
    week         = week
  exceptions
    date_invalid = 1
    others       = 2.

WRITE : / 'week No' , week+4(2).

Read only

Former Member
0 Likes
1,032
CALL FUNCTION 'DATE_GET_WEEK'
       EXPORTING
            DATE = sy-datum
       IMPORTING
            WEEK = week.
Read only

Former Member
0 Likes
1,032

As also said by others use

DATE_GET_WEEK

will return the week that a date is in.

With luck,

Pritam.