cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping UDF for lookuping of a value inside field's list of values

Former Member
0 Kudos

Hey everyone,

For a FI mapping I'm working on, I was wondering if somebody has some Java UDF which lookups for a value inside the whole list of values which the mapping gathered for a specific field?

Thanks,

Ben

Accepted Solutions (0)

Answers (2)

Answers (2)

GabrielSagaya
Active Contributor
0 Kudos

source code --

//write your code here

JCO.Repository myRepository;

// Change the logon information to your own system/user

JCO.Client myConnection = JCO.createClient(

// all the client information namely client ,user id pwd etc

myConnection.connect();

// create repository

myRepository = new JCO.Repository( "SAPLookup", myConnection );

// Create function

JCO.Function function = null;

IFunctionTemplate ft = mRepository.getFunctionTemplate("xxxxx"); //Name of RFC

function = ft.getFunction();

// Obtain parameter list for function

JCO.ParameterList input = function.getImportParameterList();

// Pass function parameters

input.setValue( a , "xxxxx" ); //import parameter of RFC, a is input argument.

myConnection.execute( function );

String ret = function.getExportParameterList().getString( "XXXX" ); //export param

myConnection.disconnect();

return ret;

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1...

File Lookup in UDF

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/file%2blookup%2bin%2budf

Lookupu2019s in XI made simpler

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

SAP XI Lookup API: the Killer

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

Webservice Calls From a User Defined Function.

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

Former Member
0 Kudos

HI Ben,

Generally the UDfs are created for specific customized requirments.

So please can you clarify about ypour requirment so we could see for the UDFs or could share with you the UDF code with developing it.

Thanks

Swarup

Former Member
0 Kudos

I am trying to write UDF which Intersect 2 queues of XI

for example:

queue A:

4.6,8,12

queue B:

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

result

4,6,8,12,1,2,3,5,6,7,9,10,11,13,14,15

(must be in that order)

Former Member
0 Kudos

Any way to do it without UDF?