‎2008 Jun 03 7:19 PM
Can someone tell me how can we determine if a particular day is a working day or not, based on the Factory Calender?
Please help.Its urgent.
‎2008 Jun 03 7:32 PM
use the FM
DATE_CONVERT_TO_FACTORYDATE
if the returned date = to the sent date, it is a working day
DATA: senddt TYPE d VALUE '20080601', "<== this is Sunday
recvdt TYPE d.
CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
EXPORTING
correct_option = '+'
date = senddt
factory_calendar_id = 'US'
IMPORTING
date = recvdt.
* FACTORYDATE =
* WORKINGDAY_INDICATOR =
* 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 senddt NE recvdt.
WRITE:/ senddt, 'is not a working day'.
ELSE.
WRITE:/ senddt, 'is a working day'.
ENDIF.
‎2008 Jun 03 7:21 PM
‎2008 Jun 03 7:21 PM
hi Shashi,
Use function module: DATE_CHECK_WORKINGDAY
pass date and factory calender ID.
thnx,
ags.
‎2008 Jun 03 7:22 PM
‎2008 Jun 03 7:32 PM
I have to determine the Factory Calender for a Shipping Point in a Delivery.
How can we do that?
Please help.
‎2008 Jun 03 7:52 PM
Hi,
Based on Delivery number you can get factory calender from table LIKP.
KNFAK - Customer factory calendar
Pick this and use the function module to get working day or determine working day or convert to working day. You can search all these function modules in SE37 by doing F4 on search term - star working star day star.
I think you should explore ABAP first before putting question on SDN for every doubt you have. You should alsywas check all the fields in the tables you are using. Most of the time you will get all the required fields in the same or corresponding tables.
thnx,
ags.
‎2008 Jun 03 9:15 PM
I have already tried that field and saw that its blank.
Thats the reason I was trying to ask questions.
‎2008 Jun 03 7:32 PM
use the FM
DATE_CONVERT_TO_FACTORYDATE
if the returned date = to the sent date, it is a working day
DATA: senddt TYPE d VALUE '20080601', "<== this is Sunday
recvdt TYPE d.
CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
EXPORTING
correct_option = '+'
date = senddt
factory_calendar_id = 'US'
IMPORTING
date = recvdt.
* FACTORYDATE =
* WORKINGDAY_INDICATOR =
* 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 senddt NE recvdt.
WRITE:/ senddt, 'is not a working day'.
ELSE.
WRITE:/ senddt, 'is a working day'.
ENDIF.