on 09-20-2012 10:06 AM
Dear all,
I have a date (20120920) where I need to add 10 working days in mapping.
For weekend it would be easily to write a little UDF, but I am afraid
the public holidays (Germany) would not be that easy.
Does anyone got experience with this?
Regards
Chris
Hi Chris,
This might be difficult in PI itself - since as you say, PI wouldn't know the holidays. But you could use an RFC Lookup to execute a FM in ECC to add those 10 days according to a factory calendar. The thread below contains three proposals of function modules to be used:
All you need to do is encapsulate the right FM into a remote-enabled FM and then call it from PI mapping.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Christain,
Can you explain ur requirement.
what you want add 10 day to day or any thing else?
Regards
Gagan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a delivery date like 20120920 (Thursday). If I add 3 days, the date 20120923 (Sunday) will be returned, but of course it is not a valid delivery day. So the weekend (Saturday and sunday needs to be removed. In our example the 20120925 would be the right delivery date.
If Monday would be a public holiday (like easter monday) the correct delivery date would be 20120926.
Hi Christain,
you can get this as Glowacki said, and also i have one more option if you have not more public holiday means max 10 to 20. you can do wit value mapping or fix mapping.
as follow
you need to create two UDF's on is just as same u created addweekend,and second is addDays whose input is output of fixvalues which return how many days to add, but for that you have to hard coded holidays
if two or more public holiday come toghert then you have to add more day as i highlighted in below.
and one more thing if you have more public holidays means 4 or 5 together then you have to take care for that also by repeating that logic in a loop and for more flexibility you can use value mapping also
Regards
Gagan
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.