Peoplesoft SFTP


Transferring a file using SFTP to specified target location:

(Thanks to Jawahar who helped me in this article)

A lot has been mentioned about sFTP support in PT 8.51. Below gives clear idea on SFTP.

Are there any specific pre-requirements for using file transfer protocols?

Yes. Though FTP can be used directly by giving the URL as a string to the peoplecode method, other protocols (ftps, sftp, http and https) require the URL to be passed as a URL identifier only. When an URL identifier is created, URL properties link on the page gets enabled. Users need to provide the URL properties specific to the protocol they are using on this "URL properties" page. The URL properties differ based on the protocol choosen. Once URL Identifier is ready, it can be used in any of the file attachment peoplecode methods just like the existing way.

 What are the authentication methods supported for sftp?

Password and Public Key authentication are supported.

For password authentication:

Create an URL Identifier and provide Authentication Type, User Id and Password as URL properties. Password needs to be encrypted before using it. Use the "Password Encryption" Utility provided on the URL properties page for that.




Steps Involved:

Navigation:  People Tools > Utilities > Administration > URLs

URL format: sftp://servername/destination_directory

Provide URL properties.


Test the connection using “PeopleTools Test Utilities” page as shown below:

The transfer is successful.

How do I pass an URL identifier to Peoplecode built-in methods? 

If a variable is passed to built-in method, it is treated as plain string and not as an URL identifier object. To make your call work with URL Identifiers and plain string URLs, you can follow the code as shown below:

AddAttachment:
If Exact(Left(&URL_ID, 4), "URL.") Then
&RETCODE = AddAttachment(@(&URL_ID), &ATTACHSYSFILENAME, &FILEEXTENSION, &ATTACHUSERFILE, &FILESIZE);
Else
&RETCODE = AddAttachment(&URL_ID, &ATTACHSYSFILENAME, &FILEEXTENSION, &ATTACHUSERFILE, &FILESIZE);
End-If;



What are peoplecode methods available for file transfer?

The below list of supported protocols is apart from record:// (to PeopleSoft Database) and file:// (to local file system). 

AddAttachment FTP, FTPS, SFTP, HTTP and HTTPS FTP and FTPS FTP Uploads a user selected file to destination. Think-time function 
PutAttachment FTP, FTPS, SFTP, HTTP and HTTPS FTP and FTPS FTP Uploads a a file available on appserver file system to destination. 
ViewAttachment FTP, FTPS, SFTP, HTTP and HTTPS FTP and FTPS FTP Downloads a user requested file available in destination system and opens it in browser. Think-time function 
GetAttachment FTP, FTPS, SFTP, HTTP and HTTPS FTP and FTPS FTP Downloads a user requested file available in destination system to application server file system. 
Detach Attachment FTP, FTPS, SFTP, HTTP and HTTPS FTP and FTPS FTP Downloads a user requested file available in destination system and prompts the user with Save Open dialog. Think-time function 
DeleteAttachment FTP, FTPS, SFTP, HTTP and HTTPS FTP and FTPS FTP Deletes the user requested file from destination system. 
CopyAttachments FTP, FTPS, SFTP, HTTP and HTTPS FTP and FTPS FTP Copies the files from source system to destination system. 




Comments

  1. Hi, hope someone can help me on this..

    I want to transfer a file from our linux server to the 3rd party Server, using SFTP. But I want this to be done using PIA configuration changes. I have heard that there is a way to do so in the latest peoplesoft release but not sure about how to achieve this. Please help.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to find the Java Version being used by WebLogic

Peoplesoft Error: All Processing Suspended: Restart OPRID=PS, RUNID=RUN01, PI=5000(108,503)