on 07-26-2006 3:12 PM
Hi,
i written routine in update rules of the ods. I am loading data from r/3 to 1st ods and from 1st ods to 2nd ods. In the update rules of 1st ods my routine is calculating the date_diff of two date fields. I am getting the output for some values like 12-,13- etc. In the 2nd ods update rules my routine is to get result based on the output of the above routine
for eg: if date_diff < 0,result = 0,
elseif date_diff = 0,result = 1.
elseif date_diff > 0, result = 2.
but i am getting the output as blank space for date_diff < 0 and for others it is working fine. How to solve this ?
Any help will be appreciated.
Hi,
I can not explain what is going wrong with your routine, but if routine is working fine except date_diff < 0 why don't you try to change your conditions to
IF date_diff > 0 THEN 2
ELSE IF date_diff = 0 THEN 1
ELSE 0
?
Best regards,
Björn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your reply. I think the problem with the date_diff data ie., 12-,13- etc. I think the system is not considering the '-' sign and so the problem. If i get the '-' sign in front of the number ie, -12,-13 then i hope it will work. This is only my assumption and can u tell me how to get the '-' sign as prefix to the number like -12,-13 etc.
thanks in advance.
Hi Prasad,
I think Date_Diff is Char type. So it is not considering -ve sign.
Try this:
What will be the maximuma -value you can get(-1000 or
-2000...etc).
While calculateing Date_Diff, try to add 1000.
If Date_Diff is -12 then You will get
Date_Diff= -12 + 1000 = 988.
Now you can change you code to:
If Date_Diff < 1000
Result = 0
ElseIF Date_Diff > 1000
Result = 2.
Elseif Date_Diff = 1000
Result = 1.
Endif.
Hope it Helps
Srini
maybe there is something wrong in your target object definition...("0" is read as a not assigned value)...
If you don't want to loose your time to verify this setting, chenge your conditions to 1, 2 and 3 !!!
Stupid workaround, but...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.