on 06-02-2009 3:02 PM
Hi Everyone,
I want the Target File name to be as Update_Order_%y%y%y%y%M%M%d%d%H%H%m%m%s%s.A04.
How do i proceed to create such files.
Any help would be appreciated.
Thanks & Regards,
Varun
HI Everyone,
Thanks for your replies. Though I define a UDF, to which field do I need to Map. I dont have such field to map to get the filename.
Thanks & Regards,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Shabarish,
Thanks for your reply.
Actually I need to generate the target file as
Update_Order_%y%y%y%y%M%M%d%d%H%H%m%m%s%s.A04 (For Update Files)
Delete_Order_%y%y%y%y%M%M%d%d%H%H%m%m%s%s.A05
based on the Message Category. So as you said i can map the UDF to the highest node of the target XML.
Thanks & Regards,
Varun
the best would be to use the dynamic configuration - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi Everyone,
>
> I want the Target File name to be as Update_Order_%y%y%y%y%M%M%d%d%H%H%m%m%s%s.A04.
> How do i proceed to create such files.
> Any help would be appreciated.
>
> Thanks & Regards,
> Varun
Hi,
1. In the Sender File Communication Channel, check the option Set Adapter-Specific Message Attribute and Filename.
2. Assuming Update_Order is a constant string, Use this UDF. If Update_Order is a element at your source structure, pass it as a parameter to the UDF.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMddHHmmss" );
dateformat.format( new java.util.Date() );
String tagetfilename="Update_Order_" + dateformat;
conf.put(key, newfilename);
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
You can make use of "adapter specific message attributes" property of file adapter to give name to file.
in your message mapping,write a UDF to store the name in FILENAME parameter of ASMA and then refer to that in your receiver file adapter.
UDF code is given here
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Thanks
Aamir
Edited by: Aamir Suhail on Jun 2, 2009 9:05 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.