on 07-02-2016 4:16 AM
Hi all,
I'm new with SAP PI,
When I define OS Command using placeholder %F which should be an absolute file name including path
like this
/home/ftpuser/data/output/xi_output20160702-020238-323.dat
but it is set to SFTP user home directory /home/ftpuser/
sometimes OS Command is executed before file is send to path is this normal because with FTP I always see OS Command executed after file transfer, this is important for me because msg must be transfer 1st after msg successfully transfer and file have been completely written my script will run and create, send an empty file to same place with file above
I have spent a couple days searching for this but I got no clue about this,
If anyone have faced this problem please let me know the cause and solution for this
Regard
This is my msg log
P/S this work fine on FTP adapter
sh /script.sh %F %f
SFTP adapter
02.07.2016 02:02:38.239 | Information | Trying to connect to host 10.0.1.225 |
02.07.2016 02:02:38.325 | Information | Filename is xi_output20160702-020238-323.dat |
02.07.2016 02:02:38.325 | Information | Server is 10.0.1.225 |
02.07.2016 02:02:38.326 | Information | Home directory is /home/ftpuser |
02.07.2016 02:02:38.326 | Information | Path is /home/ftpuser/data/output/ |
02.07.2016 02:02:38.328 | Information | Writing to file: xi_output20160702-020238-323.dat |
02.07.2016 02:02:38.331 | Information | send xi_output20160702-020238-323.dat to /home/ftpuser/data/output/ |
02.07.2016 02:02:38.332 | Information | Executing OS command: sh /script.sh /home/ftpuser xi_output20160702-020238-323.dat |
02.07.2016 02:02:38.539 | Information | Message was successfully processed by the JCA adapter |
02.07.2016 02:02:38.539 | Information | Message was successfully transmitted to endpoint <local> using connection SOAP_http://sap.com/xi/XI/System |
02.07.2016 02:02:38.543 | Information | Message status set to DLVD |
02.07.2016 01:14:17.871 | Information | Trying to connect to host 10.0.1.225 |
02.07.2016 01:14:17.973 | Information | Filename is xi_output20160702-011417-972.dat |
02.07.2016 01:14:17.973 | Information | Server is 10.0.1.225 |
02.07.2016 01:14:17.974 | Information | Home directory is /home/ftpuser |
02.07.2016 01:14:17.974 | Information | Path is /home/ftpuser/data/output/ |
02.07.2016 01:14:17.976 | Information | Writing to file: xi_output20160702-011417-972.dat |
02.07.2016 01:14:17.980 | Information | Executing OS command: sh /script.sh xi_output20160702-011417-972.dat /home/ftpuser |
02.07.2016 01:14:17.980 | Information | send xi_output20160702-011417-972.dat to /home/ftpuser/data/output/ |
02.07.2016 01:14:18.188 | Information | Message was successfully processed by the JCA adapter |
02.07.2016 01:14:18.189 | Information | Message was successfully transmitted to endpoint <local> using connection SOAP_http://sap.com/xi/XI/System |
02.07.2016 01:14:18.194 | Information | Message status set to DLVD |
FTP adapter
01.07.2016 08:55:20.984 | Information | Connecting to FTP server "10.0.1.225" |
01.07.2016 08:55:20.984 | Information | File Adapter Receiver Channel CH_FTP: Start processing; party " " / service "BC_FTP" |
01.07.2016 08:55:21.074 | Information | Write to FTP server "10.0.1.225", directory "/home/ftpuser/data/output", -> file "xi_output20160701-085521-070.dat" |
01.07.2016 08:55:21.074 | Information | Transfer: "BIN" mode, size 886 bytes, encoding - |
01.07.2016 08:55:21.078 | Information | Execute OS command "sh /script.sh xi_output20160701-085521-070.dat /home/ftpuser/data/output/xi_output20160701-085521-070.dat" |
01.07.2016 08:55:21.298 | Information | File processing finished |
01.07.2016 08:55:21.300 | Information | Message was successfully transmitted to endpoint <local> using connection SOAP_http://sap.com/xi/XI/System |
01.07.2016 08:55:21.302 | Information | Message status set to DLVD |
Hi Thach,
There are two options for processing your command. If you want to process the command before processing or after processing. Based on this command will be executed after writing the file or before writing the file.
You can refer to point number 5, in the SAP Help link mentioned by you -
Defining OS Commands for Message Processing by SFTP Adapter - SAP Process Integration, secure
About your error log, can you post the screenshot of your channel configuration? Additionally you can refer to below Wiki for more info -
SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki
Regards,
Nitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.