cancel
Showing results for 
Search instead for 
Did you mean: 

udf

Former Member
0 Kudos

Hi :

question on udf for value lookups : can multiple values of source message be pulled in an array and passed to a RFC call so that a lookup could be done on multiple values of souce message and populated into multiple target values..

important part is that how can multiple values from source message be put into an array for rfc call.

i am looking for the udf ( java code).

It will be really appreciated if someone can help out.

Thnx

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>can multiple values of source message be pulled in an array and passed to a RFC call so that a lookup could be done on multiple values of

no other way to do that - if's not very good if you use RFC lookup for evey line etc..

so you need to call your RFC once

all you need to do in your UDF if to build a table with RFC signature

(via loop) and fill in the table parameter of your RFC

Regards,

michal

Former Member
0 Kudos

Hi :

it would be nice if some code could be sent ,like it is looking cryptic to me as of now.

Thnx

Former Member
0 Kudos

HI,

see the below links

DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function

Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

Also read thru this to get more idea on lookups -

http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0

How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api

Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes

Regards

Chilla

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

write me a mail and I will send you my article

my mail is in my business card

Regards,

michal

Former Member
0 Kudos

The idea of temp table and calliing that table in RFC call looks good, does somebody have a code for this ?

Removing context ,which has been mentioned also looks good but i am not sure.

Can anyone elaborate?

thnx

Former Member
0 Kudos

Hi Michal,

Could you plz send it me also .

My email id ;ccschilla@hotmail.com

Thanks and Regards

Chilla..

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

I can tell you how to send multiple values to a RFC , but your RFC should support the incoming multiple values and return multiple values.

to send multiple values initially take on temp table insert all values into that temp table and use this table as input to that RFC .

if you have multiple valies in sender side take remove context and send to RFC.

All these type of tricks can be possible if you are using the ABAp mapping.

Regards

Chilla