Monday, July 1, 2013

AR Transaction: FRM-40735: POST-QUERY trigger raised unhandled exception ORA-06502

FRM-40735: POST-QUERY trigger raised unhandled exception ORA-06502

ORA-01403: no data found

AR Transaction form. -- When trying to query transaction.

Reason:  ra_customer_trx_all.ct_reference filed, in table the length of the column is 170 byte but in the form it is only 30 byte long.

Solution: Make the ct_reference field length to 30 characters long

Check for the related invoice/Credit Notes, if it is, you need to update the reference field for both.

select cn.trx_number cn
        ,cn.ct_reference cn_reference
        ,cn.interface_header_attribute1 cn_attri
        ,inv.trx_number invocie
        ,inv.ct_reference inv_reference
        ,inv.interface_header_attribute1 inv_attri
  from ra_customer_trx_all cn
         ,ra_customer_trx_all inv
 where cn.previous_customer_trx_id = inv.customer_trx_id
    and cn.trx_number = <Credit Note#>
    and cn.org_id = <Org Id> ;
   
update ra_customer_trx_all set ct_reference = '<30 Char long reference>'
 where trx_number in ('<Inv#>','<CN#>')
    and org_id = <Org Id> ;   

>> If this does not solve the problem, then there must be default setup for Reference

Goto, Receivables > Setup > Transactions > Sources, and check the setup for 'Reference Field Default Value'.

For Ex, if it is 'interface_header_attribute1', update this as well with the same value.

update ra_customer_trx_all set interface_header_attribute1 = '<30 Char long reference>'
 where trx_number in ('<Inv#>','<CN#>')
    and org_id = <Org Id> ;

Commit the changes and try again.

No comments:

Post a Comment