Skip to Content
author's profile photo Former Member
Former Member

To find a function module

Hi

Can any one please tell me the name of function module which will tell me whether on a given day it is working day or not, based on factory calendar id(IDENT) and Date.

I have input parameter as 1.Factory calendar id ( IDENT)

2. Date

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2007 at 06:15 AM

    CALL FUNCTION 'HR_PERSONAL_WORK_SCHEDULE'

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2007 at 06:17 AM

    I have worked on it,But i forget tht..

    Plz go to se37 and put day*week and press F4..It will show some FM..U can choose from tht..

    Use the keywords WEEK and DAY

    Reward if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2007 at 06:50 AM

    Hi,

    Try this function module HOLIDAY_GET.

    Use like this :

    CALL FUNCTION 'HOLIDAY_GET'

    EXPORTING

    HOLIDAY_CALENDAR = 'IN' FACTORY_CALENDAR = 'IN'

    DATE_FROM = WA_DATES-BEGDA

    DATE_TO = WA_DATES-ENDDA

    • IMPORTING

    • YEAR_OF_VALID_FROM =

    • YEAR_OF_VALID_TO =

    • RETURNCODE =

    TABLES

    HOLIDAYS = IT_HOLIDAYS

    EXCEPTIONS

    FACTORY_CALENDAR_NOT_FOUND = 1

    HOLIDAY_CALENDAR_NOT_FOUND = 2

    DATE_HAS_INVALID_FORMAT = 3

    DATE_INCONSISTENCY = 4

    OTHERS = 5

    .

    IF SY-SUBRC <> 0.

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

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

    ENDIF.

    Reward if useful.

    Regards,

    Vani

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2007 at 07:00 AM

    <b>HOLIDAY_CHECK_AND_GET_INFO</b> Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND.

    <b>Example:</b>

    data: ld_date like scal-datum default sy-datum,

    lc_holiday_cal_id like scal-hcalid default 'CA',

    ltab_holiday_attributes like thol occurs 0 with header line,

    lc_holiday_found like scal-indicator.

    CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'

    EXPORTING

    date = ld_date

    holiday_calendar_id = lc_holiday_cal_id

    WITH_HOLIDAY_ATTRIBUTES = 'X'

    IMPORTING

    HOLIDAY_FOUND = lc_holiday_found

    tables

    holiday_attributes = ltab_holiday_attributes

    EXCEPTIONS

    CALENDAR_BUFFER_NOT_LOADABLE = 1

    DATE_AFTER_RANGE = 2

    DATE_BEFORE_RANGE = 3

    DATE_INVALID = 4

    HOLIDAY_CALENDAR_ID_MISSING = 5

    HOLIDAY_CALENDAR_NOT_FOUND = 6

    OTHERS = 7.

    if sy-subrc = 0 and

    lc_holiday_found = 'X'.

    write: / ld_date, 'is a holiday'.

    else.

    write: / ld_date, 'is not a holiday, or there was an error calling the function'.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2007 at 07:01 AM

    Check this FM <b>'DATE_CHECK_WORKINGDAY'</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 07:44 AM

    Thank you all.every information was helpful

    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.