on 02-16-2010 11:41 AM
Hi,
I am working on a bypass scenario where I pick a file from FTP location with naming conventions SCOS2UVMS_.TXT and place the file at other location with the name USED_Car.TXT.
Now I have to place this file with the Date and Time Stamp as DYYMMDD.THHMMSS.
How can I achieve this?
Thanks & Regards,
Sachi
Hi Sachi,
Do like this:
1. In receiver FileAdapter give filenameschema as
USED_Car.TXT
2. In the use OS Commands after message processing give like this
cmd /C "REN %F USED_Car.D%date:~12,2%%date:~4,2%%date:~7,2%.T%time:~0,2%%time:~3,2%%time:~6,2%.TXT"
PS: If required add quotes at the start and end of the OS commands
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Suraj
It worked...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sachi ,
For generating the filename the way you require...you will have to use IR. In the Graphical mapping u have to create a UDF and play with the filename using dynamic configuration. also click the filename checkbox in the adapter specific message attribiute on the sender and reciver adapter
e.g.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
int i;
StringBuffer str1 = new StringBuffer("");
for(i=ourSourceFileName.length()-6;i<ourSourceFileName.length();i++)
{str1.append(ourSourceFileName.charAt(i));
}
String ourTargetFileName = "XYZ" + str1;
conf.put(key, ourTargetFileName);
return ourTargetFileName;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can use add time stamp option in Receiver communication channel,if you want time stamp format t your desire format then you have to write UDF,but the problrm here is ,if no IR means its not possible to add UDF,for that you have to develop dummy mapping in IR.
SO ITS NOT A RIGHT IDEA,better to Time stamp option in Receiver CC,development of this interface very easy,you can refer above replies.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U can bypass the Integration repository steps and pass a file from 1 locatio to other.
U need to configure only the Integration Directory. In all the objects (sender agreement,Receiver determination,Interface determination,Receiver agreement) just give the interface name as dummy and name space also dummy.
Means u just give a arbitary interface name and namespace,which doesn't exist.
Then run the sender communication channel and check in target directory.
This will work fine....
But i think its nt a good idea to use SAP PI, for the just sake of transferring the files from 1 location to other.
U can schedule a batch file,and move the files b/w two locations.
I hope this will solve ur problem..
Babu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer This WIKI
This is File to file without using with Integration Repository .
The same way you can do.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.