Peoplesoft People
This code to transfer the file from database to file server in App Engine
&LogFileName = "Logfilename | ".LOG"; &LogFile = GetFile(&LogFileName, "W", &CharSet, %FilePath_Relative); &DataFileName = Staterecordname.ATTACHUSERFILE; &DataFileNameNoPI = Staterecordname.ATTACHUSERFILE; &LogFile.WriteLine("Upload Process"); &LogFile.WriteLine(" "); &LogFile.WriteLine(%Date | " " | %Time); &LogFile.WriteLine(Rept("-", 40));/* Put - 40 times*/ /*AppendPItoFileName is a custom function to append Process instance**/ &DataFileName = AppendPItoFileName(&DataFileName, String(Staterecordname.PROCESS_INSTANCE)); Staterecordname.ATTACHUSERFILE = &DataFileName; /* Get the Input File Environment name and directory path */ rem &DirPathFile = "\\path\" | &DataFileName; &sEnvVar = GetEnv("PS_HOME"); &DirPathFile = &sEnvVar | "/path/" | &DataFileName; /* Copy file from database table to interface server */ &Rtncode = GetAttachment(URL.FILEDB, Staterecordname.ATTACHSYSFILENAME.Value, &DirPathFile); If &Rtncode <> 0 Then /* Error getting attachment */ &LogFile.WriteLine("GetAttachment error " | &DataFileNameNoPI); MessageBox(0, "", 99999, 999, "GetAttachment error " | &DataFileNameNoPI); Else /* Clean up database table */ &Rtncode = DeleteAttachment(URL.FILEDB, Staterecordname.ATTACHSYSFILENAME.Value); If &Rtncode <> 0 Then /* Error deleting attachment */ &LogFile.WriteLine("DeleteAttachment failed"); MessageBox(0, "", 99999, 999, "DeleteAttachment failed"); End-If; End-If;
21 Comments
|
ArchivesAuthorI have very strong experience on Peoplesoft Financial and HR modules and very strong on tools and Integration Broker.I also have experience on SOA and Oracle Integrator. Categories |