Showing posts with label OLFM. Show all posts
Showing posts with label OLFM. Show all posts

Monday, April 1, 2019

Query to get Print Lead Days in Oracle Lease and Finance Management(OLFM)

SELECT okl_stream_billing_pvt.get_printing_lead_days(:p_chr_id)
  FROM dual

p_chr_id --> okc_k_headers_all_b.id

Friday, March 1, 2019

OKL_LA_SALES_TAX_PVT.PROCESS_SALES_TAX


  • This is a private API. 
  • This procedure calls the tax engine and generates invoices for upfront taxes.

OKL_LA_JE_PVT.GENERATE_JOURNAL_ENTRIES


  • This is a private API. 
  • This procedure calls the accounting engine.


OKL_INTEREST_CALC_PUB.CALC_INTEREST_ACTIVATE


  • This is a public API. 
  • This procedure capitalizes or bill interim interest.

OKL_ACTIVATE_IB_PUB.ACTIVATE_IB_INSTANCE


  • This is a public API. 
  • It calls Install Base API to create an item instance in Install Base.

OKL_ACTIVATE_ASSET_PUB.ACTIVATE_ASSET


  • This is a public API. 
  • It creates an asset transaction record for each asset on the contract.

Thursday, February 28, 2019

SQL Query to get the linkage between Fixed Asset and Oracle Lease and Finance Management(OLFM) Asset

SELECT lse.lty_code,
       cle.id,
       cle.cle_id,
       itm.object1_id1,
       itm.jtot_object1_code
  FROM apps.okc_k_lines_b     cle,
       apps.okc_line_styles_b lse,
       apps.okc_k_items       itm,
       fa_additions           ast
 WHERE lse.id = cle.lse_id
   AND itm.cle_id = cle.id
   AND ast.asset_id = itm.object1_id1
   AND cle.dnz_chr_id = (SELECT khr.id
                           FROM apps.okc_k_headers_all_b khr
                          WHERE khr.contract_number = 'CONTRACT_NUMBER')
   AND itm.jtot_object1_code = 'OKX_ASSET';

List of API's used for Asset Disposal in Oracle Lease and Finance Management(OLFM)

Below are the list of api's used in OLFM for asset disposal.

API Name
API Description
FA_ADDITION_PUB.DO_ADDITION
This API is used to add an asset to a specific book in Fixed Assets.
OKL_OKC_MIGRATION_PVT.UPDATE_CONTRACT_ITEM
After creation of asset disposal in Fixed Assets, update contract item with the proper linkage(Asset_ID)
OKL_TRX_ASSETS_PUB.CREATE_TRX_ASSET_DEF
This API is used to create asset disposal header in OKL_TRX_ASSETS
OKL_TXL_ASSETS_PUB.CREATE_TXL_ASSET_DEF
This API is used to create asset disposal line in OKL_TXD_ASSETS_V
OKL_TXD_ASSETS_PUB.CREATE_TXD_ASSET_DEF
This API is used to create asset disposal details in OKL_TXL_ASSETS_V
OKL_SLA_ACC_SOURCES_PVT.POPULATE_SOURCES
This API is used to populate proper asset accounting entries information for asset in OLFM.
OKL_AM_ASSET_DISPOSE_PUB.DISPOSE_ASSET
This procedure is used to retire an asset in Fixed Assets. It checks if the asset is to be fully or partially retired, based upon the parameter value p_quantity and then calls the appropriate routine to retire the asset. It then stores the disposition transactions in OKL tables, calls accounting engine and then finally cancels all pending transactions in OKL tables for this asset.
FA_ADJUSTMENT_PUB.DO_ADJUSTMENT
This API is used to adjust the financial information of an asset in a specific book in Fixed Assets.
FA_RETIREMENT_PUB.DO_RETIREMENT
This API is used to partially or fully retire an asset in a specific book in Fixed Assets.
OKL_AM_ASSET_DISPOSE_PVT.EXPIRE_ITEM
This procedure expires an item in Installed Base(IB).
CSI_ITEM_INSTANCE_PUB.EXPIRE_ITEM_INSTANCE
This procedure expires an existing item instance and its child entities in Install Base.



