DBA Data[Home] [Help]

APPS.IBY_TRXN_DOCUMENTS_PKG dependencies on IBY_TRXN_DOCUMENTS

Line 1: PACKAGE BODY IBY_TRXN_DOCUMENTS_PKG AS

1: PACKAGE BODY IBY_TRXN_DOCUMENTS_PKG AS
2: /* $Header: ibytxdcb.pls 120.7.12000000.3 2007/09/05 16:08:21 visundar ship $ */
3:
4:
5: G_DEBUG_MODULE CONSTANT VARCHAR2(100) := 'iby.plsql.IBY_TRXN_DOCUMENTS_PKG';

Line 5: G_DEBUG_MODULE CONSTANT VARCHAR2(100) := 'iby.plsql.IBY_TRXN_DOCUMENTS_PKG';

1: PACKAGE BODY IBY_TRXN_DOCUMENTS_PKG AS
2: /* $Header: ibytxdcb.pls 120.7.12000000.3 2007/09/05 16:08:21 visundar ship $ */
3:
4:
5: G_DEBUG_MODULE CONSTANT VARCHAR2(100) := 'iby.plsql.IBY_TRXN_DOCUMENTS_PKG';
6:
7: /* Gets the trxnmid based on (transaction id,trxntype id,status) */
8: PROCEDURE getTrxnMID
9: (

Line 80: doctype_in IN iby_trxn_documents.doctype%TYPE

76: /* Add an empty document based on the master trxn id of a trxn. */
77: PROCEDURE CreateDocument
78: (
79: trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
80: doctype_in IN iby_trxn_documents.doctype%TYPE
81: )
82: IS
83:
84: l_docid iby_trxn_documents.trxn_document_id%TYPE;

Line 84: l_docid iby_trxn_documents.trxn_document_id%TYPE;

80: doctype_in IN iby_trxn_documents.doctype%TYPE
81: )
82: IS
83:
84: l_docid iby_trxn_documents.trxn_document_id%TYPE;
85:
86: BEGIN
87: CreateDocument(trxnmid_in, doctype_in, l_docid);
88: END CreateDocument;

Line 98: doctype_in IN iby_trxn_documents.doctype%TYPE,

94: */
95: PROCEDURE CreateDocument
96: (
97: trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
98: doctype_in IN iby_trxn_documents.doctype%TYPE,
99: docid_out OUT NOCOPY iby_trxn_documents.trxn_document_id%TYPE
100: )
101: IS
102:

Line 99: docid_out OUT NOCOPY iby_trxn_documents.trxn_document_id%TYPE

95: PROCEDURE CreateDocument
96: (
97: trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
98: doctype_in IN iby_trxn_documents.doctype%TYPE,
99: docid_out OUT NOCOPY iby_trxn_documents.trxn_document_id%TYPE
100: )
101: IS
102:
103: trxn_document_id_seq NUMBER;

Line 114: INSERT INTO iby_trxn_documents (trxnmid,doctype,document,object_version_number,last_update_date,last_updated_by,creation_date,created_by,last_update_login,trxn_document_id, payment_instruction_id)

110: -- CHANGE: CATCH EXCEPTION FOR DOC UNIQUENESS CONSTRAINTS
111: -- explicitly catch the exception and return an specific
112: -- IBY_XXXX error code?
113: --
114: INSERT INTO iby_trxn_documents (trxnmid,doctype,document,object_version_number,last_update_date,last_updated_by,creation_date,created_by,last_update_login,trxn_document_id, payment_instruction_id)
115: -- object version number is 0 as the document is empty
116: --
117: VALUES (trxnmid_in,doctype_in,empty_clob(),0,sysdate,fnd_global.user_id,sysdate,fnd_global.user_id,fnd_global.login_id,trxn_document_id_seq, NULL);
118: COMMIT;

Line 122: * Retro-fit IBY_TRXN_DOCUMENTS for storing R12 FD extract -

118: COMMIT;
119: END CreateDocument;
120:
121: /*
122: * Retro-fit IBY_TRXN_DOCUMENTS for storing R12 FD extract -
123: * doctype is 100.
124: * TRXNMID is made nullable
125: * the doc will be associated with either IBY_TRXN_SUMMARIES_ALL
126: * or IBY_PAY_INSTRUCTIONS_ALL depending on the doctype.

Line 134: docid_out OUT NOCOPY iby_trxn_documents.trxn_document_id%TYPE

130: (
131: p_payment_instruction_id IN NUMBER,
132: p_doctype IN NUMBER,
133: p_doc IN CLOB,
134: docid_out OUT NOCOPY iby_trxn_documents.trxn_document_id%TYPE
135: )
136: IS
137:
138: trxn_document_id_seq NUMBER;

Line 145: INSERT INTO iby_trxn_documents (trxnmid,doctype,document,object_version_number,

141: SELECT iby_trxn_documentid_s.NEXTVAL INTO trxn_document_id_seq FROM dual;
142:
143: docid_out := trxn_document_id_seq;
144: BEGIN
145: INSERT INTO iby_trxn_documents (trxnmid,doctype,document,object_version_number,
146: last_update_date,last_updated_by,creation_date,created_by,last_update_login,
147: trxn_document_id, payment_instruction_id)
148: -- object version number is 0 as the document is empty
149: --

Line 174: doctype_in IN iby_trxn_documents.doctype%TYPE,

170: */
171: PROCEDURE CreateOrUpdateDocument
172: (
173: trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
174: doctype_in IN iby_trxn_documents.doctype%TYPE,
175: docid_out OUT NOCOPY iby_trxn_documents.trxn_document_id%TYPE
176: )
177:
178: IS

