The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT jh.je_batch_id,
jh.je_header_id,
doc.code,
jh.ledger_id,
--jh.set_of_books_id,
jh.default_effective_date
-- sob.global_attribute_category
-- nvl(sob.global_attribute2, 'N'),
-- nvl(sob.global_attribute3, 'N')
FROM
gl_sets_of_books sob,
fnd_doc_sequence_categories doc,
fnd_application a,
gl_je_headers jh,
gl_je_batches jb
WHERE
jb.actual_flag = 'A' AND
jb.posting_run_id = c_posting_run_id AND
jh.je_batch_id = jb.je_batch_id AND
jb.status = 'I' AND
jh.je_batch_id > c_last_batch_id AND
a.application_short_name = 'SQLGL' AND
doc.code = jh.je_category AND
doc.application_id = a.application_id AND
sob.set_of_books_id = jh.ledger_id; --??
SELECT category_code,
cat_application_id,
set_of_books_id, --??
days,
violation_response,
enabled_flag
FROM je_gr_cutoff_rules;
| The routine to get the sequence information and update that |
| to all the journals |
| Phases: |
| 1. Get the sequential numbering option |
| 2. Loop the Journals in the main cursor/c_headers |
| 3. IF seq. numbering is used, get the sequence |
| 4.a IF Sequence failure, update batch and header |
| with error code |
| 4.b IF Sequence failure, update batch and header |
| with sequence number and name |
| CALLED BY |
+------------------------------------------------------------------*/
PROCEDURE gl_sequence (p_posting_run_id IN NUMBER,
p_retcode IN OUT NOCOPY NUMBER,
p_errmsg IN OUT NOCOPY VARCHAR2) IS
/*v_sequence_numbering VARCHAR2(1);
UPDATE gl_je_batches
SET status = '<'
WHERE je_batch_id = v_pkg_batch_id;
UPDATE gl_je_headers
SET status = '<'
WHERE je_header_id = v_pkg_header_id;
SELECT name
INTO v_sequence_name
FROM fnd_document_sequences
WHERE doc_sequence_id = v_sequence_id;
select je_header_id into v_je_header_id
from je_gr_je_header_sequence
where je_header_id = v_pkg_header_id;
UPDATE gl_je_headers
SET global_attribute_category = v_je_attribute_category,
-- ** global_attribute1 = v_sequence_name,
-- ** global_attribute2 = v_seq_val,
external_reference = DECODE(v_pkg_append_sequence,
'Y', substr(v_seq_val || ' ' ||
v_sequence_name || ' ' ||
external_reference , 1, 80),
'N', external_reference,
external_reference)
WHERE je_header_id = v_pkg_header_id;
INSERT INTO je_gr_je_header_sequence (je_header_id,
doc_sequence_id,
doc_sequence_value,
creation_date,
created_by)
VALUES (v_pkg_header_id,
v_sequence_id,
v_seq_val,
sysdate,
FND_GLOBAL.user_id);
/*SELECT global_attribute_category
--to_number(nvl(global_attribute1, 15))**
INTO v_global
v_default_cutoff_days
FROM gl_sets_of_books
WHERE set_of_books_id = p_ledger_id;--??
UPDATE gl_je_batches
SET status = '>'
WHERE je_batch_id = v_pkg_batch_id;
UPDATE gl_je_headers
SET status = '>'
WHERE je_header_id = v_pkg_header_id;