Archive for the ‘General Ledger’ Category.
14th June 2009, 08:11 pm
This is extension to this article. In R11i all sub-ledgers by default use gl_interface to transfer the journal entries to GL.
But in R12, when SLA transfers entries to GL, it uses multi-table insert concept in Journal Import. In Multi-table concept you can create your own table dynamically using gl_journal_import_pkg.create table and use this as a mirror for gl_interface table. Then you insert this table name into gl_interface_control against the interface_run_id and group_id. When you submit Journal Import it looks at this table for rows to import rather than gl_interface table. You can find more information on the multi-table insert for journal import in General Ledger User guide.
So the idea of updating the gl_interface table discussed in this article in journal import does not work, as this table is not used at all. We need to slightly modify the script to update the dynamic table in order to effectively use the gl_import_hook_pkg in order to achieve the objective.
Here is the requirement. We need to update the journal header name for journals coming from AP. The standard way of naming the journal headers is concatenation of reference4, user_je_category_name and currency_code. This should be changed to something else to append time stamp to it. So there are two options: get the rows into gl_interface and have a custom program to update the reference4 to our choice or use gl_import_hook_pkg.
All we need to do in the first option is to set the profile SLA: Disable Journal Import to Yes. This will not submit the journal import program when running create accounting program. All it does is to insert records into the gl_interface table. Then you can have a custom program to update what you need to and then run Journal Import program.
The second option is dynamic which uses gl_import_hook_pkg. Here you set the profile value for SLA: Disable Journal Import as No (this is standard). As this process does not use gl_interface table, we have to update the dynamic table used in this process. Here is the script for the same. Modified gl_import_hook_pkg is here.
6th April 2009, 06:46 pm
Have you ever needed something to be done after GL transfer from sources like Receivables, Payables or Inventory and before Journal Import is run? There are couple questions on the forums on this topic. Take a look at this one and also this requirement. While the first requirement is to do something before journal import is run and the second one is after before GL posting is done.
Usually we resort to solutions like creating a new program and sandwiching that program between GL transfer and Journal Import program. It works, but again, we need run the Gl interface program setting the value for the parameter Journal Import as ‘No’. This approach has inherent issues. What should we do if the custom program fails? Should we let the journal import run? If it runs, the objective is failed. On the other hand if you want to stop the journal import from picking the rows, you need to manage the status in the interface table (one way of doing it). This gets complicated as you need to manage all the rows that go in as pair of accounting entries. On top of it the issue gets complicated based on summary posting versus detail posting. So let the journal import manage the business of balancing of accounting entries and let us do our part of managing the rows in the gl_interface table the way we want it.
So this post is to address the first one where the requirement is to update one of the references in gl_interface with the comments from the Miscellaneous Cash Receipts coming from Receivables. This update will happen after your transfer to GL from Receivables and before Journal Import is run. I can understand why this is a common requirement. Usually people who use GL as well as auditors require reasons why the miscellaneous cash was posted. Updating these reference columns makes those comments visible in journal entries screen. Just to warn you, this works only if you transfer from source in Detail and not in Summary mode. See the images of miscellaneous cash receipt and journal entries screen.
This is just an example on one use of this package. It can be used for any of your needs either be pre or post journal import program. You can take the sample code here and modified gl_import_hook_pkg here. Just make sure to compile only package body given in the gl_import_hook_pkg.