858:
859: -- Check if any historic upgrade has been submitted for the same ledger as the current one .
860:
861: 862: select count(*) into l_count from dual 863: where exists (select 1 from gl_ledger_relationships
864: where primary_ledger_id = p_ledger_id and hist_conv_status_code = 'RUNNING');
865:
866: IF (l_count =1) THEN