Application Development 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: 

help on 'GET_WEEK_INFO_BASED_ON_DATE'

Former Member
0 Kudos

Hi all,

I have problem with the following code.

CALL FUNCTION 'WEEK_GET_FIRST_DAY'

EXPORTING

week = s_kweek

IMPORTING

date = s_date

EXCEPTIONS

week_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.

CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'

EXPORTING

date = s_date

IMPORTING

week = woche

monday = monday1

sunday = sunday1.

MOVE: monday1 TO p_datum.

here the problem is when i give s_kweek 200314.

it retriving s_date correctly.

but when it passed to the FM GET_WEEK_INFO_BASED_ON_DATE

it giving sunday1 and monday1 based on 2005 only not for 2003.

if i give any year like 200214 its giving values for 2005 only not for 2002.

Please kindly help me.

regards

chandu.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sai,

I have tried in my ssytem, it is working for me.

What are you passing to the fm

GET_WEEK_INFO_BASED_ON_DATE , Pass the date

(2005.11.17) it will give you the details.

Thanks & Regards,

Siri.

4 REPLIES 4

Former Member
0 Kudos

Hi Sai,

I have tried in my ssytem, it is working for me.

What are you passing to the fm

GET_WEEK_INFO_BASED_ON_DATE , Pass the date

(2005.11.17) it will give you the details.

Thanks & Regards,

Siri.

0 Kudos

Hi all,

Sorry to bother you i solved it .

Anyway thanks for looking my code.

regards

chandu.

venkata_ramisetti
Active Contributor
0 Kudos

Hi,

I just tried in my R/3 system(4.7 version), I getting correct values.

Can you check datatype for p_datum?

Thanks,

Ramakrishna

former_member188685
Active Contributor
0 Kudos

Hi Try excute in Se37 by passing date.

it is working fine

regards

vijay