Line 175: docid_out OUT NOCOPY iby_trxn_documents.trxn_document_id%TYPE

171: PROCEDURE CreateOrUpdateDocument
172: (
173: trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
174: doctype_in IN iby_trxn_documents.doctype%TYPE,
175: docid_out OUT NOCOPY iby_trxn_documents.trxn_document_id%TYPE
176: )
177:
178: IS
179:

Line 180: l_docid iby_trxn_documents.trxn_document_id%TYPE;

176: )
177:
178: IS
179:
180: l_docid iby_trxn_documents.trxn_document_id%TYPE;
181:
182: cursor c_doc(ci_trxnmid in iby_trxn_summaries_all.trxnmid%type,
183: ci_doctype in iby_trxn_documents.doctype%type)
184: is

Line 183: ci_doctype in iby_trxn_documents.doctype%type)

179:
180: l_docid iby_trxn_documents.trxn_document_id%TYPE;
181:
182: cursor c_doc(ci_trxnmid in iby_trxn_summaries_all.trxnmid%type,
183: ci_doctype in iby_trxn_documents.doctype%type)
184: is
185: SELECT trxn_document_id
186: FROM iby_trxn_documents
187: WHERE trxnmid = ci_trxnmid

Line 186: FROM iby_trxn_documents

182: cursor c_doc(ci_trxnmid in iby_trxn_summaries_all.trxnmid%type,
183: ci_doctype in iby_trxn_documents.doctype%type)
184: is
185: SELECT trxn_document_id
186: FROM iby_trxn_documents
187: WHERE trxnmid = ci_trxnmid
188: AND doctype = ci_doctype;
189:
190: BEGIN

Line 210: UPDATE iby_trxn_documents SET

206: -- If we don't do this, the existing
207: -- CLOB gets overwritten by a new CLOB,
208: -- but we get XML parse errors.
209: --
210: UPDATE iby_trxn_documents SET
211: document=empty_clob()
212: WHERE
213: trxnmid = trxnmid_in
214: AND doctype = doctype_in;

Line 231: doctype_in IN iby_trxn_documents.doctype%TYPE

227: (
228: transactionid_in IN iby_trxn_summaries_all.transactionid%TYPE,
229: trxntypeid_in IN iby_trxn_summaries_all.trxntypeid%TYPE,
230: status_in IN iby_trxn_summaries_all.status%TYPE,
231: doctype_in IN iby_trxn_documents.doctype%TYPE
232: )
233: IS
234: l_mtrxnid iby_trxn_summaries_all.trxnmid%TYPE;
235: BEGIN

Line 245: doctype_in IN iby_trxn_documents.doctype%TYPE

241: /* Delete a document based on the master trxn id of a trxn. */
242: PROCEDURE DeleteDocument
243: (
244: trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
245: doctype_in IN iby_trxn_documents.doctype%TYPE
246: )
247: IS
248: BEGIN
249: DELETE FROM iby_trxn_documents WHERE (trxnmid=trxnmid_in) AND (doctype=doctype_in);

Line 249: DELETE FROM iby_trxn_documents WHERE (trxnmid=trxnmid_in) AND (doctype=doctype_in);

245: doctype_in IN iby_trxn_documents.doctype%TYPE
246: )
247: IS
248: BEGIN
249: DELETE FROM iby_trxn_documents WHERE (trxnmid=trxnmid_in) AND (doctype=doctype_in);
250: COMMIT;
251: END DeleteDocument;
252:
253:

Line 260: doctype_in IN iby_trxn_documents.doctype%TYPE

256: (
257: transactionid_in IN iby_trxn_summaries_all.transactionid%TYPE,
258: trxntypeid_in IN iby_trxn_summaries_all.trxntypeid%TYPE,
259: status_in IN iby_trxn_summaries_all.status%TYPE,
260: doctype_in IN iby_trxn_documents.doctype%TYPE
261: )
262: IS
263: l_mtrxnid iby_trxn_summaries_all.trxnmid%TYPE;
264: BEGIN

Line 276: doctype_in IN iby_trxn_documents.doctype%TYPE,

272: (
273: transactionid_in IN iby_trxn_summaries_all.transactionid%TYPE,
274: trxntypeid_in IN iby_trxn_summaries_all.trxntypeid%TYPE,
275: status_in IN iby_trxn_summaries_all.status%TYPE,
276: doctype_in IN iby_trxn_documents.doctype%TYPE,
277: read_only_in IN INTEGER,
278: document_out OUT NOCOPY iby_trxn_documents.document%TYPE
279: )
280: IS

