on 03-25-2009 3:58 AM
Hi,
I am doing Proxy sender to File receiver scenario. I have message payload like,
MTtest1..... 0..1
date.... 0..1
item....0...unbound
I want to create a text file with the name SAP<date>.
I am using a variable substitution method, date: payload: MTtest1, 1, date, 1
Target directory: SAP%date%
I am getting the filename correctly, But this creates a blank line in the top of the file. Please suggest me how to overcome this issue.
If a send the date at the end, how the it must be written in variable substitution method.
If I need to use dynamic configuration, please tell me how to do that, i saw few blogs, but i am not able to get it.
Thanks and Regards,
Sri
dear arunsuri,
modify your structure like this...
MTtest1..... 0..1
+item....0...unbound
++date.... 0..1
then write var subs like : payload : MTtest1,1,item,1,date,1
in FCC
item.fieldnames :abc,xyz,date
item.fieldfixedLengths:say 5,4,0
item.fixedLengthTooShortHandling:Cut
this will not allow ur date field to come in the output file
Edited by: Tarang Shah on Mar 25, 2009 8:03 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is your file structure, flat or XML?
>I am using a variable substitution method, date: payload: MTtest1, 1, date, 1
>Target directory: SAP%date%
This doesnt create an blank line in the target payload.
Even if you use dynamic configuration also it doesnt create. No need to go for Dynamic Configuration for your case.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Arunsri,
Better to use Dynamic Confi method becs its recommended by SAP also.
Please Follow the below steps.
(1)Create the UDF and pass Filename as an Input parameter as shown here.
___________________________________________________________________
public String Set_Output_File_Name(String var_Filename, String var_Directory, Container container) throws StreamTransformationException{
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(key, var_Filename);
return "TRUE";
________________________________________________________________-
(2)In File receiver adapter configuration, select the Adapter Specific message attributes and in that select the Filename Option.
Regards
jagesh
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
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.