PeopleSoft Attachment copy from Database to FTP location
/* This URL will be the FTP location where file needs to be placed on the server location */
&url = "URL.FTP_TEST_URL";
&sysfile = 'Name of The file which is to be moved from Database record to Server Location';
&MakeUpALogicalFileName = 'You can change the Name of the file to a custom name also , while getting it from Database Record';
&ret = GetAttachment("record://REC_ATTACH_DET", &sysfile, &MakeUpALogicalFileName);
/* The Above code gets the file from Database Record */
Use winmessage to check the &ret value. If the value is 0 , then file is accessible by the system and the system has got the file.
/* The below code will put the above selected file to the FTP location mentioned in the URL.*/
&ret1 = PutAttachment(@(&url), &MakeUpALogicalFileName, &MakeUpALogicalFileName);
Use winmessage to check the &ret1 value. If the value is 0 , then file is placed at FTP.
&url = "URL.FTP_TEST_URL";
&sysfile = 'Name of The file which is to be moved from Database record to Server Location';
&MakeUpALogicalFileName = 'You can change the Name of the file to a custom name also , while getting it from Database Record';
&ret = GetAttachment("record://REC_ATTACH_DET", &sysfile, &MakeUpALogicalFileName);
/* The Above code gets the file from Database Record */
Use winmessage to check the &ret value. If the value is 0 , then file is accessible by the system and the system has got the file.
/* The below code will put the above selected file to the FTP location mentioned in the URL.*/
&ret1 = PutAttachment(@(&url), &MakeUpALogicalFileName, &MakeUpALogicalFileName);
Use winmessage to check the &ret1 value. If the value is 0 , then file is placed at FTP.
No comments:
Post a Comment