on 07-31-2008 9:54 AM
Hi,
Could any one give some realtime examples of Udf's used in the project along with the code.
Full points will be awarded
Hi Armut.
Write value in GlobalContainer
public String setValue(String value,Container container){
************************************************
container.getGlobalContainer ().setParameter ("givaAName",value);
return "";
Read Value aus GlobalContainer
public String getRefNr_ORIGIN(Container container){
***************************************
return (String) container.getGlobalContainer().getParameter ("givaAName");
Regards Mario
Edited by: Mario Müller on Jul 31, 2008 4:58 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sample example code
Sender side we have one segment that is 1..unbound, our req is count howmany times it is repeated and concatenate one variable data and send to target
Set the context of that segment to that parent segment.
Select the Queue type UDF, input is that variable(tdline).
Input tdline
String returnString = "";
if(TDLINE.length>0)
{
for (int i = 0; i < TDLINE.length; i++)
{
returnString = returnString+ TDLINE<i>;
}
result.addValue(returnString);
}
else
result.addValue(TDLINE);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
public String GetFileName(Container container)
{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
}
The above code is used to retrieve source file name in mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi amruth,
This links for User Defined Functions,
http://help.sap.com/saphelp_nw04/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/b1/83a09f668320419dbe00a741e0fe6a/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/45/244c40aa6a0272e10000000a155106/frameset.htm
http://java.sun.com/j2se/1.5.0/docs/api/
regards
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The id attribute is mapped using a user defined function globalCounter which records the order in which the nodes appear in the source structure. The variable used to store the count is a global variable and is incremented every time a node is found in the source structure (irrespective of the node name).
Create one-to-one message mapping between source message and the intermediate message. Map the id attribute in the target with the globalCounter function.
The Java code of the globalCounter function is given below u2013
public String globalCounter(Container container){
GlobalContainer globalContainer;
globalContainer = container.getGlobalContainer();
Object o = globalContainer.getParameter("count");
Integer i;
if ( o == null ) i = new Integer( 0 );
else i = (Integer)o;
i = new Integer(i.intValue() + 1 );
globalContainer.setParameter("count", i );
return i.toString();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
http://flickr.com/photos/8764045@N06/
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
http://java.sun.com/j2se/1.5.0/docs/api/
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf
Regards,
phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think UDF's are nothing but user defined feilds which can be used to store or place holder for any field in the inound or outbound documents.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.