Skip to Content

Functional Modules to get day of year based on Sy-datum

Hi Friends,

Requirement is to create Customer Exit which returns day of year.

Is there any date functional module which returns day number of year.

I need to get day of year based on SY-DATUM.

Say for

31st Jan 2016 should return 31

01st Feb 2016 should return 32

02nd Feb 2016 should return 33

.

.

.

31st Dec 2016 should return 365

Thanks in advance.

Regards,

Sunil

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 13, 2016 at 08:44 AM

    Hi Sunil,

    If you substract the sy-datum from a date variable containing the 1st january of the current year, you should obtain the day number of the current date.

    NbDays = sy-datum - firstday.

    Regards,

    Frédéric

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 13, 2016 at 06:26 AM

    Try this one FIMA_DAYS_AND_MONTHS_AND_YEARS.

    Thanks,

    Bhavin Vyas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.