on 01-22-2013 11:46 AM
Hi Experts,
I am trying to load data from a CSV file.
I have a date field through which i am trying to populate value for a field called Status. Logic is, If the Date field is empty then status =2 else status =1.
Simple logic but don't know where am going wrong!!!
I have used routine and formula but both didn't work. Status "1" is successfully loading to the fields in which Date is not Empty but Status is not Loading at all, All the time it is showing empty only...
I have tried with ' ' , '00.00.0000' and '00000000' ... but none of them are working...
This is the result what am getting every time...
Activation Date | Activated By | Activation Status |
11-11-2010 | DATA ENTRY | 1 |
11-11-2010 | DATA ENTRY | 1 |
12-11-2010 | DATA ENTRY | 1 |
16-11-2010 | DATA ENTRY | 1 |
16-11-2010 | DATA ENTRY | 1 |
22-11-2010 | DATA ENTRY | 1 |
# | # | Not assigned |
# | # | Not assigned |
# | # | Not assigned |
# | # | Not assigned |
Please suggest some inputs, Highly appreciate your help.
Thanks & Regards,
Anil.
Hi Anil,
Your requirement is simple enough. Use below code for that;
IF source_fields-/BIC/IOcalday is not initial.
RESULT = '1'.
ELSE.
RESULT = '2 '.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can achieve the same at bex level itself.
Make formula variable with replacement path for your date cahractersitic to convert it inot KF.
In Unit/dimension tab choose--date
Then write simple if else condition:
Make anew formula put this formula variable(F1)
(F1<>0)*1+(F1==0)*2
Hope this helps.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, regarding your example, empty values are designed by '#".
Try this:
IF date eq '#"
RESULT = '2'.
ELSE
RESULT = '1 '.
ENDIF.
Amine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to restrict Query on Date characteristic with #.
Try this :
IF source_package-/BIC/IOcalday is not initial.
RESULT = '1'.
ELSEIF
RESULT = '2 '.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anil,
Try by giving as
if date eq ' '
then status = 2.
else status = 1.
Regards,
Saurabh Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.