how to get the last Document sequence value for a check if we do undo accounting
Hi,
this SQL statment retrieves the document sequence value for the check
but if i do undo accounting for the check,there will be more than document sequence value
my need is to get the last document sequence value which is created after i do the undo accounting
as you know there is the original one and the offset and the newest
SELECT DOC_SEQUENCE_VALUE --INTO VB_DOC_SEQUENCE_VALUE
FROM gl_je_headers
WHERE je_category = 'Payments'
AND je_header_id IN (
SELECT je_header_id
FROM gl_import_references
WHERE reference_6 IN (
SELECT TO_CHAR (accounting_event_id)
0