Menu

SAP Function Module DATE_CONVERT_TO_FACTORYDATE

Calendar function: Returns factory calendar date for a date

The Function Module DATE_CONVERT_TO_FACTORYDATE (Calendar function: Returns factory calendar date for a date) is a standard Function Module in SAP ERP and is part of the function group SCAL within the package SZC.

Technical Information

Function Module DATE_CONVERT_TO_FACTORYDATE
Short Text Calendar function: Returns factory calendar date for a date
Function Group SCAL
Package SZC
Module Type Remote-Enabled

Importing Parameters

These are the IMPORTING parameters of this function module.

Parameter Name Type Associated Type Default Value Short Text
CORRECT_OPTION LIKE SCAL-INDICATOR '+' Flag how workday should be calculated
DATE LIKE SCAL-DATE Date to be converted into factory calendar date
FACTORY_CALENDAR_ID LIKE SCAL-FCALID Factory calendar ID

Exporting Parameters

These are the EXPORTING parameters of this function module.

Parameter Name Type Associated Type Default Value Short Text
DATE LIKE SCAL-DATE Date to be converted into factory calendar date
FACTORYDATE LIKE SCAL-FACDATE Number of the workday in the specified calendar
WORKINGDAY_INDICATOR LIKE SCAL-INDICATOR Flag whether date is a workday

Changing Parameters

This function module does not define any CHANGING parameters.

Table Parameters

This function module does not define any TABLE parameters.

Exceptions

These are the Exceptions of this function module.

Exception Name Short Text
CALENDAR_BUFFER_NOT_LOADABLE Factory calendar could not be buffered
CORRECT_OPTION_INVALID CORRECT_OPTION is not '+' or '-'
DATE_AFTER_RANGE Date is later than factory calendar definition
DATE_BEFORE_RANGE Date is earlier than factory calendar definition
DATE_INVALID Invalid date format
FACTORY_CALENDAR_NOT_FOUND Factory calendar is not in buffer