cancel
Showing results for 
Search instead for 
Did you mean: 

UDF executing multiple times

Former Member
0 Kudos

Hi,

I have an interfaces SOAP-- JDBC, in which I am posting data to 6 different tables in a single message mapping.

At a time only one table will be populated based on request. A single UDF is written to split values coming from source. And this UDF is being used in all 6 tables.

In signature tab I have given message occurence as 0..1 for all 6 tables. My issue is even if only one table is created the UDF is executing internally 6 times. Although I can see after test that only one particular table is being populated at a time but UDF is executing 6 times.

Because of this performance is significantly low, can you please help me how or what changes I make that UDF only runs for a table for which conditions are true.

Thanks

Shivi

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi Shivi,

Try grouping several target fields together (add them to the mapping area at the bottom of the mapping window). This should make your UDF run only once for all those grouped fields.

Regards,

Greg

Former Member
0 Kudos

Hi Grzegorz,

Is it really possible if I do multiple target field mapping in a same window the UDF ll be executed one time... Thats a great solution for me.

Thanks

Shivi

Answers (1)

Answers (1)

former_member184720
Active Contributor
0 Kudos

AFAIK - you cannot avoid it. no matter what PI will execute the UDF as it is part of the mapping.

Are you making any connection using UDF? May i know the complecity involved in the UDF.

It shouldn't take much time..


Former Member
0 Kudos

I have created a global container using UDF to collect RFC lookup output, to send it to multiple other fields. Its bit big and complex mapping.

former_member184720
Active Contributor
0 Kudos

If there is a possibility, May be instead of using this UDF in every table, create a grpahical variable under the MT and use this variable in all the tables. That way i don't think yourn UDF will execute 6times. But not sure if this is possible in your case.

More Info on Grpahical Variable :

http://scn.sap.com/people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-gra...