Line 278: document_out OUT NOCOPY iby_trxn_documents.document%TYPE

274: trxntypeid_in IN iby_trxn_summaries_all.trxntypeid%TYPE,
275: status_in IN iby_trxn_summaries_all.status%TYPE,
276: doctype_in IN iby_trxn_documents.doctype%TYPE,
277: read_only_in IN INTEGER,
278: document_out OUT NOCOPY iby_trxn_documents.document%TYPE
279: )
280: IS
281: l_trxnmid iby_trxn_summaries_all.trxnmid%TYPE;
282: BEGIN

Line 292: doctype_in IN iby_trxn_documents.doctype%TYPE,

288: /* Fetch a document based on (trxnmid,doctype) */
289: PROCEDURE FetchDocument
290: (
291: trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
292: doctype_in IN iby_trxn_documents.doctype%TYPE,
293: read_only_in IN INTEGER,
294: document_out OUT NOCOPY iby_trxn_documents.document%TYPE
295: )
296: IS

Line 294: document_out OUT NOCOPY iby_trxn_documents.document%TYPE

290: (
291: trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
292: doctype_in IN iby_trxn_documents.doctype%TYPE,
293: read_only_in IN INTEGER,
294: document_out OUT NOCOPY iby_trxn_documents.document%TYPE
295: )
296: IS
297: BEGIN
298: IF (read_only_in=C_FETCH_READWRITE) THEN

Line 301: UPDATE iby_trxn_documents

297: BEGIN
298: IF (read_only_in=C_FETCH_READWRITE) THEN
299: -- not read only so we update the last change information
300: --
301: UPDATE iby_trxn_documents
302: SET object_version_number=object_version_number+1, last_update_date=sysdate,last_updated_by=fnd_global.user_id,last_update_login=fnd_global.login_id
303: WHERE (trxnmid=trxnmid_in) AND (doctype=doctype_in);
304: COMMIT;
305:

Line 307: FROM iby_trxn_documents

303: WHERE (trxnmid=trxnmid_in) AND (doctype=doctype_in);
304: COMMIT;
305:
306: SELECT document INTO document_out
307: FROM iby_trxn_documents
308: WHERE (trxnmid=trxnmid_in) AND (doctype=doctype_in) FOR UPDATE;
309: -- must select as for update it to be able to write to it
310: -- from JDBC
311: ELSE

Line 313: FROM iby_trxn_documents

309: -- must select as for update it to be able to write to it
310: -- from JDBC
311: ELSE
312: SELECT document INTO document_out
313: FROM iby_trxn_documents
314: WHERE (trxnmid=trxnmid_in) AND (doctype=doctype_in);
315: END IF;
316:
317: EXCEPTION

Line 331: document_out OUT NOCOPY iby_trxn_documents.document%TYPE

327: (
328: p_payment_instruction_id IN NUMBER,
329: p_doctype IN NUMBER,
330: read_only_in IN INTEGER DEFAULT C_FETCH_READONLY,
331: document_out OUT NOCOPY iby_trxn_documents.document%TYPE
332: )
333: IS
334: l_Debug_Module VARCHAR2(255) := G_DEBUG_MODULE || '.FetchDisbursementDocument';
335: CURSOR l_doc_csr (p_payment_instruction_id IN NUMBER, p_doctype IN NUMBER) IS

Line 337: FROM iby_trxn_documents

333: IS
334: l_Debug_Module VARCHAR2(255) := G_DEBUG_MODULE || '.FetchDisbursementDocument';
335: CURSOR l_doc_csr (p_payment_instruction_id IN NUMBER, p_doctype IN NUMBER) IS
336: SELECT document INTO document_out
337: FROM iby_trxn_documents
338: WHERE (payment_instruction_id=p_payment_instruction_id) AND (doctype=p_doctype) and rownum = 1
339: ORDER BY trxn_document_id asc;
340:
341: BEGIN

Line 365: UPDATE iby_trxn_documents

361: document_out := null;
362: /*
363: -- not read only so we update the last change information
364: --
365: UPDATE iby_trxn_documents
366: SET object_version_number=object_version_number+1, last_update_date=sysdate,last_updated_by=fnd_global.user_id,last_update_login=fnd_global.login_id
367: WHERE (payment_instruction_id=p_payment_instruction_id) AND (doctype=p_doctype);
368: COMMIT;
369:

Line 371: FROM iby_trxn_documents

367: WHERE (payment_instruction_id=p_payment_instruction_id) AND (doctype=p_doctype);
368: COMMIT;
369:
370: SELECT document INTO document_out
371: FROM iby_trxn_documents
372: WHERE (payment_instruction_id=p_payment_instruction_id) AND (doctype=p_doctype) FOR UPDATE;
373: -- must select as for update it to be able to write to it
374: -- from JDBC
375: */

Line 407: END IBY_TRXN_DOCUMENTS_PKG;

403:
404:
405:
406:
407: END IBY_TRXN_DOCUMENTS_PKG;