on 08-07-2006 1:59 AM
Hi,
I was looking at this Blog /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Please help me configuring the UDF in graphical mapping editor.
As I donot know Java, can someone help me develop UDF with the following code?
Code from the Blog is
-
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;
-
My Question is
What is what is User Defined Function Name and arguments ?
What is the First line in the Function?
Is this correct ?
public String FileNameFunction(Container container){
Will someone explain me please?
All explanations will be rewarded with points..
Ram,
Here in the blog Michal is trying to get the file name which is send to XI dynamically. He has clearly told that he has taken the code from:
http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm
Coming to your questions:
<i>What is what is User Defined Function Name and arguments ?</i>
If the standard functions for a target-field mapping do not fulfill your requirements or if the graphical mapping is unclear due to the complexity of the mapping then we will for creating your own user-defined functions. The user defined function has its name, description and arguments. The name is the name of your function, description is the description of your function and arguments are what you are passing as inputs to your function. Also the user defined functions are of two types: Simple and Advanced.
For clear insight understanding of all this go through the url:
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish, thanx for reply. Iam using the source as given in the Blog link I provided ( which is by Michal ). I am trying it as it is. But during mapping testing Its throwing exception.
here is what Iam using in its entirety.
Label: ourSourceFileName
Description: Test
cache : value
Arguments: None
And the source code is
-
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;
-
my Questions are
ourSourceFileName is the Label right ?
Which Radio Button I should Pick up? cache, context or queue ?
and what is the argument name ?
Please bear with me .. I dont know Java.
Message was edited by: Ram Krish
Ram,
<i>Which Radio Button I should Pick up? cache, context or queue ?</i>
CACHE will do fine. CONTEXT and QUEUE are used in case of Advanced User Defined Functions when you want the entire CONTEXT or QUEUE to be the input to your User Defined Function.
<i>and what is the argument name ?</i>
If the only option you are looking at is to get the Source Filename in the UDF , then no Input parameters are required. You can deleted the Input Parameters from your UDF.
Just make sure of the following --
1. Sender File Adapter -- Adapter Specific Identifiers and FIle name are selected
2. Receiver File adapter --Adapter Specific Identifiers and FIle name are selected
Regards,
Bhavesh
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.