139: l_seq_num := 0;
140:
141: SELECT NVL(MAX(seq_num), 0)
142: INTO l_seq_num
143: FROM fnd_attached_documents
144: WHERE pk1_value = to_char(l_requisition_line_id)
145: AND entity_name = 'REQ_LINES';
146:
147: l_seq_num := l_seq_num + 10;
177:
178: select attached_document_id
179: into l_attachment_id
180: -- for bug 14537896
181: from fnd_attached_documents fad,
182: fnd_documents_tl fdt
183: where pk1_value=to_char(l_requisition_line_id)
184: -- and pk2_value='ONE_TIME_LOCATION';
185: and fad.document_id = fdt.document_id