Skip to Content
Former Member
Jan 12, 2007 at 09:35 PM

Does it matter if I call the same UDF several times in my mapping?


Hi !

I have to map one TXT file to an IDOC. One field of the source file is needed to define values of several IDOC target fields.

I've developed an advanced java UDF that receives the source field, calls an RFC via JCO to convert the source value, and returns the converted value.

Then I use this UDF as part of the graphical mapping, to define the values of about 10 or 15 fields of the IDOC. That is, the UDF is placed 10 or 15 times, one time for each target field.

My doubt is if this an expected way of solving this kind of problem..I'm worried about calling the UDF (RFC via JCO) about 15 times for each source file record...and they could be 1000 aprox !

I've added a trace, and a global variable, and inside the UDF, I check if the current input value is equal the last processed value, if it is that case, then I return automatically the buffered value (in a global variable), avoiding the call to RFC....

Checking my trace...I see that the UDF is called with several different input values in some random order, so my "optimizacion method" does nothing.

Some ideas?

Thanks. Have a nice weekend.