List of tables for off-lease amortization Oracle Lease and Finance Management(OLFM) Internal Transactions:

OKL_TRX_ASSETS:-

  • A top level transaction table to group all the transactions for creation of Asset lines for a contract.

OKL_TXD_ASSETS_V:-

  • A transaction table to record tax book related asset attributes needed by Oracle Fixed Assets before activating the contract and additionally to store the split asset transaction attributes needed by Fixed Assets before activating the contract.

OKL_TXL_ASSETS_V:-

  • A contract line level transaction table to record asset attributes needed by Fixed Assets before activating the contract.

Asset return table(OKL_ASSET_RETURNS_B) in Oracle Lease and Finance Management(OLFM)

OKL_ASSET_RETURNS_B:-


  • This is the transaction table for managing Assets that is off lease after a Contract Termination or assets that have been identified as possible returns.
  • The return asset transaction is created by one of the following: 
  1. Repossession request
  2. Customer or Vendor notification of intent to return 
  3. System notification of potential return




Terminate Expired Contracts in Oracle Lease and Finance Management(OLFM)


  • Run the Standard Concurrent Program"Terminate Expired Contracts"  to set the status of contracts to "Expired". 
  • This step will create the off-lease amortization transaction for each asset in Lease and Finance Management. 
  • The following steps or activities are performed when processing terminated expired DF lease contracts:
  1. Eligible for Termination:- Checks if billing is complete up to the termination date (only if contract has expired).
  2. Close Balances (Write-off Small Balances):- Creates adjustment transactions for the balances less than tolerance amount (Only for Full Termination).
  3. Post Accounting Entries:-


  • Creates termination accounting entries.
  • Creates accrual accounting entries for catch-up (i.e., transfer accruals from non-income bucket to income bucket). Only for Full Terminations.
  • Reverse loss provisions. Only for Full Terminations.
  • Reverse accruals (if excess accruals exist). Only for Full Terminations.
  • Accelerate income accrual recognition for financed fees. Only for Full Terminations.
  • Accelerate income recognition or refund subsidy (based on subsidy setup).
      4.Dispose Asset:-
  • Retires assets in Fixed Assets. Expires Item in Install base. Retires asset in FA on quote effective from date.

     5.Amortize Asset (Create Off-Lease Amortization):-

  •   Creates off-lease amortization transactions in Lease and Finance Management, which are then processed into Fixed Assets (to adjust depreciation). Off-lease amortization transaction date is set to quote effective date.

     6. Create Asset Return:-

  • Creates asset return record in Lease and Finance Management with return status as Scheduled. 

     7. Update Contract Status (streams, contracts and contract lines):-

  • Updates stream status to HISTORIZE (except for residual value and investor contract obligation payable streams).
  • Sets the lines and contract to Terminated. Sets date terminated as quote effective from date. (Only for Full Termination). If the contract is evergreen eligible the contract and lines are updated to Evergreen status. Along with that off-lease amortization and Termination accounting is also done for the contract.

     8.Update Contract Details (payments, contract lines):-

  • Updates the payments i.e. remove future payments for terminated assets after termination date.
  • Updates lines to Terminated for all the terminated financial assets. If the financial asset is attached to service or fees, terminates those sub lines as well. Terminates the primary service or fee line if all sub-lines terminated. (Does not terminate those primary service and fee lines that do not have any sub lines).
  • Launches mass Rebook, which Rebooks the contract. Sets Rebook date as quote-effective date. Pass terminated assets to Rebook API. (Only for Partial Termination).


SQL Query to get the linkage between Install Base and Lease and Finance Management(OLFM) Asset Instance:

SELECT lse.lty_code,
       cle.id,
       cle.cle_id,
       itm.object1_id1,
       itm.jtot_object1_code
  FROM apps.okc_k_lines_b     cle,
       apps.okc_line_styles_b lse,
       apps.okc_k_items       itm,
       csi_item_instances     ib
 WHERE lse.id = cle.lse_id
   AND itm.cle_id = cle.id
   AND ib.instance_id = itm.object1_id1
   AND cle.dnz_chr_id = (SELECT khr.id
                           FROM apps.okc_k_headers_all_b khr
                          WHERE khr.contract_number = 'CONTRACT_NUMBER')
   AND itm.jtot_object1_code = 'OKX_IB_ITEM';

