My Oracle Support Banner

Creating Event Using PA_EVENT_PUB.CREATE_EVENT API Errors - The Entered Event Reference is Not Unique (Doc ID 2948315.1)

Last updated on JUNE 23, 2023

Applies to:

Oracle Project Billing - Version 12.2.4 and later
Information in this document applies to any platform.


Many Projects in EBS are populated with PM_PRODUCT_CODE and the Billing event creation for those projects works without issues. But if there is no product code on the Project (PA_PROJECTS_ALL) table for the Project and try to generate a Billing Event using the below API (G_PM_PRODUCT_CODE is null in this example) by passing a unique Event Reference (tried passing a null value, but still errors).

Example code:

apps.pa_event_pub.create_event (
p_api_version_number => '1.0',
p_commit => apps.FND_API.g_true,
p_init_msg_list => apps.FND_API.g_true,
p_pm_product_code => G_PM_PRODUCT_CODE,
p_event_in_tbl => lt_event_in_tbl,
p_event_out_tbl => lt_event_out_tbl,
p_msg_count => ln_msg_count,
p_msg_data => lc_error_msg,
p_return_status => lc_return_status);

Get the below return values.

lc_return status: E
lc_error msg: The entered event reference is not unique.

The apps.pa_event_pub.delete_event and apps.pa_event_pub.update_event APIs works fine for a sample project, but the apps.pa_event_pub.create_event is the only one returning an error.

The event reference is unique as it is converted from timestamp in the system which keeps changing every millisecond.

There are currently many projects that were created manually in forms, thus, the pa_projects_all.pm_product_code is not populated.

Planning to use the pa_project_pub.create_project to create new projects in the future so that the pm_product_code will be populated.

Replication Steps:

- Run the PA_EVENT_PUB.CREATE_EVENT API. Note that the API can be different for each
- Error occurs with,

lc_return status: E
lc_error msg: The entered event reference is not unique.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.