<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.3" -->
<rss version="2.0">
	<channel>
		<title>Attaching Supporting Documentation to Journals</title>
		<description>Comments for Attaching Supporting Documentation to Journals at http://www.erpassociates.com , comment 1 to 11 out of 11 comments</description>
		<link>http://www.erpassociates.com</link>
		<lastBuildDate>Fri, 30 Jul 2010 05:43:43 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.3</generator>
		<item>
			<title>Detaching via PL/SQL</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-1051</link>
			<description>Jim Marion has a post about how to detach a file using PL/SQL.  Check it out!  [url]http://jjmpsj.blogspot.com/2008/05/export-peoplesoft-attachments-using.html[/url] - Brent Martin</description>
			<pubDate>Thu, 29 May 2008 14:04:19 +0100</pubDate>
		</item>
		<item>
			<title>...</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-984</link>
			<description>Hollowman - I don't have a tutorial for the attachment server.  How I made it happen the first time was to find some delivered code that did the job and clone from that.  It was a Financials system and I used the Journal Upload component.  I'm sure you'll find at least one example in whatever app you're working on.

Atul - That's a really good question.  There's no way to do it &quot;out of the box&quot;.  One thought would be to modify the PCode so that after it saves it to the database, it detaches it into a directory with a real-time virus scanner running, then waits a few seconds and see if the file still exists.  If the virus scanner quarantines it, the file will disappear and you can assume you have a virus and handle it accordingly.  Okay I'm sure there are better ideas but that might be a start.

Good luck!  - Brent Martin</description>
			<pubDate>Sat, 08 Mar 2008 20:16:27 +0100</pubDate>
		</item>
		<item>
			<title>How do we do Anti virus scan for the Attachment</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-983</link>
			<description>is there a way anti virus scan be done for the attachment being stored in database ! - Atul</description>
			<pubDate>Sat, 08 Mar 2008 17:17:10 +0100</pubDate>
		</item>
		<item>
			<title>How to perform file attachment?</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-981</link>
			<description>Hi,

I want to develope a page for uploading files.

Can any one tell me any tutorial/book/article demonstrating the step by step procedure to do this?

An example would suffice.

I have read &quot;Understanding File Attachments and PeopleCode&quot; from PeopleCode Developerâ€™s Guide - Enterprise PeopleTools 8.49 PeopleBook, but still it is not clear how to proceed.

Thanks. - Hollowman</description>
			<pubDate>Tue, 04 Mar 2008 11:46:41 +0100</pubDate>
		</item>
		<item>
			<title>...</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-782</link>
			<description>Thanks again Brent. I think where I'm getting hung up is that I need to first add it to the database THEN I need to 'GetAttachment' and send it to a server.  Every example I find is from the app server to a file server.  
Here is what I have for code:

  &amp;RETCODE = AddAttachment(&amp;URL_ID, &amp;ATTACHSYSFILENAME, &amp;FILEEXTENSION, &amp;ATTACHUSERFILE, &amp;FILESIZE);
   
   &amp;GetAttach = GetAttachment(URL.AUC_TEMP, CHMC_CKRQ_ATTCH.ATTACHSYSFILENAME.Value, &amp;ATTACHSYSFILENAME, &quot;FILE&quot;);
   

The Addattachment is working but the getattachment is not.  I'm pretty new to PeopleCode and honestly I have no idea what I need to do.

Thanks again!

 - Susan Paden</description>
			<pubDate>Fri, 28 Dec 2007 18:22:37 +0100</pubDate>
		</item>
		<item>
			<title>...</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-781</link>
			<description>This code came out of the journal import app engine GL_JRNL_IMP.  One thing i like is that it opens a file that you can write debug messages to.  Hope it helps!

SQLExec&amp;#40;&quot;SELECT UNICODE_ENABLED FROM PSSTATUS&quot;, &amp;RtnCode&amp;#41;;
If &amp;RtnCode = 1 Then
   &amp;DBcharset = &quot;U&quot;; /* UNICODE */
Else
   &amp;DBcharset = &quot;ANSI&quot;; /* ANSI */
End-If;
&amp;CharSet = LOAD_JRNL_AET.CHARSET;
If None(&amp;CharSet) Then
   &amp;CharSet = &amp;DBcharset;
End-If;

&amp;LogFileName = &quot;GL_JRNL_IMP_&quot; | String(LOAD_JRNL_AET.PROCESS_INSTANCE) | &quot;.LOG&quot;;
&amp;LogFile = GetFile&amp;#40;&amp;LogFileName, &quot;W&quot;, &amp;DBcharset, &amp;#xFi;lePath_Relative&amp;#41;;
&amp;DataFileName = LOAD_JRNL_AET.ATTACHUSERFILE;

&amp;LogFile.WriteLine(MsgGetText(5825, 106, &quot;Flat File Journal Import&quot;));
&amp;LogFile.WriteLine(&quot; &quot;);
&amp;LogFile.WriteLine(&quot;         &quot; | Úte);
&amp;LogFile.WriteLine(Rept(&quot;-&quot;, 40));


try
   &amp;RtnCode = GetAttachment(URL.GL_FILE_IMPORT, LOAD_JRNL_AET.ATTACHSYSFILENAME.Value, &amp;DataFileName, &quot;PS_FILEDIR&quot;);
