Hello,
Is it possible to use viewattachment to serve a file sitting on the application server to the user w/o performing any additional steps like ftping a file to some other server and the calling view attachment. Or moving the file to a database table and then doing a view attachment.
I am currently moving the file to a record on the database and then calling a view attachment and eventually the delete attachment function.
A lot of overhead if you ask me. Why even move the file into the database from the app server and perfrom dml operations on the database.
Even ftping to some other server is an overkill in my opinion when all that is required is to push the file to a webserver and then to the user from there on.
Or most likely, I am not very clear on this. Any ideas ?
Thanks for your inputs.
| Title | Under | Posted on |
|---|---|---|
| Regarding Error "SQR 6002) CANNOT OPEN THE PRINTER FILE: " in SQR | PeopleSoft Technical | 11/21/2008 - 1:17am |
| Pay calendar Setup | PeopleSoft Functional | 11/18/2008 - 5:30pm |
| Issue linking to Excel 2007 from PS HRMS 8.8 | PeopleSoft Technical | 11/17/2008 - 9:48am |
| Spreadsheet-Based Control System Analysis and Design | Programming | 11/11/2008 - 5:10am |
Re: ViewAttachment
Join date: 06/23/08
>> I am currently moving the file to a record on the database and then calling a view attachment
Why do you have to move the file to a record on the database?!
View Attachment should work without doing that.
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog
Re: ViewAttachment
Join date: 06/23/08
HH here is an example on how you can use viewattachment:
The URL.LoginInfo below is a PS URL that you create in PeopleSoft. The URL would be something like the following:
ftp://username:password@server-file-is-on (like servername.domain.com)
&file_location = "../../../.." | FILE_LOCATION;
&file_name = FILE_NAME;
/*MessageBox(0, "", 0, 0, &file_location | &file_name);*/
&retcode = ViewAttachment(URL.LoginInfo, &file_location | &file_name, &file_name);
If (&retcode = %Attachment_Failed) Then
MessageBox(0, "File Attachment Status", 0, 0, "ViewAttachment failed");
End-If;
If (&retcode = %Attachment_Cancelled) Then
MessageBox(0, "File Attachment Status", 0, 0, "ViewAttachment cancelled");
End-If;
If (&retcode = %Attachment_FileTransferFailed) Then
MessageBox(0, "File Attachment Status", 0, 0, "ViewAttachment failed: File Transfer did not succeed");
End-If;
/* following error message only in PeopleSoft Internet Architecture */
If (&retcode = %Attachment_NoDiskSpaceAppServ) Then
MessageBox(0, "File Attachment Status", 0, 0, "ViewAttachment failed: No disk space on the app server");
End-If;
/* following error message only in PeopleSoft Internet Architecture */
If (&retcode = %Attachment_NoDiskSpaceWebServ) Then
MessageBox(0, "File Attachment Status", 0, 0, "ViewAttachment failed: No disk space on the web server");
End-If;
If (&retcode = %Attachment_FileExceedsMaxSize) Then
MessageBox(0, "File Attachment Status", 0, 0, "ViewAttachment failed: File exceeds the max size");
End-If;
If (&retcode = %Attachment_DestSystNotFound) Then
MessageBox(0, "File Attachment Status", 0, 0, "ViewAttachment failed: Cannot locate destination system for ftp");
End-If;
If (&retcode = %Attachment_DestSysFailedLogin) Then
MessageBox(0, "File Attachment Status", 0, 0, "ViewAttachment failed: Unable to login into destination system for ftp");
End-If;
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog
Re: ViewAttachment
Join date: 07/09/08
Thanks!
Since the file is on a folder accesible to the app server where the peoplecode is run, I would like to avoid doing a ftp.
Can I not provide a path to the file ?
Re: ViewAttachment
Join date: 06/23/08
Have you looked at using ViewContentURL function?
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog
Post new comment