on 05-12-2011 3:44 PM
Hi, I have a file to file scenario i receive two types file (ABC* and ZXC*) and i don't do any mapping just copy the files. And i also want to create a new empty file.
For example
'ABC123.TXT' I reciced. I copied 'ABC123.TXT' and I want to create an empty file 'ABC123.TMP' at the same directory.
'ZXC321.TXT' -> 'ZXC321.TXT' and 'ZXC321.TMP'
How can I do that ?
Create a script as below and call it as OS command in the adapter
#!/bin/sh
cat > yourfilename
Refer this link for writing the script
http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One way is using Variable substitution in the receiver file adapter, you can specify the output filename as you want. Then the same filename with diff type extension pass it to shell script as an argument.
Variable Substitution details search in the forum. One sample is this [link|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13864] [original link is broken] [original link is broken] [original link is broken];
You can use a OS Command after processing, in receiver file CC to create the empty file.
Something like this:
cat > $1.tmp
^d
Where $1 is a parameter with file name that you need to create (eg. sh SHELL.sh ZFileName ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
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.