on 04-08-2008 3:13 PM
Hi,
I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
All turned out okay. I have got the file name I require. Except that the file format is XML and I need to suppress the filename node occupied by the dynamic file name.
The content conversion mentioned in /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12, does not seem to solve my problem. As it is only for file format other than the XML one, because we only do the content conversion if we want to "convert" the format of the content from XML to the other format.
Does anybody have the solution to my problem? thanks in advance
Thank you Raj for the direction
The way to do it is :
1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
2. Put a "*" on the file name scheme
3. In IR, create a UDF to set up target file name :
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// set up file name for receiver adapter
String SourceFileName = conf.get(key);
conf.put(key, TargetFileName);
return " ";
4. Map the above UDF to the header level of the target structure.
Regards,
Idi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in
YOu don't need to do all that extra steps(mapping etc ) just to get the filename on receiver side.
you have 2 options:-
Variable substitution:Filename value is passed either in message header or body and used on the receiver file adapter ,you will see the value of filename in the payload.
Dynamic configuration:Filename value is passed as adapter specific message attribute,filename won't show up in the payload.
You can use dynamic configuration in your case.
Please search SDN for blogs regarding dynamic configurations.
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the target structure, make the filename node as last node of the structure and In receiver comm channel,pass the below parameter in Content conversion.
<recdset>.fixedLengthTooShorthandling - Cut
Regards,
Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srini,
I want the output file to be in XML format. So I don't want to do content conversion.
Anyway, I've tried putting :
<xxx>.addHeaderLine - 0
<xxx>.fieldFixedLengths - 0
<xxx>.fixedLengthTooShortHandling - Cut
And the error message came up for content conversion.
Please note that I want the output file to be in XML format, not some other format, and I want to suppress the filename field.
Thank you.
I want to produce an xml file based on SAP data.
the structure :
<header>
<detail> </detail>
</header>
i put up,
<file>
<filename></filename>
</file>
for variable substitution to have dynamic file name in receiver adapter. this far all are okay. I'm able to have the file name required.
the problem is when i want to suppress the file node, because it is an xml file I will not be able to use content conversion.
Hi,
you will not be able to suppress the filename node without using content conversion and you will not use content conversion as you want output in XML format.
so the solution to your problem is do not create the filename node in target msg structure...............then create a UDF in which you will take DynamicConfiguration and you will set the FileName parameter to the desired filename you want and take the output of the UDF to the header node of the target msg which does not has a value for it.............then in ID in receiver file comm channel check the option of adapter-specific message attributes and in it check the filename option............then XI will take the output filename as you have dynamically created in UDF.
Regards,
Rajeev Gupta
User | Count |
---|---|
95 | |
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.