/
Joint Overhead Agreements (JOINT_OVERHEAD_AGREEMENTS_API)


Joint Overhead Agreements (JOINT_OVERHEAD_AGREEMENTS_API)



Back to Qbyte 360 Connect API Reference Guide

Overview

Offers the ability to INSERT and UPDATE joint overhead agreement well count records. APIs required for the other joint overhead agreement tables should be places in this package. It also performs all data validations and returns a status code and error message. The name of the API package for updating the JOINT_OVERHEAD_AGREEMENTS_WELLS is JOINT_OVERHEAD_AGREEMENTS_API. The functions are:

Function Name

Purpose

Function Name

Purpose

insert_well

Inserts a well into the joint_overhead_agreement_wells table

update_well

Updates a well in the joint_overhead_agreement_wells table

validate_well

validates a record in the joint_overhead_agreement_wells table

insert_property



update_property

  

validate_property

  



joint_overhead_agreements_api.INSERT_WELL()

  • Function returns BOOLEAN to indicate a successful/unsuccessful action.

  • Default values on parameters indicate that the parameter is optional and the default value will be inserted into the corresponding column.

  • Available as both a function and a procedure.

Parameter

In/Out

Type

Default Value

Parameter

In/Out

Type

Default Value

i_cc_num

IN

VARCHAR2(10)



i_acct_per_date

IN

DATE



i_well_count

IN

NUMBER(6)



o_return_status



*procedure only

OUT

VARCHAR2

Possible values:

  • ‘TRUE’

  • ‘FALSE’

o_return_code

OUT

NUMBER

Possible values:

  • 0 – Success

  • -20001 – Handled Application Error

  • -20000 – Generic Error

o_return_message

OUT

VARCHAR2

Insert ‘Successful’ or ‘Failure’ or error message



joint_overhead_agreements_api.UPDATE_WELL()

  • Function returns BOOLEAN to indicate a successful/unsuccessful action.

  • Default values on parameters indicate that the parameter is optional and the default value will be inserted into the corresponding column.

  • Available as both a function and a procedure.

Parameter

In/Out

Type

Default Value

Parameter

In/Out

Type

Default Value

i_cc_num

IN

VARCHAR2(10) 



i_acct_per_date

IN

DATE 



i_well_count

IN

NUMBER(6)



o_return_status



*procedure only

OUT

VARCHAR2

Possible values:

  • ‘TRUE’

  • ‘FALSE’

o_return_code

OUT

NUMBER

Possible values:

  • 0 – Success

  • -20001 – Handled Application Error

  • -20000 – Generic Error

o_return_message

OUT

VARCHAR2

Insert ‘Successful’ or ‘Failure’ or error message



joint_overhead_agreements_api.VALIDATE_WELL()

  • Function returns BOOLEAN to indicate a successful/unsuccessful action.

  • Default values on parameters indicate that the parameter is optional and the default value will be inserted into the corresponding column.

  • Available as both a function and a procedure.

Parameter

In/Out

Type

Default Value

Parameter

In/Out

Type

Default Value

i_mode

IN

VARCHAR2



i_cc_num

IN

VARCHAR(10)



i_acct_per_date

IN

DATE



i_well_count

IN

NUMBER(6)



o_return_status



*procedure only

OUT

VARCHAR2

Possible values:

  • ‘TRUE’

  • ‘FALSE’

o_return_code

OUT

NUMBER

Possible values:

  • 0 – Success

  • -20001 – Handled Application Error

  • -20000 – Generic Error

o_return_message

OUT

VARCHAR2

Insert ‘Successful’ or ‘Failure’ or error message



Error Messages for INSERT_WELL() and UPDATE_WELL()

Message

Explanation

Message

Explanation

Invalid Cost Centre 

The Cost Centre Specified is invalid.

Record already exists for the Cost Centre and Accounting Period 

The Record specified for the cost centre and accounting period already exists.

Record does not exist for the Cost Centre and Accounting period 

Non existent record cannot be updated.

Cannot update record in a prior period 

The record cannot be update if the accounting period is in the past. 

Cost Centre must be supplied

A value must be specified for the Cost Centre.

Accounting Period must be supplied 

A value must be specified for the Accounting Period.

Well Count must be supplied

A value must be specified for the Well Count.