SQL Query to get the linkage between Fixed Asset and Lease and Finance Management(OLFM) Asset

SELECT lse.lty_code,
       cle.id,
       cle.cle_id,
       itm.object1_id1,
       itm.jtot_object1_code
  FROM apps.okc_k_lines_b     cle,
       apps.okc_line_styles_b lse,
       apps.okc_k_items       itm,
       fa_additions           ast
 WHERE lse.id = cle.lse_id
   AND itm.cle_id = cle.id
   AND ast.asset_id = itm.object1_id1
   AND cle.dnz_chr_id = (SELECT khr.id
                           FROM apps.okc_k_headers_all_b khr
                          WHERE khr.contract_number = 'CONTRACT_NUMBER')
       AND itm.jtot_object1_code = 'OKX_ASSET';

Contract Import Step by step process in OLFM


  • The following process should be sequentially executed.

         Import Ã FundingàValidationàStream GenerationàDraft Journal EntryàApproval

  • Some of the processes mentioned are optional like Draft Journal Entry & Approval. These optional processes can be skipped based on the business process and the state of the contracts in the legacy systems. 
  • If the contracts are created in batches, while one batch is undergoing one process, other batch can be run in parallel. For example, while the first batch is undergoing stream generation, the second batch can be submitted for validation.


API Used to Approve Contract in Oracle Lease and Finance Management(OLFM)


  • Review and approve the contract before activation, you can approve one contract at a time from the booking page and initiating the approval workflow. 
  • To perform a mass update to change the contract status to APPROVED using the approval API. 
  • The contract status must be updated to APPROVED before a contract can be activated i.e. BOOKED, but execution of the approval workflow is an optional step. 
  • Use the following API to submit contracts for approval.
API Name
Description
OKL_CONTRACT_BOOK_PUB. SUBMIT_FOR_APPROVAL ()
This program will submit the contract for approval
Note:- There is no parallel processing or bulk processing capabilities for contract approval program.This API can be called one contract at a time. If you need batch processing capabilities to submit multiple contracts at one time, you can create custom wrappers. If you want to by-pass the approval workflow, you can create a custom program to update the contract status to APPROVED once contracts are validated and in PASSED status.

API to Generate Draft Journal Entries in Oracle Lease and Finance Management(OLFM)


  • In order to see draft journal entry records of the expected booking accounting before booking the contract, you can request draft journal entry creation. 
  • You do not need to create or view draft journal entries in order to book (activate) a contract. 
  • Streams must be completed for a contract (status COMPLETED) before you can generate draft journal entries. 
  • After generating draft journal entries, the contract status remains as COMPLETED. 
  • You can submit a contract for creating journal entries from the screen or call private Lease and Finance Management APIs to process the draft journal entry generation.
  • Following API can be used to generate the draft journal entries.
API Name
Description
OKL_CONTRACT_BOOK_PUB. GENERATE_JOURNAL_ENTRIES ()
This program will submit the contract for draft journal entry generation

Note:- There is no parallel processing or bulk processing capabilities for draft journal entry program. This API can be called one contract at a time. If you need batch processing capabilities to submit multiple contracts at one time, you can create custom wrappers.

API to generate streams in Oracle Lease and Finance Management(OLFM)


  • After contracts are validated, we need to submit those contracts for pricing. 
  • Pricing generates streams and yields for each contract. 
  • After pricing is completed, the contract status is updated to "COMPLETED". 
  • For imported contracts, you can submit a contract for pricing from the screen or call private Lease and Finance Management APIs. 
  • You should submit the contract through pricing at the time of import unless you need to update or reconcile a contract after validation. 
  • If a contract is updated after validation, the contract status reverts to INCOMPLETE.
  • Use the following API to generate streams and yields for contracts that are validated.
API Name
Description
OKL_CONTRACT_BOOK_PUB.GENERATE_STREAMS()
This program will submit the contract for pricing

Note: There is no parallel processing or bulk processing capabilities for the pricing program.

