on 11-13-2011 11:53 AM
hi, by using grafic rfc lookup it is possible to have more than on value as the result
so one lookup can return the value for n target fields.
but there is no way to prefent the lookup call even if it is part of an if/else .
i will execute the lookup only if source field has the right value, so i try to use the lookup api in a udf function.
but the problem is that there could by only on return?
Any idea how to fix this?
Is there a way to set the total Inputstream of the lookup to the return string?
regards
ralf
> but the problem is that there could by only on return?
>
> Any idea how to fix this?
I assume that you work with PI 7.0, as PI 7.1 allows several output parameters of an UDF.
In PI 7.0 you store the return values in an array or hashtable (which you declare in Java section of the mapping) and define another UDF to read them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
but there is no way to prefent the lookup call even if it is part of an if/else .
Quoting from SAP Note 1090369, ifElse behaves like "value = if (<condition>, <expression1>, <expression2>)". Which means that the three statements are executed and either expression1 or 2 is returned. Since you are using the if/else as a statement, you should use ifS and ifSWithoutElse, in that way, the UDF call is not executed when the input to the UDF is a false.
but the problem is that there could by only on return?
Well you could loop your lookup but this is not best practice. Can you design the RFC such that it would accept multiple values and then return the needed values in one go?
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use if without else and check the source element has right value? if so then use rfc graphic lookup function. And output RFC map to various target fields. I feel assigning the multiple return values to many target field is possible. similarly in case of uDF, the output of API colllect it in the list object and parse the objects to assign to diff target fields.
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.