How to get document Sequence name
1) Write query to get db sequence name
SELECT seq.db_sequence_name
-- INTO l_sequence_name
FROM fnd_document_sequences seq, fnd_doc_sequence_assignments sa
WHERE seq.doc_sequence_id = sa.doc_sequence_id
AND sa.application_id = 200
AND sa.category_code ='AP Invoice'-- :l_document_name
AND (sa.method_code = 'A' )
2) get sequence value using below query
BEGIN
l_query :=
'select ' || l_sequence_name || '.nextval into :next_val from sys.dual';
EXECUTE IMMEDIATE l_query
INTO l_doc_sequence_value;
END;
return l_doc_sequence_value;