API used to validate contract in Oracle Lease and Finance Management(OLFM)

  • After you create contracts in NEW status, you must validate them before you continue the activation process. 
  • After successful validation, the contract is updated to PASSED status. If there are any errors, Lease and Finance Management updates the status to ERROR or WARNING. 
  • You can submit a contract for validation from the Lease Management contract authoring pages to process each contract separately and view each validation message. 
  • If you want to process as a batch, you can call a private Lease and Finance Management API to process the validation.
  • Use the following API to validate a contract which is in NEW status
API Name
Description
OKL_CONTRACT_BOOK_PUB.VALIDATE_CONTRACT()
This program will submit the contract for validation

  • This API can be called one contract at a time.
    Note:- There is no parallel processing or bulk processing capabilities for the validation program.

Funding Requests in Oracle Lease and Finance Management(OLFM)


  • Funding requests are used to request and process payments to vendors/suppliers for items you finance on a contract or any associated expenses. 
  • Approved funding requests can be processed using standard programs to create invoices in Oracle Payables.
  • You should create actual funding requests for Open Invoices or Partially Paid Payable invoices. Update the funding request to "Approved" using update APIs for each actual funding request that corresponds to an open payable invoice. 
  • The Lease Management disbursement program picks up these funding requests and creates payable invoices automatically when you run the correct programs.
  • Create funding header, lines and approve funding using the following APIs. 

API Name
Description
OKL_FUNDING_PVT.CREATE_FUNDING_HEADER()
This program will create funding header
OKL_FUNDING_PVT. CREATE_FUNDING_LINES()
This program will create funding lines
OKL_FUNDING_PVT. UPDATE_FUNDING_HEADER()
This program will activate the funding by updating the status
Note:- Parallel processing is not supported in these funding APIs.

Contract Import in Oracle Lease and Finance Management(OLFM)

Oracle Lease and Finance Management(OLFM) allows you to import contracts through a standard set of Interface Tables. The import program imports data from interface tables into the Oracle Lease and Finance Management tables. After interface tables are populated, we need to submit a request to import and process contracts.
  • Navigation to submit the Import Contract Concurrent Program 
         Processing->Interfaces->Import Contracts. 
  • Parameters used for the Contract import batch:  Batch Number, Contract Number, Customer Number, Start Date From, Start Date To, Number of Parallel Instance. 
  • Based on the parameter(s) entered, a set of contracts will be selected for import for the specific request from the interface tables. You populate the following interface tables before submitting the contract import concurrent program.
  • Populate the following interface tables before submitting the contract import concurrent program.
Interface Table Name
Description
OKL_HEADER_INTERFACE
Contract header table
OKL_LINES_INTERFACE
Contract lines table
OKL_PAYMENTS_INTERFACE
Payments table
OKL_PARTY_ROLES_INTERFACE
Party Roles
OKL_TERMS_INTERFACE
Contract Terms & Conditions

  • We can import Contracts in Batches by populating the batch number field in the interface header table. The contract import program follows these processes:
  1. Validate required values:–The program validates the required values are loaded for each contract in the interface tables. The system marks the record status as "ELIGIBLE" if all required values are found populated. else, it changes status to "ERROR" and reports the error detail in a concurrent log/output file.
  2. Load into Lease Management tables:– After the validation phase, each "ELIGIBLE" contract is populated in the corresponding destination data table. The record status in the Interface is set to either "INTERFACED" or "ERROR" depending on the result of loading. This process continues for all "ELIGIBLE" contracts. The system generates a detailed report as a concurrent manager log/output file.
  3. Process:– After the load, the import program processes loaded contracts. As each activation step is completed, the contract status is updated.
         
Contract Status Description
Description
NEW
Interface contract data is loaded to create a new contract
PASSED
Contract has been validated by the QA checker
COMPLETE
Streams are generated and draft journal entries created
APPROVED
Contract is approved using the activation approval workflow
BOOKED
Contract is activated and all booking activities are completed

  • Based on the parallel processing capability, users can specify number of parallel workers as a parameter for contract import program.


APEX$TASK_PK

  APEX$TASK_PK is a substitution string holding the primary key value of the system of records