on 2014 Jan 31 12:55 PM
Hi all,
We are on BW 7.31. I have a process chain with a sub chain where a decision step decides whether it is the second working day or not. If not, the process chain stops and goes to the next sub chain. If it is the second working day, it starts a new sub chain where financial data for the last month is being loaded.
The formula for the decision is as follows:
WORKINGDAY_MONTH( SYST-DATUM, 'NL', '' ) = 2
The strange thing now is that in the test systems the decision works fine but in production it is showing strange behavior. I've created three situation:
Situation 1: the 2nd day of the month is the second working day. So the sub chain starts after the decision. And off course not on the 1st and 3rd day.
calday | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Mo | Tu | We | Th | Fr | Sa | Su | Mo | Tu | We | |
workingday | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Situation 2: the second working day is on monday. What happened in this case, is that the sub chain for financial data also ran during the weekend AND on monday. So as if the weekend days were also set as 2nd working day. This caused problems because of double (triple) requests.
calday | 27 | 28 | 29 | 30 | 1 | 2 | 3 | 4 | 5 | 6 |
Mo | Tu | We | Th | Fr | Sa | Su | Mo | Tu | We | |
workingday | 21 | 22 | 23 | 24 | 1 | 2 | 3 | 4 |
So we changed the formula and we put '-' in the last section (after 'NL', ) so it keeps the last day in memory in case it is not a working day. This was found in the F1 help pop-up in under WORKINGDAY_MONTH in the formula edit screen. So the new formula is:
WORKINGDAY_MONTH( SYST-DATUM, 'NL', '-' ) = 2
Situation 3: with the new formula there was a new problem. With working day 2 on friday, the system keeps the value during the weekend so again saturday and sunday was "sort-of-working-day-2".
calday | 28 | 29 | 30 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Mo | Tu | We | Th | Fr | Sa | Su | Mo | Tu | We | |
workingday | 22 | 23 | 24 | 1 | 2 | 3 | 4 | 5 |
What makes it even more strange is that it only happens on production. I've have checked the tables for factory calendar (TFACD) but they're the same on all systems. Is there another setting which determines the working days or how it keeps them in memory?
Hope someone has seen this before or know a simple setting or solution.
Thanks!
Best regards,
Daan Boon
The Netherlands
Request clarification before answering.
This is really really old. But since I think the issue still exists, I want to suggest a possible workaround.
As mentioned by others the formula (like fm DATE_CONVERT_TO_FACTORYDATE) shifts a date that is not a working date either to the following (+) or the previous working date (-) depending on "correct option". So you cannot know whether it is really a working day or not. Obviously this is really strange and very misleading. Solution could be to add a check if you get the same result for correct option "+" and "-". If you get the same result, it is a date that has not been shifted, so it is a geniune working day. Attached a screenshot fot the 7th working day. Hope this can be useful. Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
52 | |
8 | |
5 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.