SFTP Issues with PutAttachment & GetAttachment PeopleCode

Hey everyone!

Happy new year!

It’s been a while since I had blogged – here’s an interesting issue that I worked on. I have an AE process that uses PutAttachment and GetAttachment functions to upload a file to an SFTP server. Running a trace returned the following error:

736 08.06.23 0.000000 ExecutePutAttachment (error): Error: URL Identifier not provided. Use URL Identifier to connect.
737 08.06.23 0.000000 EvalPutAttachment (error): return code (1) indicates attempt to upload file to storage failed.
738 08.06.23 0.000000 EvalPutAttachment: finishing and returning 1.

When I looked at the code, the PutAttachment and GetAttachment functions were referencing a URL string instead of a URL definition.

PutAttachment(&URL, &att_ref | &array [&j], &URL_ID2);

Here, &URL is the variable referencing the SFTP URL.

It appears that if you would like to place files on an SFTP server, you would have to use the URL definition as such, instead of using a URL string. Using a URL string would work fine when you use a FTP URL. So, changing the PeopleCode to be as below, fixed this issue:

PutAttachment(URL.ATTACHMENT_SFTP_URL, &att_ref | &array [&j], &URL_ID2);

This was in PeopleSoft HCM 9.1 with PeopleTools 8.53.06 , by the way.

Hope this helps! 🙂

 

Advertisements

About Manikandan Surendren

A PeopleSoft Techno-functional Consultant. An engineering graduate in Computer Science. Technology Enthusiast. Movie freak. Gadget geek.
This entry was posted in Code, Oracle, PeopleSoft and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s