on 10-31-2007 6:51 PM
Hi All,
I am doing a FTP to FTP scenario in which my requirement is as follows:
1. PI picks up file from FTP n clears the content of file. (Here file is not deleted only the file content are deleted)
2. When PI puts data to destination it appends the data to existing file.
Can anybody plz suggest how to handle this data clearing part of file and appending of data to file?
Thanks in advance.
Regards,
Rohan
hi rohan,
This can be achieved by using Java Mapping between the interfaces. Use one of the Parser method to play with the XML payload.
/people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs
/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
regards
Ramesh P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>> PI picks up file from FTP n clears the content of file. (Here file is not deleted only the file content are deleted)
It is not possible round the way can do as Aamir mentioned
>>When PI puts data to destination it appends the data to existing file.
Append option will help you
Regards
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
its not possible to just delete the data and not delete the file with XI,you need to delete the whole file.or may be use OS scripts on the sender file adapter
for the second option,give the <i>File construction mode</i> as append in the Receiver file communication channel.but this append will work only if you are using FCC on receiver side,if you are appending XML structures one after another,then the resulting XML wont be valid(more than one root node)
hence use the append mode with caution
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
you need to write a script (Perl,Unix etc)and save it on some XI server directory(for e.g /XIScenarios/scripts) then give this path under the <i>Run Operating system command after message processing</i> in the sender file adapter,once the file is picked the script will be executed and the file will be cleaned.
/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
also there are more blogs on SDN regarding scripts,please search them
Thanx
Aamir
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.