cancel
Showing results for 
Search instead for 
Did you mean: 

when we go for a UDF

Former Member
0 Kudos

Hi,

this is an FAQ.. so, can you please provide me the solution for this.. I'm using PI 7.0 in which scenario we need to go for UDF.. normally in PI for everything standard functions are there.. even though.. some times we need to go for an UDF's.. can anybody give the scenarios.. when exactly we need to go for a n UDF..

how can we sya this with better answer..

Thanks

babu

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Babu,

As the name UDF is self explainotry "User Defined Function". It means that whenever in mapping your requirement is not fulfilled by the standard functions, the we think about UDF creation for mapping. UDF can be used in complex situations like:

1. If you are having a scenario IDoc to File, and in which you are sinding some account information like sumrized amount (per GL Account Number) to file, then standard function will not help you. In this case you have to go for an UDF.

2. It can also be used for R/3 lookups, to searching any value in R/3 tables. (But it creates performance issue, since every time you run your scenario it will hit the R/3 database which is not good).

Regards,

Sarvesh

Former Member
0 Kudos

Hi Babu,

As u r aware that UDF is the functinality provided by XI where we can not fulfill the requirement by Std functions.

Let me give you few example:

1) UDF is required when we want to do lookup in R3,which can not be done with std function.

Within an XI mapping it is a common requirement to be able to perform data lookups on-the-fly. In particular, there may be a need to look up some data that is maintained in an R/3 application.

In the error handling topic we have seen the different validations which need to be performed on file. This can be done through Lookup.

Some use cases:

• Look up material number from table MARA.

• Look up cost center budget.

• Look up employee information.

• Look up unit-of-measure (UOM) information from table t006a.

• Lookup for raising an alert.

In this case we need to write the UDF for the same.

2) UDF is used when you want to get the file value dynamically from the File adapter that time you have to go for UDF.

3) When there is a requirement where you need to do the comparision of input value with some value and based on that comparision you need to return some different value.

4) You can use USF for raising alert.

5) You can use UDF for calling passing values to other java code.

There are many examples but it depends upon the requirement.

Thnx

Chirag