on 07-24-2008 5:29 AM
Hi
I have a field name Date_stamp in mapping that is requied in variable substitution, but this field is not required in file. How can I get ride of this field from file.
regards
Ria
Hi,
When I am using dynamic configuration, I am getting following error message. Can anyone tell me how to resolve this.
Also I need to have file name as ELddHHmmss. So where I will have to put this format in order to get dynamic results.
Source code has syntax error: /usr/sap/DAX/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapf46fcd5059ea11ddca6a001a645059de/source/com/sap/xi/tf/_I813_Proxy_2_EModMCS_MM_.java:3: '.' expected import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.*;import ddHHmmss; ^ 1 error
Regards
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry filename should be ELddHHmmss...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Once I create UDF by using above dynamicconfiguration code then do i need to map this UDF somewhere.
Secondly, The file name should be ELDDMMHH (which is EL is constant and DD is current date and MM is current month and HH is current hour).
You mentioned that I need to pass DateStamp to the UDF what should i pass as it has to be picked up the current date and time.
Regards
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
..
Edited by: Progirl Progirl on Jul 24, 2008 11:30 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Coud u tell what is the need of Date_Stamp in the target structure.
If it is for naming the file then instead u can use Dynamic configuration and Adapter specific Message Attributes. Using this you can have your filename and file directory assigned dynamically need for variable substitution.
1. Discard or dont map the field Date_Stamp in target structure.
2. create a UDF as in code below .
3. go to advanced tab of receiver channel to select Adapter Specific Message Attributes indicator.
4. Tick the indicator u want from the message header i.e either FileName or Directory etc
code :
// get the dynamic values from the container object
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// create a key to access the Filename parameter
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
//below you access the file name from header if it was set in the sender file channel
//String filename= conf.get(key);
String fileName = dateStamp; // date stamp is an input field to the UDF
// Here you set the fileName(ur datestamp) in the Header of the message
conf.put(key, fileName);
//For Directory settings you can do the same as above
String directory = "Xi/Directory";
key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
conf.put(key, directory);
return fileName;
5. When u use this UDF in Mapping map the o/p of this UDF to a dummy node (a root node may be) in the target structure . This is because the UDF is returning a value. Although this value is not required to prevent exception map it to the root node.
Hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mapping takes place in Integration Engine and variable substitution takes place in adapter engine. Now variable substitution will take value oly when it is present in the target structure of mapping. And therefore the generated file will always have that field. To change this behaviour, u may write an adapter module to change the payload.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. Are u using the FCC to convert the xml to flat file at the receiver?
2. Is Date_stamp field is a element or a subelement.
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi riya,
are you using FCC at receiver side
regards
kummari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.