Joint_overhead_agreements_api.INSERT_PROPERTY()

  • Function returns BOOLEAN to indicate a successful/unsuccessful action.

  • Default values on parameters indicate that the parameter is optional and the default value will be inserted into the corresponding column.

  • Available as both a function and a procedure.

Parameter

In/Out

Type

Default Value

Parameter

In/Out

Type

Default Value

i_joint_overhead_agr_cntl_id

IN

NUMBER (10) 



i_cc_num

IN

VARCHAR2(10) 



i_recovery_cc_num

IN

VARCHAR2(10) 



i_expiry_date

IN

DATE 

NULL

i_agreement_id

IN

NUMBER(10) 

NULL

i_joint_overhead_agr_method_id

IN

NUMBER(10)



i_afe_num

IN

VARCHAR2(10) 

NULL

i_expense_afe_item_num

IN

VARCHAR2(6) 

NULL

i_cumulative_overhead_amt

IN

NUMBER(14,2) 

NULL

i_prev_cumulative_overhead_amt

IN

NUMBER(14,2) 

NULL

o_id

OUT

NUMBER(10) 



o_return_status



*procedure only

OUT

VARCHAR2

Possible values:

  • ‘TRUE’

  • ‘FALSE’

o_return_code

OUT

NUMBER

Possible values:

  • 0 – Success

  • -20001 – Handled Application Error

  • -20000 – Generic Error

o_return_message

OUT

VARCHAR2

Insert ‘Successful’ or ‘Failure’ or error message



joint_overhead_agreements_api.INSERT_PROPERTY()

  • Function returns BOOLEAN to indicate a successful/unsuccessful action.

  • Default values on parameters indicate that the parameter is optional and the default value will be inserted into the corresponding column.

  • Available as both a function and a procedure.

Parameter

In/Out

Type

Default Value

Parameter

In/Out

Type

Default Value

i_joint_overhead_agr_cntl_name

IN

VARCHAR2(30) 



i_cc_num

IN

VARCHAR2(10) 



i_recovery_cc_num

IN

VARCHAR2(10) 



i_expiry_date

IN

DATE 

NULL

i_agreement_id

IN

NUMBER(10)

NULL

i_joint_overhead_agr_mthd_name

IN

VARCHAR2(10) 



i_afe_num

IN

VARCHAR2(10) 

NULL

i_expense_afe_item_num

IN

VARCHAR2(6) 

NULL

i_cumulative_overhead_amt

IN

NUMBER(14,2) 

NULL

i_prev_cumulative_overhead_amt

IN

NUMBER(14,2) 

NULL

o_id

OUT

NUMBER(10) 



o_return_status



*procedure only

OUT

VARCHAR2

Possible values:

  • ‘TRUE’

  • ‘FALSE’

o_return_code

OUT

NUMBER

Possible values:

  • 0 – Success

  • -20001 – Handled Application Error

  • -20000 – Generic Error

o_return_message

OUT

VARCHAR2

Insert ‘Successful’ or ‘Failure’ or error message



joint_overhead_agreements_api.UPDATE_PROPERTY()

  • Function returns BOOLEAN to indicate a successful/unsuccessful action.

  • Default values on parameters indicate that the parameter is optional and the default value will be inserted into the corresponding column.

  • Available as both a function and a procedure.

Parameter

In/Out

Type

Default Value

Parameter

In/Out

Type

Default Value

i_id

IN

NUMBER(10)



i_expiry_date

IN

DATE

NULL

i_agreement_id

IN

NUMBER(10)

NULL

o_return_status



*procedure only

OUT

VARCHAR2

Possible values:

  • ‘TRUE’

  • ‘FALSE’

o_return_code

OUT

NUMBER

Possible values:

  • 0 – Success

  • -20001 – Handled Application Error

  • -20000 – Generic Error

o_return_message

OUT

VARCHAR2

Insert ‘Successful’ or ‘Failure’ or error message



joint_overhead_agreements_api.VALIDATE_PROPERTY()

  • Function returns BOOLEAN to indicate a successful/unsuccessful action.

  • Default values on parameters indicate that the parameter is optional and the default value will be inserted into the corresponding column.

  • Available as both a function and a procedure.

Parameter

In/Out

Type

Default Value

Parameter

In/Out

Type

Default Value

i_mode

IN

VARCHAR2 



i_id

