on 07-28-2008 1:14 PM
Hi All,
I wonder if any one could shed some light on the following error when trying to create a sales order. The error is : Factory Calendar Date Conversion Error
Regards
TV
Hi.
The factory should be configured for the company code.
SPRO --> financial accounting ---> Financial accounting and global setting --> company code --> enter global parameters.
check on the company code by double clicking.
Take the help of the FI consultant if you do not have the authorisation.
Thanks
Kuntla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Tony,
Follow notes will solve your problem,
Every plant in SAP can have its own calendar that defines plant working days. This calendar is used by planning functions to determine whether a particular day is working one or not. You can see the effects if, for example, you try to create a delivery schedule on Sunday, and the system says that actually the next working day is another one.
Very ofter we have to account for working days and exclude weekends and holidays in our ABAP. To do that, SAP provides two functions modules that are used to convert between the u201Cnormalu201D date and the enumerated u201Cfactory dayu201D. The factory day is a number assigned to each working day in plant calendar. The functions are FACTORYDATE_CONVERT_TO_DATE and DATE_CONVERT_TO_FACTORYDATE and they are documented directly in SAP, in SAP standalone help (BC Extended Applications Function Library) and, of course, at se37.com.
The typical use of those functions is to add a number of days to a given date, skipping holidays and weekends. This is often asked on SAP-related forums and is one of the subjects in SAPfans ABAP FAQ.
I use those functions also for simple checks whether a day is working or not, and to move a date to a working day (forwards or backwards). Below are forms that I use. The factory calendar (FABKL) can be read directly from the table T001W. The parameter pf_correct should be u2018+u2019 to move forward or u2018-u2019 to move backwards.
form move_to_working
using
pf_fabkl type fabkl
pf_correct type cind
changing
pf_date type datum.
data:
lf_newdate type datum.
check not pf_fabkl is initial.
call function 'DATE_CONVERT_TO_FACTORYDATE'
exporting
correct_option = pf_correct
date = pf_date
factory_calendar_id = pf_fabkl
importing
date = lf_newdate
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.
if sy-subrc = 0.
pf_date = lf_newdate.
endif.
endform.
form is_working_day
using
pi_werks like pbim-werks
pi_date like sy-datum
pi_fabkl type fabkl
changing
po_working like space.
data:
w_work like SCAL-INDICATOR,
w_fabkl like t001w-fabkl.
clear po_working.
call function 'DATE_CONVERT_TO_FACTORYDATE'
EXPORTING
date = pi_date
factory_calendar_id = pi_fabkl
IMPORTING
workingday_indicator = w_work
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.
if sy-subrc = 0 and w_work is initial.
po_working = c_x.
endif.
endform.
Regards,
Barathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.