Skip to Content
0

Execute OS command - SFTP

Sep 21, 2017 at 06:48 PM

132

avatar image

Dear All,

I have a scenario where sender is FILE adapter and receiver is SFTP adapter. In normal condition all connection are OK BUT there is a peculiar requirement related to SFTP.

Once connection to SFTP server is established, we need to execute few SFTP commands on SFTP server before we process files. Given a example below,

sftp> get /command/standard=NONE

sftp> get /command/parm=SA= 'test1';RA= 'Test2'

Once these commands are successful, files can be transferred using PUT command.

I have seen the option of specifying OS command at communication channel level BUT this are the commands we can execute on PI server and not on SFTP server.

Can anyone guide me on possible solution ?

Regards,

Sunil Joyous

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeniy Kolmakov Sep 21, 2017 at 07:57 PM
0

Hi Sunil!

One of the possible approaches would be to store file on PI file system and execute script, using OS Command, to open connection to SFTP server, execute required commands, put the file and close connection.

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded
Sunil Joyous Sep 22, 2017 at 07:27 AM
0

Thanks Evgeniy for providing suggestion.

Does this mean that there is no option in SAP PI to execute commands on SFTP server?

Thanks,

Sunil

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Sunil!

As you have already mentioned, OS commands are executed on PI server operation system, not on SFTP server.

Regards, Evgeniy.

0