r12 cash management payments and receipts

13
  Lee Taylor www.LTSolu tions.eu Copyright © 2008 LT Solution s Limited 19/08/2008 Page 1 of 13 Cash Management Payments and Receipts This document is intended as a guide to using the Cash Management Open Interface for reconciling Receipts and Payments generated in external systems. This interface can also be used over a cutover  period to migrate Closed Receipts and Payments that are n ot going to be migrated into their individual sub ledgers, but are required in Cash Management to Reconcile to Bank Statements. The guide also includes necessary set up steps for creating and maintaining Internal Bank Accounts  The document is not intended as a one stop guide to implementing this solution as it i ncludes set up relating to specific client requirements. It can however, be used as a guide to point CE Consultants in the right direction regarding setup and code needed in order to implement the solution. To this end, there are also a number of sample scr ipts provided in the CE document set. Bank Account Setup and Maintenance Internal Bank Accounts have now been moved to Cash Management in the CE_BANK_ACCOUNTS table. You can view bank accounts through Cash Management Responsibilities through navigating to Setup=>Banks=>Bank Accounts. This however, does not give you access to maintain them! This section should describe how to get access to do this. Grants Grants allow access to certain functions across the E -business Suite. A grant needs to be created for each function for each Legal Entity in your business. They are accessed through the SYSADMIN user in the User Management Responsibility. To set up grants for Cash Management implement the following actions: 1.  Navigate to User Management=>Roles and R ole Inheritance 2. Create a new Role 3. Create a new Grant

Upload: ramasamysattur

Post on 04-Nov-2015

137 views

Category:

Documents


2 download

DESCRIPTION

R12 Cash Management Payments and Receipts

