on 11-15-2011 12:56 PM
In Graphical Mapping I want to do a RFC-Lookup using the new buildin RFC-Lookup function. But I want to do the lookup only
if for example field1 in the inputmessage has value "00000", otherwise I could map field1 directly from input to output.
I tried IfWithoutElse and If but that didn't work, the RFCLookup is always executed.
Personally I always use a hashmap to store my lookup values in a UDF when doing an RFC lookup. That way if the same value is required to be looked up, the code firstly checks the hashmap. I find performance can be a lot better (if you have repeating values. If you did this approach all you would need to do is prefill the hashmap with the value(s) you don't want to look up e.g. 0000 = 0000, that way it achieves your result and potential saves on performance.
Andrew
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praus,
can you try with UDF and in UDF write a condition : check the input messge value in first setp , if the value is "00000" then return the same value othersie call your RFC lookup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
if the condition is failed, the RFC Lookup will not execute.
when u do the display in message mapping, u will see that there is a output value even the condition is false. but when u do the channel monitor, u will see that only the RFC Lookup execute for the true value.
by the way, when we use RFC lookup, we also do the following steps to reduce RFC Lookup call. it would reduce the server load of performance.
Regards,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here i have the same problem
check the queue of function ifS and if show always the same
even i ISF:in1(the candition) ist false in ISF:In0 is the result from tehe rfclookup
the same result si if I use the function if
so there is no difference between if and ifS
checking the communication cannel show that the rfc call always will call.
regards ralf
Hi,
try to use below logic
field1---->exists--------------->
AND---------------- IF THEN ELSE---------------->TARGET
field1-----equals(text)-------->
constant(0000)
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try with ifwith else....function.
first compare input with constant value 0000 if result is true than RFC lookup else map field1 input
thanks
chirag
Edited by: Chirag Gohil on Nov 15, 2011 6:37 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
if(equalsS(field1 = '00000') then(RFCLookup) else(source/field1)) -> target/field1
Use ifS instead of if, the reason for this is with ifS the logic is executed like
if(exp1)
statement1;
else
statement2;
instead of
value = if(expression, statement1, statement2);
The second code executes the all statements before returning the correct one (behavior of if in PI), whereas the first code only executes the statement if the expression is correct (behavior of ifs in PI).There is a SAP Note with regards to this, you may want to check on that.
Hope this helps,
Mark
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
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.