Search Results submit_for_approval




Overview

LNS_SUBMIT_FOR_APPROVAL_PUB is a public PL/SQL package in the Oracle E-Business Suite Loans (LNS) module, owned by the APPS schema and declared with AUTHID CURRENT_USER. Its documented purpose is to create a request for loan approval — that is, to move a loan from a draft or working state into the approval workflow so that the appropriate approvers can review it. The package is registered in the ETRM repository with a public API classification, a display name of "Request For Loan Approval," and a business entity category of LOAN_APPROVAL_REQUEST. The header identifies it as active and of "S" (supported) compatibility, indicating it is a supported integration point rather than an internal helper.

The source header dates the package to 29-Mar-2007, with a later revision in May 2007 (120.0.12000000.3), which places it within the Oracle Loans code line carried forward into EBS 12.1.1 and 12.2.2. Loans in Oracle EBS are lending instruments used by public-sector and commercial organizations to manage internal and external loan portfolios, and each new or modified loan typically requires approval before disbursement or amendment. This package encapsulates that submission step.

Key Procedures and Functions

The documented API surface consists of a single procedure: SUBMIT_FOR_APPROVAL. Its declared purpose is to create an approval request for a specific loan. Documented parameters include P_API_VERSION (standard API version indicator), P_COMMIT (a flag where passing 'Y' causes the API to issue an explicit commit), and P_LOAN_ID (the identifier of the loan for which approval is being requested). Return values are provided through X_RETURN_STATUS, which returns 'S' for success and 'F' for failure, and X_MSG_COUNT, which returns the number of errors encountered. Errors are written to the global temporary table LNS_LOAN_CREATE_ERRORS_GT rather than being raised as exceptions.

The package also declares a public data type, Loan_Sub_For_Appr_err_type, defined as a TABLE OF LNS_LOAN_CREATE_ERRORS_GT%ROWTYPE. The header comments note that this type is passed as a parameter to the Submit_For_Approval API, allowing callers to retrieve the set of error rows generated during the call. The presence of an error-collection parameter alongside X_MSG_COUNT reflects a consistent pattern across Oracle Loans public APIs.

Tables Accessed

The package operates against a broad set of Loans and Receivables tables accessed through APPS synonyms. The primary entity tables are LNS_LOAN_HEADERS and its _ALL variant, which hold the loan definition being submitted, together with LNS_LOAN_LINES for loan line detail and LNS_LOAN_PRODUCTS_ALL for the loan product configuration that governs eligibility and terms. LNS_ASSET_ASSIGNMENTS and LNS_FEE_ASSIGNMENTS supply collateral and fee information that may be validated as part of the submission. LNS_CONDITIONS and LNS_COND_ASSIGNMENTS provide the condition templates and their assignments, ensuring that pre-approval conditions are in place before the request is created.

Error and diagnostic data are handled through LNS_LOAN_CREATE_ERRORS_GT and LNS_LOAN_API_ERRORS_GT, global temporary tables used to collect validation failures without persisting them in the calling session's transaction. AR_PAYMENT_SCHEDULES is referenced for payment schedule data associated with the loan, and PLITBLM is the standard Oracle Applications-style message/error lookup table used for resolving message text.

Usage Notes

SUBMIT_FOR_APPROVAL is normally invoked from the Oracle Loans user interface — the loan maintenance form — when a user selects the submit-for-approval action on a loan. It may also be called from custom PL/SQL, concurrent programs, or workflow activities that automate loan lifecycle transitions. The ETRM repository records zero other packages referencing LNS_SUBMIT_FOR_APPROVAL_PUB, confirming it is an entry point rather than a shared internal utility.

Callers should supply P_API_VERSION, set P_COMMIT explicitly, and always read X_RETURN_STATUS before proceeding. Because errors are returned through X_MSG_COUNT and the global temporary table, callers must query LNS_LOAN_CREATE_ERRORS_GT (and optionally populate the Loan_Sub_For_Appr_err_type collection) after any failed call to obtain the specific validation messages. On success, the loan enters the approval workflow and becomes subject to the configured approver hierarchy.