on 11-07-2005 7:21 PM
In the receiver channel of the File Adapter where you specify the 'File Name Scheme', you do have the option of specifying a 'File Construction Mode' of 'Add Time Stamp'. How can you specify a different Date/Time stamp format ( eg MM/DD/YY vs YYYYMMDD vs MMDDYY, etc. ) without changing the Date/Time stamp for the entire SAP system? Also, can you control where the Date/Time stamp appears in the filename?
Do you mean there is a standard 'module' like timestamp feature in the file adapter?
Where can i find information about this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bernhard,
He doesn't refer to any 'module'. He is referring to accesing adapter specific Identifiers with in mapping. Ref:<a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14's wblog</a> for understanding the same.
Regards,
Jai Shankar
Hi,
There are many threads discussing the same issue. Go thro the following:
Bhavesh's reply in above thread:
You can use Adapter Specific Identifiers and then change the file name in the mapping. Append the tiem stamp in the format that you want and so on.
Just use this code in an UDF,
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = conf.get(key);
java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
dateformat.format( new java.util.Date() );
String newfilename=SourceFileName+dateformat;
// change to new file name
conf.put(key, newfilename);
return "";
Regards,
P.Venkat
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = conf.get(key);
java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
dateformat.format( new java.util.Date() );
String newfilename=SourceFileName+dateformat;
// change to new file name
conf.put(key, newfilename);
return "";
Where in the mapping does this UDF go?
My target message type is as follows
MT_XML_FILE
FILEHEADER Element xsd:string
COAL Element 1..1
PRICE
DATE
FILETRAILER
Hello Chris,
unfortunately, the timestamp format is hardcoded. What you might use is the the new SP14 Adapter-specific Message Properties feature where you can set the target file name (which can consequently utilize your own date formatting convention) e.g. from a Java mapping or a module.
Regards,
Thilo
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 | |
10 | |
9 | |
9 | |
7 | |
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.