Search Results get_person_based_on_resource
Overview
AR_CMGT_UTIL is the shared utility package for the Oracle Receivables Credit Management module (AR_CMGT). It centralizes cross-cutting helper logic required by Credit Management case folders, credit requests, checklists, scoring, and approval workflows. Rather than duplicating common routines across the transactional packages, Oracle implements them once in this utility layer and exposes them to the other Credit Management components. The package is defined with AUTHID CURRENT_USER, meaning it executes under the privileges of the calling schema. It is classified in the ETRM repository as a utility (UTIL) object owned by APPS, and it is referenced by sixteen other packages, confirming its role as an internal dependency for the Credit Management subsystem.
The package declares public data structures at the specification level, including the record type ocm_global_setup_options, the associative array type t_ocm_global_setup_options, and the package global pg_ocm_global_setup_options. These mirror the setup columns of AR_CMGT_SETUP_OPTIONS such as aging bucket, default credit classification, default exchange rate type, match rule, CER/DSO days, period, and automatic application numbering.
Key Procedures and Functions
The specification exposes approximately thirty documented routines. The primary ones include:
- DEBUG / WF_DEBUG — write diagnostic messages to the FND logging framework and to workflow debug logs respectively.
- GET_WF_DEBUG_FLAG — checks the AFLOG_ENABLED and AR_CMGT_WF_DEBUG profiles, returning "Y" when either is enabled.
- CHECK_EMP_CREDIT_ANALYST — the routine most commonly searched for; validates whether a given employee qualifies as a credit analyst for Credit Management processing.
- CHECK_CREDIT_ANALYST — a related validation of credit analyst eligibility.
- CHECK_UPDATE_PERMISSIONS / CHECK_DELETE_PERMISSIONS — enforce authorization before a user may modify or delete Credit Management records.
- FIND_ANALYSIS_LEVEL — derives the applicable analysis level for a case folder.
- GET_LIMIT_CURRENCY — returns the currency associated with a credit limit.
- GET_LATEST_CF_NUMBER — retrieves the most recent case folder number.
- GET_NO_OF_REF_DATA_POINTS / COPY_CHECKLIST_DATA_POINTS — count and copy checklist reference data points.
- IS_DUPLICATE_CHECKLIST / IS_VALID_DATE — validate checklist uniqueness and date correctness.
- GET_FND_USER_NAME / GET_CREDIT_ANALYST_NAME — resolve IDs to display names.
- GET_PERSON_BASED_ON_RESOURCE / GET_PERSON_BASED_ON_CF — map JTF resource records and case folders to a person.
- CHECK_CASEFOLDER_EXISTS / ISAPPLICATIONEXISTS — existence checks used before processing.
Tables Accessed
The package reads and writes a defined set of Credit Management and shared reference tables through APPS synonyms. AR_CMGT_SETUP_OPTIONS supplies global setup values; AR_CMGT_CASE_FOLDERS, AR_CMGT_CF_DTLS, AR_CMGT_CHECK_LISTS, and AR_CMGT_CHECK_LIST_DTLS hold case folder and checklist data; AR_CMGT_CREDIT_REQUESTS stores credit request records. FND_USER and WF_NOTIFICATIONS support user-name resolution and workflow notification checks. HZ_CUST_ACCOUNTS and the JTF_RS tables (JTF_RS_RESOURCE_EXTNS, JTF_RS_ROLE_RELATIONS) resolve customer, resource, and role information, while PER_ALL_PEOPLE_F provides the employee record used by the credit analyst validations. FND_CURRENCIES supplies currency attributes, and DUAL/PLITBLM support lightweight queries and PL/SQL table operations.
Usage Notes
AR_CMGT_UTIL is invoked internally by Credit Management forms, concurrent programs, and workflow activities rather than being an end-user entry point. The credit analyst checks in particular are called during case folder creation and credit request processing to confirm the selected analyst holds the required role. Developers extending Credit Management should call these utility routines instead of querying the underlying tables directly, ensuring consistent logging and permission behavior. Because the package is AUTHID CURRENT_USER, callers must hold the necessary object privileges themselves.