on 05-17-2007 10:07 AM
I have been working on what I thought was a simple mapping from one infotype to another.
Simply put:
IF
infotype 0006
-
> ANSSA = Z4
-
>WKWNG = X then infotype 0001-SACHA = W
IF
infotype 0006
-
> ANSSA = Z4
-
>WKWNG = ' ' then infotype 0001-SACHA = H
I thought this would be simple! The first statement is fine, however, the WKWNG is a Checkbox and I am having problems covnerting a blank value into the statement. Infact, it reutrns a W whatever is in the WKWNG!
I have tried createIF, mapWithDefault, fix values (x=True, ' '= false).
None have worked....
What is the best way to deal with this? ( I am attempting to write a UDF at the moment - but my Java skils only extend to introduction with OO Programming and Java)
Use euqalS, IfwithElse & Constant functions it will be solved.
It should be like
if WKWNG = X
0001-SACHA = W
else
0001-SACHA = H.
No need of UDF
Regards
Sushil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks everyone!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to you all....
Maybe not efficient, but it works!!!
if (a.equals("X") && b.equals("Z4"))
return "W";
else { if( !a.equals("X") && b.equals("Z4"))
return "H";
}
return "";
Must get some Java Training!
Also, I found it easier to write the code in eclipse than notepad!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
create UDF with two inpouts (a = ANSSA and b = WKWNG)
if ( (a.equals("Z4") and b.equals("X"))
{
return "W";
}
else
{
return "H";
}
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Michal.
I have written something similar (badly), but there may be other values than Z4 and X.
if a.string( == 'Z4'), {
if b.string( == 'X'); {
c.string( = 'W')
} else
if a.string('Z4'), {
if b.string( <> 'X'),{
c.string( = 'H'),{
else.
}
}
}
}
Just attempting to debug errors in the coding at the moment (there are a few)!
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
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.