cancel
Showing results for 
Search instead for 
Did you mean: 

UDF getting executed twice in a mapping even though it is used only once.

Former Member
0 Kudos

Hi,

I have a mapping where i am taking the back up of my transformed file into a folder. This is done using a UDF. After this i generate a checksum using another UDF for the file and then invoke an RFC to insert the checksum in the table against the file name.

The problem is this entire process works fine but my UDF code for taking a back up is runs once more after all these steps even though i am not using that UDF again anywhere in the mapping.

What could be the reason for it.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Why you do not simple check, if the UDF was already called?

Answers (2)

Answers (2)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>I have a mapping where i am taking the back up of my transformed file into a folder. This is done using a UDF.

that's why we mention is so many times - don't use UDFs to do inserts

or store anything

this is not the place to do that

you can do it in the receiver retermination

please change your design and do it correctly so you won't have problems

and customer will not see any issues with not working UDFs

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal,

Its not possible for us to change our design at this point in time.

Is this a known problem about UDFs. And is there any other solution for it.

Former Member
0 Kudos

Hi,

Please check the source node which you are using in the map is not occurring twice.

Regards,

Shwetambari.

Former Member
0 Kudos

Hi,

My source node's ocurrence is 1..1. Its not a multi occurence node.

Former Member
0 Kudos

Hi

I think you are code is re used in checksum UDF where to generate a file, consolidate in one UDF and try then transform into file. Hope this works

Regards

Shankar

Former Member
0 Kudos

Hi,

Its not being resused in Check sum UDF. We only pass the location of file name over there.