catch Exception &amp;Excp;
   &amp;RtnCode = 99;
   If &amp;Excp.MessageSetNumber = 2 And
         &amp;Excp.MessageNumber = 788 Then
      MessageBox(0, &quot;&quot;, 5825, 118, &quot;Check PS_FILEDIR variable&quot;);
   Else
      Error (&amp;Excp.ToString());
   End-If;
end-try;

If &amp;RtnCode = 0 Then
   &amp;ImportFile = GetFile&amp;#40;&amp;DataFileName, &quot;R&quot;, &amp;CharSet, &amp;#xFi;lePath_Relative&amp;#41;;
   If &amp;ImportFile.IsOpen Then
      &amp;ImportFile.SetFileLayout(FileLayout.GL_JRNL_IMPORT);
      &amp;LogFile.WriteLine(Left(String(&amp;#xTi;me), 8) | &quot; &quot; | MsgGetText(5825, 104, &quot;Processing file...&quot;, &amp;DataFileName));
      MessageBox(0, &quot;&quot;, 5825, 104, &quot;&quot;, &amp;DataFileName);
      
      &amp;File_RS = &amp;ImportFile.CreateRowset();
      ImportData(&amp;File_RS);
      &amp;ImportFile.Close();
   Else
      /* Cannot open file */
      &amp;LogFile.WriteLine(MsgGetText(5825, 126, &quot;GetFile error&quot;, &amp;DataFileName));
      &amp;ERRcount = &amp;ERRcount   1;
   End-If;
Else
   /* Error getting attachment */
   &amp;LogFile.WriteLine(MsgGetText(5825, 125, &quot;GetAttachment error&quot;, &amp;DataFileName, &amp;RtnCode));
   &amp;ERRcount = &amp;ERRcount   1;
End-If;


If &amp;ERRcount = 0 Then
   &amp;LogFile.WriteLine(Left(String(&amp;#xTi;me), 8) | &quot; &quot; | MsgGetText(5825, 116, &quot;Validating imported data&quot;));
Else
   /***** Rollback all transactions *****/
   &amp;LogFile.Close();
   MessageBox(0, &quot;&quot;, 5825, 102, &quot;Errors found - Rollback&quot;);
   Exit (1);
End-If;
 - Brent Martin</description>
			<pubDate>Fri, 28 Dec 2007 17:52:20 +0100</pubDate>
		</item>
		<item>
			<title>...</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-780</link>
			<description>Thanks Brent.  I'm trying to use the GetAttachment and I keep getting failures.  Do you have any code examples? - Susan Paden</description>
			<pubDate>Fri, 28 Dec 2007 16:23:11 +0100</pubDate>
		</item>
		<item>
			<title>RE: Systems Analyst</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-778</link>
			<description>I believe you can configure multiple file attachment servers to do both ways, but it seems like the user would have to upload it twice (which I'm guessing isn't what you want).

I'm not sure exactly what problem you're looking to solve, but sometimes users have files on their computers that they need to process with an SQR.  I use the attachment functionality to let them attach the file in a run control page.  Then I create an Application Engine process that invokes PeopleCode to detach the file to a directory on the server.  Then I just point my SQR process to pick the file up from that directory location on the server.  Create a job that runs the App Engine first, then the SQR and you're done.

If you're running Financials, you can use &quot;Flat File Journal Import Request&quot; as a model for how this can be done.

If you just need to store the file in the database, and in a directory on your application server, you could just add some FieldChange PCode to &quot;detach&quot; the file to a directory on your app server after the attachment has been loaded.

Check out the PeopleCode function &quot;GetAttachment&quot; to save a database attachment to a file.

Hope this helps... - Brent Martin</description>
			<pubDate>Fri, 28 Dec 2007 14:44:08 +0100</pubDate>
		</item>
		<item>
			<title>Systems Analyst</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-777</link>
			<description>This is great information.  Thank you for posting.  I actually need to do both storing the file in the database AND ftping it to a server.  Have you seen this done?  I think I'm making it way harder than it needs to be.  If you have any tips they would be appreciated.

THANKS MUCH! :) - Susan Paden</description>
			<pubDate>Fri, 28 Dec 2007 14:07:35 +0100</pubDate>
		</item>
		<item>
			<title>RE: Printing Attachment</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-750</link>
			<description>If you click the View button, it'll open the attachment in whatever tool you have on your workstation (excel, adobe acrobat, etc).  Once you have it on your workstation, you can print from there. - Brent Martin</description>
			<pubDate>Fri, 16 Nov 2007 19:51:03 +0100</pubDate>
		</item>
		<item>
			<title>printing attachment</title>
			<link>http://www.erpassociates.com/peoplesoft-corner-weblog/sarbanes-oxley/attaching-supporting-documentation-to-journals.html#comment-744</link>
			<description>Hi

I went through your post. Have you tried printing the attachments using SQR or crystal or any other reporting tool of PS. If yes, could you please let me know how you were able to do that.

Regards
Arshad - arshad</description>
			<pubDate>Wed, 07 Nov 2007 09:00:17 +0100</pubDate>
		</item>
	</channel>
</rss>
