on 08-22-2006 3:47 PM
Hi,
can any one tell me how to create outbound file name with receiver file adapter in format like Name_22-08-2006.dat. I need from a current Date in the name of the message (without any other information). In message payload I dont have that date. Is it possible to use variable from user defined function in message mapping for that name?
Regards,
Naycho
Have you tried the "Add time stamp" option in receiver file adapter?
Regards,
Jai Shankar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naycho,
Do add the field in your target structure as a separate node and then populate the date in the required format in between your mapping.
Now in your receiver file adapter make that node value used in the variable substitution and then in the file content conversion you can use the 'Cut' option so that it wont get in the data of the file which you are writing.
Cheers
JK
Naycho,
that's exactly what I've managed to perform using DynamicConfiguration. Check these links:
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm
Particularly, I've created a Java API for using setDirectory and setFileName methods through mappings. I use XSLT with java enhancement because it's a million times easier to parse and get node values with XSL than pure java.
I'm writing a blog on the subject, if you don't resolve the problem until it's out, let me know.
Regards,
Henrique.
I am looking for a method of appending date and time to an inbound text file. I have tried the File constructiono mode = add time stamp but the results did not give the needed .txt extension. What would be the sytax of FILE NAME SCHEMA to give filenameyyymmddhhmmdd.txt
Regards,
Connie
Message was edited by: connie wiggins
1. why dont you close the thread when its solved?
2. what are the message properties for the mail adapter?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Naycho, can you please post how you resolved this problem? I have encountered the same questions.
Henrique, did you ever finish your blog on this problem
and can you please provide a link?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I solved the problem with use of the following function in my message mapping.
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
conf.put(key, a);
return a;
As a source parameter for the function you can put the needed output file name.
In receiver File communication channel I've selected Use Adapter Specific Message Properties and File Name.
In field File Name Scheme I've defined 'FileName' (like in my function).
As a result I'm receiving in outbound directory files with the name defined in my Mapping.
Cheers
Naycho
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.