IN

NUMBER(10) 



i_joint_overhead_agr_cntl_id

IN

NUMBER(10) 



i_cc_num

IN

VARCHAR2(10) 



i_recovery_cc_num

IN

VARCHAR2(10) 



i_expiry_date

IN

DATE 



i_agreement_id

IN

NUMBER(10) 



i_joint_overhead_agr_method_id

IN

NUMBER(10) 



i_afe_num

IN

VARCHAR2(10) 



i_expense_afe_item_num

IN

VARCHAR2(6)

NULL 

o_return_status



*procedure only

OUT

VARCHAR2

Possible values:

  • ‘TRUE’

  • ‘FALSE’ 

o_return_code

OUT

NUMBER

Possible values:

  • 0 – Success

  • -20001 – Handled Application Error

  • -20000 – Generic Error 

o_return_message

OUT

VARCHAR2

Insert ‘Successful’ or ‘Failure’ or error message



joint_overhead_agreements_api.VALIDATE_PROPERTY()

  • Function returns BOOLEAN to indicate a successful/unsuccessful action.

  • Default values on parameters indicate that the parameter is optional and the default value will be inserted into the corresponding column.

  • Available as both a function and a procedure.

Parameter

In/Out

Type

Default Value

Parameter

In/Out

Type

Default Value

i_mode

IN

VARCHAR2 



i_id

IN

NUMBER(10) 



i_joint_overhead_agr_cntl_name

IN

VARCHAR2(10) 



i_cc_num

IN

VARCHAR2(10)



i_recovery_cc_num

IN

VARCHAR2(10) 



i_expiry_date

IN

DATE 



i_agreement_id

IN

NUMBER(10) 



i_joint_overhead_agr_mthd_name

IN

VARCHAR2(10) 



i_afe_num

IN

VARCHAR2(10) 



i_expense_afe_item_num

IN

VARCHAR2(6) 

NULL

o_return_status



*procedure only

OUT

VARCHAR2

Possible values:

  • ‘TRUE’

  • ‘FALSE’ 

o_return_code

OUT

NUMBER

Possible values:

  • 0 – Success

  • -20001 – Handled Application Error

  • -20000 – Generic Error 

o_return_message

OUT

VARCHAR2

Insert ‘Successful’ or ‘Failure’ or error message 



Error Messages for INSERT_PROPERTY() and UPDATE_PROPERTY()

Message

Explanation

Message

Explanation

Control ID must be supplied

A value must be specified for the Control ID. 

Cost Centre must be supplied

A value must be specified for the Cost Centre. 

Recovery Cost Centre must be supplied

A value must be specified for the Recovery Cost Centre. 

Method ID must be supplied

A value must be specified for the Method ID. 

The AFE has been terminated

The TERM_DATE for the AFE provided is not NULL. 

The Cost Centre has been terminated

The TERM_DATE for the Cost Centre provided is not NULL. 

Expense AFE item should only be supplied where AFE is supplied

The AFE provided is NULL and the expense AFE provided is not NULL.

Invalid AFE Number

The AFE provided is invalid. 

Invalid Cost Centre

The Cost Centre provided is invalid. 

Invalid Recovery Cost Centre

The Recovery Cost Centre provided is invalid. 

Invalid Method ID

The Method ID provided is invalid. 

Invalid method code - When AFE is provided, the method type code must be Capital

The Method ID provided is valid and an AFE has been provided, however the method code is not ‘C’ (Capital). 

Invalid method code - When AFE is not provided, the method type code must be Operating

The Method ID provided is valid and an AFE has not been provided, however the method code is not ‘O’ (Operating). 

Invalid Control ID

The Control ID provided is invalid. 

Invalid Cost Centre/AFE combination

The combination of the Cost Centre and AFE provided is invalid. 

Invalid Agreement ID

The Agreement ID provided is invalid. 

A record with the same Cost Centre, Method Code and Expiry Date already exists

Cannot insert another record with the same combination of Cost Centre, Method Code and Expiry Date.

A record with the same AFE Num, AFE Item Num, Cost Centre, Method Code and Expiry Date already exists

Cannot insert another record with the same combination of AFE Num, AFE Item Num, Cost Centre, Method code and Expiry Date.



 

Related content


Copyright© 2024 IFS AB. Copying prohibited. All rights reserved.