cancel
Showing results for 
Search instead for 
Did you mean: 

UDF

Former Member
0 Kudos

hi.....fri's

1)why we can go for udf's

2)when we go for udf's

pls explain briefly,pls send any document for udf.

thanks in advance,

Pasi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

1)why we can go for udf's

2)when we go for udf's

usually if message mapping std functionality is not supporting your mapping requirement

then we will choose UDF.

for samples ,other details refer this thread

https://forums.sdn.sap.com/click.jspa?searchID=7825961&messageID=4270867

Regards,

Ramesh.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

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).

Here is few links for UDFs.

Refer the below links for UDFs.....

http://java.sun.com/j2se/1.5.0/docs/api/

/people/krishna.moorthyp/blog/2006/07/29/documentation-html-editor-in-xi

/people/sap.user72/blog/2006/02/06/xi-mapping-tool-exports

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm

/people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio

http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d046c490-0201-0010-84b6-9df523cb...

Example 1

http://www.flickr.com/photo_zoom.gne?id=544183191&size=o

http://www.flickr.com/photo_zoom.gne?id=544183195&size=o

http://www.flickr.com/photo_zoom.gne?id=544183225&size=o

http://www.flickr.com/photo_zoom.gne?id=544183233&size=o

Example 2

http://www.flickr.com/photo_zoom.gne?id=545133789&size=o

http://www.flickr.com/photo_zoom.gne?id=545133791&size=o

http://www.flickr.com/photo_zoom.gne?id=545133801&size=o

http://www.flickr.com/photo_zoom.gne?id=545133807&size=o

http://www.flickr.com/photo_zoom.gne?id=545133811&size=o

http://www.flickr.com/photo_zoom.gne?id=545138911&size=o

http://www.flickr.com/photo_zoom.gne?id=545138913&size=o

http://www.flickr.com/photo_zoom.gne?id=545138915&size=o

http://www.flickr.com/photo_zoom.gne?id=545138917&size=o

http://www.flickr.com/photo_zoom.gne?id=545138947&size=o

http://www.flickr.com/photo_zoom.gne?id=545138951&size=o

http://www.flickr.com/photo_zoom.gne?id=545005958&size=o

Example 3

http://www.flickr.com/photo_zoom.gne?id=549186611&size=o

http://www.flickr.com/photo_zoom.gne?id=549186651&size=o

have a look at this also

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e...

Regards,

Sarvesh

Former Member
0 Kudos

Hi Pasi,

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.

Please refer the below thread:

Search on SDn for understanding the UDF. There are two types: simple and advance UDF.

Thnx

Chirag

Edited by: chirag Gohil on Jan 7, 2008 5:51 PM