TRANSCRIPT

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 1 of 13

    Cash Management Payments and Receipts This document is intended as a guide to using the Cash Management Open Interface for reconciling

    Receipts and Payments generated in external systems. This interface can also be used over a cutover

    period to migrate Closed Receipts and Payments that are not going to be migrated into their individual

    sub ledgers, but are required in Cash Management to Reconcile to Bank Statements. The guide also

    includes necessary set up steps for creating and maintaining Internal Bank Accounts

    The document is not intended as a one stop guide to implementing this solution as it includes set up

    relating to specific client requirements. It can however, be used as a guide to point CE Consultants in

    the right direction regarding setup and code needed in order to implement the solution. To this end,

    there are also a number of sample scripts provided in the CE document set.

    Bank Account Setup and Maintenance Internal Bank Accounts have now been moved to Cash Management in the CE_BANK_ACCOUNTS

    table. You can view bank accounts through Cash Management Responsibilities through navigating to

    Setup=>Banks=>Bank Accounts. This however, does not give you access to maintain them! This

    section should describe how to get access to do this.

    Grants

    Grants allow access to certain functions across the E-business Suite. A grant needs to be created for

    each function for each Legal Entity in your business. They are accessed through the SYSADMIN user

    in the User Management Responsibility. To set up grants for Cash Management implement the

    following actions:

    1. Navigate to User Management=>Roles and Role Inheritance

    2. Create a new Role

    3. Create a new Grant

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 2 of 13

    4. Search on the Objects available using the Magnifying Glass. Search on Bank%. The available

    Objects are

    Bank Account Access

    Bank Account Maintenance

    Bank Account Transfer

    Bank Account Use

    5. Only one Object can be assigned to a grant. Select the first object and Save the changes.

    6. Repeat the action for all required Cash Management Objects.

    7. We now created a Role and granted access to the Cash Management Objects required to

    maintain the Bank Accounts. We now need to assign the role to each individual user we want

    to give access to. This is done by navigating to the user using User Management=>Users

    8. Search on the Oracle Username you want to grant access to. Once the user is displayed, click

    on the Update Icon and simply add the new Role to the User.

    Cash Management Open Interface

    This still works as in previous releases of Oracle through the CE_999_INTERFACE_V view and

    CE_999_PKG database package. Sample scripts the ce_999_interface_v and ce_999_pkg are included

    as part of this document set (see the end of this document).

    The setup for this interface has changed in Release 12. Setup for the Open Interface is no longer access

    through Cash Management System Options as the R12 Cash Management User Notes suggest. They

    are now controlled and accessed at Internal Bank Account Level. This allows us to now control, which

    Bank Accounts have, access to the Interface.

    To allow access to the Open Interface for a particular Bank Account, implement the following steps:

    1. Go to Cash Management responsibility and Navigate to Setup => Banks => Bank Accounts.

    2. For each Bank Account needing to be reconciled against AP Payments and AR Receipts,

    Select the Account and Hit the Update Button.

    3. Navigate through to step 3 using the Save and Next button.

    4. In Step 3, Under the Reconciliation controls => Open Interface Controls change the following

    Settings.

    Use Reconciliation Open Interfaces Yes

    Float Status FLOAT

    Clear Status CLEAR

    Note: The Float status and Clear Status are user defined. They must however match the value

    in the STATUS column in the CE_999_INTERFACE_V view. Un-reconciled Receipts

    and Payments should be assigned the Float Status, Reconciled Receipts and Payments

    should be assigned the Clear Status.

    5. Hit the Save and Next Button.

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 3 of 13

    6. Repeat for each Bank Account requiring access to the Open Interface.

    7. Providing that the CE_999_INTERFACE_V displays valid records for the Bank Accounts

    enabled, we should be able to see the Receipts and Payments through Cash Management.

    Navigate to View => Available Transactions in forms. Click on the Open Interface Radio

    Button and enter one of the Bank Accounts covered by the Open Interface. The Transactions

    for that Bank should be visible through the form.

    Notes for the Developer

    The CE_999_INTERFACE_V is used to access external Payments and Receipts through Cash

    Management. The Available Transactions collates data from a number of sources. It uses the

    CE_999_TRANSACTIONS_V view to construct what is seen through the form. If the developer

    wants to view the transactions in a SQL Editor such as Toad or SQL Navigator, he will first need

    to run the following procedure: CEP_STANDARD.init_security. There are no parameters to pass

    to this procedure.

    CE_999_INTERFACE_V View Sample Code

    This code is based on data being populated into a custom table. The view is constructed by linking

    the custom table and the cash management banks table. I used this table to reconcile Receipts and

    Payments from an Oracle R11i system.

    CREATE TABLE APPS.XXLTS_CE11I_RECON_ALL ( TRX_ID NUMBER, BANK_ACCOUNT_NUM VARCHAR2(30 BYTE), TRX_TYPE VARCHAR2(7 BYTE), TRX_TYPE_DSP VARCHAR2(18 BYTE), TRX_NUMBER VARCHAR2(40 BYTE), TRX_DATE DATE, CURRENCY_CODE VARCHAR2(15 BYTE), STATUS CHAR(5 BYTE), STATUS_DSP CHAR(5 BYTE), EXCHANGE_RATE_TYPE VARCHAR2(30 BYTE), EXCHANGE_RATE_DATE DATE, EXCHANGE_RATE NUMBER, AMOUNT NUMBER, CLEARED_AMOUNT NUMBER, CLEARED_CHARGES_AMOUNT NUMBER, CLEARED_ERROR_AMOUNT NUMBER, ACCTD_AMOUNT NUMBER, ACCTD_CLEARED_AMOUNT NUMBER, ACCTD_CLEARED_CHARGES_AMOUNT NUMBER, ACCTD_CLEARED_ERROR_AMOUNT NUMBER, GL_DATE DATE, CLEARED_DATE DATE, CREATION_DATE DATE,

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 4 of 13

    CREATED_BY NUMBER, LAST_UPDATE_DATE DATE, LAST_UPDATED_BY NUMBER, ORG_ID NUMBER ) CREATE OR REPLACE FORCE VIEW apps.ce_999_interface_v (row_id, trx_id, bank_account_id, trx_type, trx_type_dsp, trx_number, trx_date, currency_code, status, status_dsp, exchange_rate_type, exchange_rate_date, exchange_rate, amount, cleared_amount, charges_amount, error_amount, acctd_amount, acctd_cleared_amount, acctd_charges_amount, acctd_error_amount, gl_date, cleared_date, creation_date, created_by, last_update_date, last_updated_by ) AS SELECT recon.rowid , recon.trx_id , cba.bank_account_id , recon.trx_type , recon.trx_type_dsp , TO_CHAR(recon.trx_number) , recon.trx_date , recon.currency_code , recon.status , recon.status_dsp , recon.exchange_rate_type , recon.exchange_rate_date , recon.exchange_rate , recon.amount , recon.cleared_amount , recon.cleared_charges_amount , recon.cleared_error_amount , recon.acctd_amount , recon.acctd_cleared_amount , recon.acctd_cleared_charges_amount , recon.acctd_cleared_error_amount , recon.gl_date , recon.cleared_date , recon.creation_date , fsu.user_id created_by , recon.last_update_date , fsu.user_id last_updated_by FROM xxlts_ce11i_recon_all recon , ce_bank_accounts cba , fnd_user fsu WHERE 1=1 AND fsu.user_name = 'DATA_MIGRATION' AND recon.bank_account_num = cba.bank_account_num;

    CE_999_PKG Sample Code

    This code performs a number of actions. In summary:

    Provides a procedure for locking the rows in our custom table

    Provides a procedure for updating the status on reconciled rows in our custom table. This

    also generates Journals into GL Interface off the back of each Receipt/Payment

    Reconciled.

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 5 of 13

    Provides a procedure for updating the status on reversed rows in our custom table

    (Receipts/Payments that were reconciled being set to Un-reconciled). This also generates

    Journals into GL Interface off the back of each Receipt/Payment being set back to Un-

    reconciled.

    Note: Set of Books ID is now called Ledger ID in R12. Whilst the Profile Option Name

    remains the same (GL_SET_OF_BKS_ID), the User Profile Option Name is now GL Ledger

    ID.

    /* --------------------------------------------------------------------- | PUBLIC FUNCTION | | lock_row | | | | DESCRIPTION | | This procedure would be called when open-interface transactions | | need to be locked | | | | | | HISTORY | --------------------------------------------------------------------- */ PROCEDURE lock_row( X_call_mode VARCHAR2, X_trx_type VARCHAR2, X_trx_rowid VARCHAR2 ) IS trx_id ROWID; CURSOR lock_open IS select rowid from xxlts_ce11i_recon_all where rowid = X_trx_rowid for update of trx_id nowait; /* Note: ce_999_interface_v is the base table of ce_999_interface_v in this example. */ BEGIN OPEN lock_open; FETCH lock_open INTO trx_id; IF (lock_open%NOTFOUND) THEN CLOSE lock_open; RAISE NO_DATA_FOUND; END IF; CLOSE lock_open; EXCEPTION WHEN NO_DATA_FOUND THEN IF lock_open%ISOPEN THEN CLOSE lock_open; END IF; RAISE NO_DATA_FOUND; WHEN APP_EXCEPTION.RECORD_LOCK_EXCEPTION THEN IF lock_open%ISOPEN THEN CLOSE lock_open; END IF; RAISE APP_EXCEPTION.RECORD_LOCK_EXCEPTION; END lock_row; /* --------------------------------------------------------------------- | PUBLIC PROCEDURE | | clear | | | | DESCRIPTION | | This procedure would be called during clearing phase | | | | | | HISTORY | --------------------------------------------------------------------- */ PROCEDURE clear( X_trx_id NUMBER, -- transaction id X_trx_type VARCHAR2, -- transaction type ('PAYMENT'/'CASH') X_status VARCHAR2, -- status X_trx_number VARCHAR2, -- transaction number X_trx_date DATE, -- transaction date X_trx_currency VARCHAR2, -- transaction currency code

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 6 of 13

    X_gl_date DATE, -- gl date X_bank_currency VARCHAR2, -- bank currency code X_cleared_amount NUMBER, -- amount to be cleared X_cleared_date DATE, -- cleared date X_charges_amount NUMBER, -- charges amount X_errors_amount NUMBER, -- errors amount X_exchange_date DATE, -- exchange rate date X_exchange_type VARCHAR2, -- exchange rate type X_exchange_rate NUMBER -- exchange rate )IS lv_period_name gl_period_statuses.period_name%TYPE; ln_ledger_id gl_interface.ledger_id%TYPE := fnd_profile.value('GL_SET_OF_BKS_ID'); BEGIN /* Note: ce_999_interface_v is the base table of ce_999_interface_v in this example */ /* Note: You are required to pass the status column to your proprietary database. The Reconciliation Open Interface feature requires a non-null status column to function correctly. */ /* Note: If you have not defined the value for the open interface clear status in the System Parameter Form, i.e. OPEN_INTERFACE_CLEAR_STATUS column in the CE_SYSTEM_PARAMETERS_ALL table, you are required to do so. */ UPDATE xxlts_ce11i_recon_all SET status = X_status, gl_date = X_gl_date, cleared_amount = X_cleared_amount, cleared_date = X_cleared_date, cleared_charges_amount = X_charges_amount, cleared_error_amount = X_errors_amount, exchange_rate_date = X_exchange_date, exchange_rate_type = X_exchange_type, exchange_rate = X_exchange_rate WHERE trx_id = X_trx_id; -- -- -------------------------------------------------------------------- -- This section created all the accounting entries for clearing -- -------------------------------------------------------------------- BEGIN -- -------------------------------------------------------------------- -- Calculate the Current Period -- -------------------------------------------------------------------- SELECT period_name INTO lv_period_name FROM gl_period_statuses WHERE 1=1 AND start_date SYSDATE AND application_id = ( SELECT application_id FROM fnd_application WHERE application_short_name = 'SQLGL' ) AND set_of_books_id = ln_ledger_id; EXCEPTION WHEN OTHERS THEN lv_period_name := NULL; END; IF X_trx_type = 'PAYMENT' THEN -- BEGIN -- -------------------------------------------------------------------- -- Insert the Credit to Cash -- -------------------------------------------------------------------- INSERT INTO gl_interface (ledger_id ,status ,accounting_date ,currency_code ,date_created ,created_by ,period_name ,actual_flag ,user_je_source_name

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 7 of 13

    ,user_je_category_name ,entered_dr ,entered_cr ,segment1 ,segment2 ,segment3 ,segment4 ,segment5 ,reference1 ,reference10 ) SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id , 'NEW' status , TRUNC(SYSDATE) accounting_date , cpa.currency_code currency_code , SYSDATE date_created , fnd_global.user_id created_by , lv_period_name period_name , 'A' actual_flag , 'Data Migration' user_je_source_name , 'Cash Management' user_je_category_name , 0 entered_dr , cpa.cleared_amount entered_cr , gcc.segment1 segment1 , gcc.segment2 segment2 , gcc.segment3 segment3 , gcc.segment4 segment4 , gcc.segment5 segment5 , cpa.trx_type_dsp|| ' Recon @ '||TRUNC(SYSDATE) reference1 , cpa.trx_type_dsp reference10 FROM xxlts_ce11i_recon_all cpa , ce_bank_accounts cba , gl_code_combinations gcc WHERE cpa.bank_account_num = cba.bank_account_num AND gcc.code_combination_id = cba.asset_code_combination_id AND cpa.trx_id = x_trx_id; -- -------------------------------------------------------------------- -- Insert the Debit to Cash Clearing -- -------------------------------------------------------------------- INSERT INTO gl_interface (ledger_id ,status ,accounting_date ,currency_code ,date_created ,created_by ,period_name ,actual_flag ,user_je_source_name ,user_je_category_name ,entered_dr ,entered_cr ,segment1 ,segment2 ,segment3 ,segment4 ,segment5 ,reference1 ,reference10 ) SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id , 'NEW' status , TRUNC(SYSDATE) accounting_date , cpa.currency_code currency_code , SYSDATE date_created , fnd_global.user_id created_by , lv_period_name period_name , 'A' actual_flag , 'Data Migration' user_je_source_name , 'Cash Management' user_je_category_name , cpa.cleared_amount entered_dr , 0 entered_cr , gcc.segment1 segment1 , gcc.segment2 segment2 , gcc.segment3 segment3 , gcc.segment4 segment4 , gcc.segment5 segment5 , cpa.trx_type_dsp||

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 8 of 13

    ' Recon @ '||TRUNC(SYSDATE) reference1 , cpa.trx_type_dsp reference10 FROM xxlts_ce11i_recon_all cpa , ce_bank_accounts cba , gl_code_combinations gcc WHERE cpa.bank_account_num = cba.bank_account_num AND gcc.code_combination_id = cba.cash_clearing_ccid AND cpa.trx_id = x_trx_id; END; ELSIF X_trx_type = 'CASH' THEN BEGIN -- -------------------------------------------------------------------- -- Insert the Debit to Cash -- -------------------------------------------------------------------- INSERT INTO gl_interface (ledger_id ,status ,accounting_date ,currency_code ,date_created ,created_by ,period_name ,actual_flag ,user_je_source_name ,user_je_category_name ,entered_dr ,entered_cr ,segment1 ,segment2 ,segment3 ,segment4 ,segment5 ,reference1 ,reference10 ) SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id , 'NEW' status , TRUNC(SYSDATE) accounting_date , cpa.currency_code currency_code , SYSDATE date_created , fnd_global.user_id created_by , lv_period_name period_name , 'A' actual_flag , 'Data Migration' user_je_source_name , 'Cash Management' user_je_category_name , cpa.cleared_amount entered_dr , 0 entered_cr , gcc.segment1 segment1 , gcc.segment2 segment2 , gcc.segment3 segment3 , gcc.segment4 segment4 , gcc.segment5 segment5 , cpa.trx_type_dsp|| ' Recon @ '||TRUNC(SYSDATE) reference1 , cpa.trx_type_dsp reference10 FROM xxlts_ce11i_recon_all cpa , ce_bank_accounts cba , gl_code_combinations gcc WHERE cpa.bank_account_num = cba.bank_account_num AND gcc.code_combination_id = cba.asset_code_combination_id AND cpa.trx_id = x_trx_id; -- -------------------------------------------------------------------- -- Insert the Credit to Cash Clearing -- -------------------------------------------------------------------- INSERT INTO gl_interface (ledger_id ,status ,accounting_date ,currency_code ,date_created ,created_by ,period_name ,actual_flag ,user_je_source_name ,user_je_category_name ,entered_dr ,entered_cr ,segment1

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 9 of 13

    ,segment2 ,segment3 ,segment4 ,segment5 ,reference1 ,reference10 ) SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id , 'NEW' status , TRUNC(SYSDATE) accounting_date , cpa.currency_code currency_code , SYSDATE date_created , fnd_global.user_id created_by , lv_period_name period_name , 'A' actual_flag , 'Data Migration' user_je_source_name , 'Cash Management' user_je_category_name , 0 entered_dr , cpa.cleared_amount entered_cr , gcc.segment1 segment1 , gcc.segment2 segment2 , gcc.segment3 segment3 , gcc.segment4 segment4 , gcc.segment5 segment5 , cpa.trx_type_dsp|| ' Recon @ '||TRUNC(SYSDATE) reference1 , cpa.trx_type_dsp reference10 FROM xxlts_ce11i_recon_all cpa , ce_bank_accounts cba , gl_code_combinations gcc WHERE cpa.bank_account_num = cba.bank_account_num AND gcc.code_combination_id = cba.cash_clearing_ccid AND cpa.trx_id = x_trx_id; END; END IF; END clear; /* --------------------------------------------------------------------- | PUBLIC PROCEDURE | | unclear | | | | DESCRIPTION | | This procedure would be called during unclearing phase | | | | HISTORY | --------------------------------------------------------------------- */ PROCEDURE unclear( X_trx_id NUMBER, -- transaction id X_trx_type VARCHAR2, -- transaction type ('PAYMENT'/'CASH') X_status VARCHAR2, -- status X_trx_date DATE, -- transaction date X_gl_date DATE -- gl date )IS lv_period_name gl_period_statuses.period_name%TYPE; ln_ledger_id gl_interface.ledger_id%TYPE := fnd_profile.value('GL_SET_OF_BKS_ID'); BEGIN /* Note: ce_999_interface_v is the base table of ce_999_interface_v in this example */ /* Note: You are required to pass the status column to your proprietary database. The Reconciliation Open Interface feature requires a non-null status column to function correctly. */ /* Note: If you have not defined the value for the open interface float status in the System Parameter Form, i.e. OPEN_INTERFACE_FLOAT_STATUS column in the CE_SYSTEM_PARAMETERS_ALL table, you are required to do so. */ UPDATE xxlts_ce11i_recon_all SET status = X_status, gl_date = NULL, cleared_amount = NULL, cleared_date = NULL, cleared_charges_amount = NULL, cleared_error_amount = NULL, exchange_rate_date = NULL, exchange_rate_type = NULL,

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 10 of 13

    exchange_rate = NULL WHERE trx_id = X_trx_id; -- -------------------------------------------------------------------- -- This section created all the accounting entries for clearing -- -------------------------------------------------------------------- BEGIN -- -------------------------------------------------------------------- -- Calculate the Current Period -- -------------------------------------------------------------------- SELECT period_name INTO lv_period_name FROM gl_period_statuses WHERE 1=1 AND start_date SYSDATE AND application_id = ( SELECT application_id FROM fnd_application WHERE application_short_name = 'SQLGL' ) AND set_of_books_id = ln_ledger_id; EXCEPTION WHEN OTHERS THEN lv_period_name := NULL; END; IF X_trx_type = 'PAYMENT' THEN -- BEGIN -- -------------------------------------------------------------------- -- Insert the Debit to Cash -- -------------------------------------------------------------------- INSERT INTO gl_interface (ledger_id ,status ,accounting_date ,currency_code ,date_created ,created_by ,period_name ,actual_flag ,user_je_source_name ,user_je_category_name ,entered_dr ,entered_cr ,segment1 ,segment2 ,segment3 ,segment4 ,segment5 ,reference1 ,reference10 ) SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id , 'NEW' status , TRUNC(SYSDATE) accounting_date , cpa.currency_code currency_code , SYSDATE date_created , fnd_global.user_id created_by , lv_period_name period_name , 'A' actual_flag , 'Data Migration' user_je_source_name , 'Cash Management' user_je_category_name , cpa.amount entered_dr , 0 entered_cr , gcc.segment1 segment1 , gcc.segment2 segment2 , gcc.segment3 segment3 , gcc.segment4 segment4 , gcc.segment5 segment5 , cpa.trx_type_dsp|| ' Recon @ '||TRUNC(SYSDATE) reference1 , cpa.trx_type_dsp reference10 FROM xxlts_ce11i_recon_all cpa , ce_bank_accounts cba , gl_code_combinations gcc WHERE cpa.bank_account_num = cba.bank_account_num

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 11 of 13

    AND gcc.code_combination_id = cba.asset_code_combination_id AND cpa.trx_id = x_trx_id; -- -------------------------------------------------------------------- -- Insert the Credit to Cash Clearing -- -------------------------------------------------------------------- INSERT INTO gl_interface (ledger_id ,status ,accounting_date ,currency_code ,date_created ,created_by ,period_name ,actual_flag ,user_je_source_name ,user_je_category_name ,entered_dr ,entered_cr ,segment1 ,segment2 ,segment3 ,segment4 ,segment5 ,reference1 ,reference10 ) SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id , 'NEW' status , TRUNC(SYSDATE) accounting_date , cpa.currency_code currency_code , SYSDATE date_created , fnd_global.user_id created_by , lv_period_name period_name , 'A' actual_flag , 'Data Migration' user_je_source_name , 'Cash Management' user_je_category_name , 0 entered_dr , cpa.amount entered_cr , gcc.segment1 segment1 , gcc.segment2 segment2 , gcc.segment3 segment3 , gcc.segment4 segment4 , gcc.segment5 segment5 , cpa.trx_type_dsp|| ' Recon @ '||TRUNC(SYSDATE) reference1 , cpa.trx_type_dsp reference10 FROM xxlts_ce11i_recon_all cpa , ce_bank_accounts cba , gl_code_combinations gcc WHERE cpa.bank_account_num = cba.bank_account_num AND gcc.code_combination_id = cba.cash_clearing_ccid AND cpa.trx_id = x_trx_id; END; ELSIF X_trx_type = 'CASH' THEN -- BEGIN -- -------------------------------------------------------------------- -- Insert the Credit to Cash -- -------------------------------------------------------------------- INSERT INTO gl_interface (ledger_id ,status ,accounting_date ,currency_code ,date_created ,created_by ,period_name ,actual_flag ,user_je_source_name ,user_je_category_name ,entered_dr ,entered_cr ,segment1 ,segment2 ,segment3 ,segment4 ,segment5 ,reference1

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 12 of 13

    ,reference10 ) SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id , 'NEW' status , TRUNC(SYSDATE) accounting_date , cpa.currency_code currency_code , SYSDATE date_created , fnd_global.user_id created_by , lv_period_name period_name , 'A' actual_flag , 'Data Migration' user_je_source_name , 'Cash Management' user_je_category_name , 0 entered_dr , cpa.amount entered_cr , gcc.segment1 segment1 , gcc.segment2 segment2 , gcc.segment3 segment3 , gcc.segment4 segment4 , gcc.segment5 segment5 , cpa.trx_type_dsp|| ' Recon @ '||TRUNC(SYSDATE) reference1 , cpa.trx_type_dsp reference10 FROM xxlts_ce11i_recon_all cpa , ce_bank_accounts cba , gl_code_combinations gcc WHERE cpa.bank_account_num = cba.bank_account_num AND gcc.code_combination_id = cba.asset_code_combination_id AND cpa.trx_id = x_trx_id; -- -------------------------------------------------------------------- -- Insert the Debit to Cash Clearing -- -------------------------------------------------------------------- INSERT INTO gl_interface (ledger_id ,status ,accounting_date ,currency_code ,date_created ,created_by ,period_name ,actual_flag ,user_je_source_name ,user_je_category_name ,entered_dr ,entered_cr ,segment1 ,segment2 ,segment3 ,segment4 ,segment5 ,reference1 ,reference10 ) SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id , 'NEW' status , TRUNC(SYSDATE) accounting_date , cpa.currency_code currency_code , SYSDATE date_created , fnd_global.user_id created_by , lv_period_name period_name , 'A' actual_flag , 'Data Migration' user_je_source_name , 'Cash Management' user_je_category_name , cpa.amount entered_dr , 0 entered_cr , gcc.segment1 segment1 , gcc.segment2 segment2 , gcc.segment3 segment3 , gcc.segment4 segment4 , gcc.segment5 segment5 , cpa.trx_type_dsp|| ' Recon @ '||TRUNC(SYSDATE) reference1 , cpa.trx_type_dsp reference10 FROM xxlts_ce11i_recon_all cpa , ce_bank_accounts cba , gl_code_combinations gcc WHERE cpa.bank_account_num = cba.bank_account_num AND gcc.code_combination_id = cba.cash_clearing_ccid AND cpa.trx_id = x_trx_id; END;

  • Lee Taylor www.LTSolutions.eu Copyright 2008 LT Solutions Limited 19/08/2008 Page 13 of 13

    END IF; END unclear; END CE_999_PKG; /

    Cash Management Payments and ReceiptsBank Account Setup and MaintenanceNotes for the Developer