Skip to Content

Execute OS command - SFTP

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 21, 2017 at 07:57 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 22, 2017 at 07:27 AM

    Thanks Evgeniy for providing suggestion.

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

    Thanks,

    Sunil

    Add comment
    10|10000 characters needed characters exceeded