cancel
Showing results for 
Search instead for 
Did you mean: 

Execute OS command - SFTP

former_member75463
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

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.

Answers (1)

Answers (1)

former_member75463
Participant
0 Kudos

Thanks Evgeniy for providing suggestion.

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

Thanks,

Sunil

former_member190293
Active Contributor
0 Kudos

Hi Sunil!

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

Regards, Evgeniy.