Skip to Content
avatar image
Former Member

FM DATE_CONVERT_TO_FACTORYDATE

call function 'DATE_CONVERT_TO_FACTORYDATE'

exporting

correct_option = '+'

date = sy-datum

factory_calendar_id = 'U2'

importing

date = lv_date

factorydate = lv_factory_lrmdt

EXCEPTIONS

CALENDAR_BUFFER_NOT_LOADABLE = 1

CORRECT_OPTION_INVALID = 2

DATE_AFTER_RANGE = 3

DATE_BEFORE_RANGE = 4

DATE_INVALID = 5

FACTORY_CALENDAR_NOT_FOUND = 6

OTHERS = 7.

after the fm is executed , i am not understanding how the lv_date and lv_date_lrmdt is calculated in fm. especially i nned to understand how lv_factory_lrmdt i calculated. please help

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 06, 2009 at 04:33 AM

    HI,

    In the factory calendar, the working days are numbered sequentially fromthe first working day. The working day numbers are called the factory date. This function module calculates the factory date for a calendar date. If the date passed is not a working day, the next or previous working day is calculated.

    Regards,

    yogesh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hello ganesh

      please follow the path :

      SPRO->SAP Reference IMG->General Settings -> Maintain calendar ->Factory calendar ->Select U2 and choose Calendar icon.

      You will see in the Day column there is a base number. 4410 is calculated on this base number i.e base number + working days = 4410.

      You will also see how the base numbers have been calculated based on the valid from year in the calendar.

      Hope this helps

      Thanks

      Shivika

  • avatar image
    Former Member
    Jul 06, 2009 at 04:59 AM

    Hi Ganesh,

    the working days are numbered sequentially fromthe first working day. The working day numbers are called the factory date.

    This function module count this days from it's first working day.

    It is giving factory date 4410 means till today 4410 working days in that factory.

    While calculating this it ignores holidays.

    Eg. if u pass date as 05.07.2009 which is sunday. It will return u next working day that is 06.07.2009..

    Hope it is much helpful to you.

    Add comment
    10|10000 characters needed characters exceeded