My Oracle Support Banner

Error During DRAFT INVOICE GENERATION Cursor=1114 Code=-1458: ORA-01458: (Doc ID 2044956.1)

Last updated on MARCH 08, 2017

Applies to:

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

Symptoms


Error when generating draft invoices with expenditures.
ORACLE error during DRAFT INVOICE GENERATION (cursor=1114 code=-1458: ORA-01458: invalid length inside variable character string)

PAIGEN_SINGLE: PRC: Generate Draft Invoices for a Single Project
.....
After select cust cursor for Task level funding
SELECT DISTINCT C.CUSTOMER_ID, TO_CHAR(NVL(C.CUSTOMER_BILL_SPLIT,100)),
  NVL( CP1.CREDIT_HOLD, CP.CREDIT_HOLD ), C.BILL_TO_ADDRESS_ID,
  C.SHIP_TO_ADDRESS_ID, HZ_SITE.SITE_USE_ID, HZ_SITE1.SITE_USE_ID,
  ADDR.LANGUAGE, C.BILL_TO_CUSTOMER_ID, C.SHIP_TO_CUSTOMER_ID,
  A.agreement_currency_code, nvl(f.task_id, 0),
  DECODE(GREATEST(NVL(A.EXPIRATION_DATE,
  TO_DATE(:Pbill_through,'YYYY/MM/DD') + 1),
  TO_DATE(:Pbill_through,'YYYY/MM/DD')),
  TO_DATE(:Pbill_through,'YYYY/MM/DD'),1,0) expiration_flag ,
  A.AGREEMENT_ID, A.INVOICE_LIMIT_FLAG, NVL(A.PAYMENT_SET_ID,0),
  to_char(nvl(a.start_date, to_date('01/01/1952','DD/MM/YYYY')),'YYYY/MM/DD') start_date,
  to_char(nvl(a.expiration_date,TO_DATE(:Pbill_through,'YYYY/MM/DD')+1 ),'YYYY/MM/DD'),
  TO_CHAR(NVL(F.INVPROC_BASELINED_AMOUNT,0) - NVL(F.INVPROC_BILLED_AMOUNT,0)),
  NVL(BILLING_SEQUENCE, 99999),
  TO_CHAR(A.EXPIRATION_DATE, 'YYYY/MM/DD')
FROM PA_PROJECT_CUSTOMERS C, HZ_CUSTOMER_PROFILES CP,
  HZ_CUSTOMER_PROFILES CP1, HZ_CUST_SITE_USES HZ_SITE,
  HZ_CUST_SITE_USES HZ_SITE1, HZ_CUST_ACCT_SITES ADDR, HZ_CUST_ACCOUNTS HZ_C,
  PA_SUMMARY_PROJECT_FUNDINGS F, PA_AGREEMENTS_ALL A , PA_TASKS T
WHERE C.PROJECT_ID = :Pproject_id
AND NVL(C.CUSTOMER_BILL_SPLIT, 100) > 0
AND C.BILL_TO_CUSTOMER_ID = CP.CUST_ACCOUNT_ID
AND CP.SITE_USE_ID IS NULL
AND HZ_SITE.CUST_ACCT_SITE_ID = C.BILL_TO_ADDRESS_ID
AND HZ_SITE.SITE_USE_CODE || '' = 'BILL_TO'
AND HZ_SITE.STATUS || '' = 'A'
AND HZ_SITE1.CUST_ACCT_SITE_ID = C.SHIP_TO_ADDRESS_ID
AND HZ_SITE1.SITE_USE_CODE || ''= 'SHIP_TO'
AND HZ_SITE1.STATUS || '' = 'A'
AND CP1.SITE_USE_ID(+) = HZ_SITE.SITE_USE_ID
AND ADDR.CUST_ACCT_SITE_ID = C.BILL_TO_ADDRESS_ID
AND HZ_C.CUST_ACCOUNT_ID = C.CUSTOMER_ID
AND HZ_C.STATUS || '' = 'A'
AND :tmp_count = :tmp_active_cust_count
AND ((:credit_hold_cst_count = 0) OR
  ((:credit_hold_cst_count >= 1) and (NVL(CP1.CREDIT_HOLD, CP.CREDIT_HOLD ) = 'Y')))
AND EXISTS (SELECT NULL
  FROM PA_EVENTS e
  WHERE PROJECT_ID = :Pproject_id
  AND ((:Pbill_group is null) or (:Pbill_group=e.Bill_group))
  AND e.BILLED_FLAG = 'N')
AND T.task_id = F.task_id
AND Decode(:Penable_top_task_customer_flag, 'Y', t.customer_id, c.customer_id) = c.customer_id
AND F.PROJECT_ID = C.PROJECT_ID
AND A.CUSTOMER_ID = C.CUSTOMER_ID
AND A.AGREEMENT_ID = F.AGREEMENT_ID
AND F.INVPROC_BASELINED_AMOUNT > 0
ORDER BY A.INVOICE_LIMIT_FLAG DESC, NVL(A.BILLING_SEQUENCE,99999), TO_CHAR(A.EXPIRATION_DATE, 'YYYY/MM/DD'),
  (NVL(F.INVPROC_BASELINED_AMOUNT,0) -
  NVL(F.INVPROC_BILLED_AMOUNT,0)) ,
  A.AGREEMENT_ID
ORACLE error during DRAFT INVOICE GENERATION (cursor=1114 code=-1458: ORA-01458: invalid length inside variable character string
  )

- happening with multiple projects

Cause

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
Symptoms
Cause
Solution
References


This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.