Search Results get_current_person_id




Overview

OE_SOP_UTIL is a utility PL/SQL package body owned by the APPS schema in Oracle E-Business Suite. It belongs to the Oracle Order Management (OE) module and, as indicated by the OEXUSOPB.pls source header and its API classification of UTIL, functions as a lightweight helper rather than a transactional business API. The package addresses a recurring requirement in Order Management and Sales Order Processing flows: resolving the identity of the session's current user to the corresponding operational entity. Specifically, it translates the numeric FND user identifier returned by the FND_GLOBAL session context into either a resource identifier or a person identifier. This mapping is fundamental because Order Management features such as sales agreements, order assignment, resource-based security, and salesperson references operate on resource or person keys, not on raw application user IDs.

Key Procedures and Functions

  • GET_RESOURCE_ID — Returns the JTF resource identifier associated with the currently logged-in application user. Internally it captures the session user ID from FND_GLOBAL.USER_ID and queries the JTF resource extension table to find the matching resource record. If no matching resource is found, the function returns zero, allowing callers to detect the absence of a resource association without exception handling.
  • GET_PERSON_ID — Returns the HR person identifier (person_id) linked to the currently logged-in user. This is the function associated with the search term get_current_person_id, which corresponds to the internal cursor definition that drives the lookup. It retrieves the session user ID via FND_GLOBAL.USER_ID and resolves the employee's person record by matching FND_USER.EMPLOYEE_ID to PER_ALL_PEOPLE_F.PERSON_ID. As with GET_RESOURCE_ID, a not-found condition yields zero rather than an error.

Both functions take no formal parameters; the user context is derived entirely from the FND_GLOBAL session. No procedure or function in this package performs data manipulation; both are pure read operations returning NUMBER values.

Tables Accessed

  • FND_USER — The application user repository. It supplies the employee_id linkage for the current user, forming the bridge between the login identity and the HR person record.
  • PER_ALL_PEOPLE_F — The HR people datestamped table, read here to convert an employee_id into a person_id.
  • JTF_RS_RESOURCE_EXTNS — The resource extension table in the JTF Resource Manager schema, queried against user_id to obtain the resource_id representing the user as a schedulable or assignable resource.

All three objects are referenced through APPS synonyms. The package performs no inserts, updates, or deletes against any of them.

Usage Notes

OE_SOP_UTIL is invoked primarily from Order Management forms and related Sales Order Processing logic that need to identify the current salesperson, resource, or employee without prompting the user. Typical call sites include order header defaults, sales credit assignment, and resource-driven security checks. Because the package is a UTIL-classified body with no declared specification exposed, it is most safely called from custom code as APPS.OE_SOP_UTIL.GET_PERSON_ID or APPS.OE_SOP_UTIL.GET_RESOURCE_ID. The documented metadata records no dependent packages, so its footprint is deliberately minimal. Callers should treat a zero return as a valid "no mapping found" result and should not assume the presence of a resource or person record for every application user.