DBA Data[Home] [Help]

APPS.CSM_LOBS_PKG dependencies on FND_LOBS

Line 17: CURSOR c_FND_LOBS( b_user_name VARCHAR2, b_tranid NUMBER) is

13: g_object_name CONSTANT VARCHAR2(30) := 'CSM_LOBS_PKG'; -- package name
14: g_pub_name CONSTANT VARCHAR2(30) := 'CSF_M_LOBS'; -- publication item name
15: g_debug_level NUMBER; -- debug level
16:
17: CURSOR c_FND_LOBS( b_user_name VARCHAR2, b_tranid NUMBER) is
18: SELECT
19: CLID$$CS,
20: FILE_ID,
21: TASK_ASSIGNMENT_ID,

Line 57: p_record IN c_FND_LOBS%ROWTYPE,

53: ***/
54:
55: PROCEDURE APPLY_INSERT
56: (
57: p_record IN c_FND_LOBS%ROWTYPE,
58: p_error_msg OUT NOCOPY VARCHAR2,
59: x_return_status IN OUT NOCOPY VARCHAR2
60: ) IS
61:

Line 127: CURSOR l_lobs_fileid_csr (p_file_id fnd_lobs.file_id%TYPE)

123: WHERE name = p_category_name
124: AND LANGUAGE = p_language;
125:
126: --to check if the record exists in the database
127: CURSOR l_lobs_fileid_csr (p_file_id fnd_lobs.file_id%TYPE)
128: IS
129: SELECT 1
130: FROM fnd_lobs
131: WHERE file_id = p_file_id;

Line 130: FROM fnd_lobs

126: --to check if the record exists in the database
127: CURSOR l_lobs_fileid_csr (p_file_id fnd_lobs.file_id%TYPE)
128: IS
129: SELECT 1
130: FROM fnd_lobs
131: WHERE file_id = p_file_id;
132:
133: CURSOR l_get_language(p_user_name IN VARCHAR2)
134: IS

Line 226: --For lobs we require file id to insert data into fnd_lobs.So we get the file_id from the client

222: END IF;
223:
224:
225: --setting file id
226: --For lobs we require file id to insert data into fnd_lobs.So we get the file_id from the client
227: --For LOBS we give fileid to the server so that we can avoid the lobs getting downloaded in the client
228: --twice when its uploaded
229: IF l_data_type_id = 6 THEN
230: l_file_id := p_record.file_id;

Line 241: p_error_msg := 'Duplicate Record: File id ' || to_char(l_file_id)|| ' already exists in fnd_lobs table.So generating a new from fnd sequence';

237: OPEN l_lobs_fileid_csr(l_file_id) ;
238: FETCH l_lobs_fileid_csr into l_dummy;
239:
240: IF l_lobs_fileid_csr%FOUND THEN
241: p_error_msg := 'Duplicate Record: File id ' || to_char(l_file_id)|| ' already exists in fnd_lobs table.So generating a new from fnd sequence';
242: CSM_UTIL_PKG.LOG( p_error_msg ,'CSM_LOBS_PKG.UPLOAD_SR_TASK_LOB', FND_LOG.LEVEL_ERROR );
243: l_file_id := NULL;
244: --get the file id from the sequence diretly.As the client sent file id is not proper.
245: SELECT fnd_lobs_s.nextval

Line 245: SELECT fnd_lobs_s.nextval

241: p_error_msg := 'Duplicate Record: File id ' || to_char(l_file_id)|| ' already exists in fnd_lobs table.So generating a new from fnd sequence';
242: CSM_UTIL_PKG.LOG( p_error_msg ,'CSM_LOBS_PKG.UPLOAD_SR_TASK_LOB', FND_LOG.LEVEL_ERROR );
243: l_file_id := NULL;
244: --get the file id from the sequence diretly.As the client sent file id is not proper.
245: SELECT fnd_lobs_s.nextval
246: INTO l_file_id
247: FROM dual;
248: l_dodirty := TRUE;
249: END IF;

Line 279: /* INSERT INTO fnd_lobs(file_id,

275: OPEN l_get_datatype(l_schema_name);
276: FETCH l_get_datatype INTO l_data_type;
277: CLOSE l_get_datatype;
278:
279: /* INSERT INTO fnd_lobs(file_id,
280: file_name,
281: file_content_type,
282: file_data,
283: upload_date,

Line 298: l_dsql := 'INSERT INTO fnd_lobs(file_id,'

294: WHERE file_id = l_file_id
295: AND tranid$$ = p_record.tranid$$
296: AND clid$$cs = p_record.clid$$cs;*/
297: IF l_data_type ='BLOB' THEN
298: l_dsql := 'INSERT INTO fnd_lobs(file_id,'
299: || 'file_name,'
300: || 'file_content_type,'
301: || 'file_data,'
302: || 'upload_date,'

Line 318: l_dsql := 'INSERT INTO fnd_lobs(file_id,'

314: || ' AND tranid$$ = ' || p_record.tranid$$
315: || ' AND clid$$cs = ''' || p_record.clid$$cs || '''';
316:
317: ELSE
318: l_dsql := 'INSERT INTO fnd_lobs(file_id,'
319: || 'file_name,'
320: || 'file_content_type,'
321: || 'file_data,'
322: || 'upload_date,'

Line 365: --After inserting the lobs into fnd_lobs table the attachment is added to the corresponding

361: END;
362:
363: END IF;--this is execulted only for lobs
364:
365: --After inserting the lobs into fnd_lobs table the attachment is added to the corresponding
366: --Entity ie to task or Debrief or SR we need to call the following API
367: fnd_webattch.add_attachment(
368: seq_num => l_seq_num,
369: category_id => l_category_id,

Line 434: p_record IN c_FND_LOBS%ROWTYPE,

430: This procedure is called by APPLY_CLIENT_CHANGES for every record in in-queue that needs to be processed.
431: ***/
432: PROCEDURE APPLY_RECORD
433: (
434: p_record IN c_FND_LOBS%ROWTYPE,
435: p_error_msg OUT NOCOPY VARCHAR2,
436: x_return_status IN OUT NOCOPY VARCHAR2
437: ) IS
438: l_error_msg varchar(1024);

Line 573: FOR r_FND_LOBS IN c_FND_LOBS( p_user_name, p_tranid) LOOP

569: FND_LOG.LEVEL_PROCEDURE);
570:
571:
572: /*** loop through CSF_M_LOBS records in inqueue ***/
573: FOR r_FND_LOBS IN c_FND_LOBS( p_user_name, p_tranid) LOOP
574:
575: SAVEPOINT save_rec;
576:
577: /*** apply record ***/

Line 580: r_FND_LOBS

576:
577: /*** apply record ***/
578: APPLY_RECORD
579: (
580: r_FND_LOBS
581: , l_error_msg
582: , l_process_status
583: );
584:

Line 591: || ' for PK ' || r_FND_LOBS.FILE_ID,

587: IF l_process_status = FND_API.G_RET_STS_SUCCESS THEN
588: /*** Yes -> delete record from inqueue ***/
589: CSM_UTIL_PKG.LOG
590: ( 'Record successfully processed, deleting from inqueue ' || g_object_name
591: || ' for PK ' || r_FND_LOBS.FILE_ID,
592: 'CSM_LOBS_LOBS.APPLY_CLIENT_CHANGES',
593: FND_LOG.LEVEL_EVENT );
594:
595:

Line 600: r_FND_LOBS.seqno$$,

596: CSM_UTIL_PKG.DELETE_RECORD
597: (
598: p_user_name,
599: p_tranid,
600: r_FND_LOBS.seqno$$,
601: r_FND_LOBS.FILE_ID, -- put PK column here
602: g_object_name,
603: g_pub_name,
604: l_error_msg,

Line 601: r_FND_LOBS.FILE_ID, -- put PK column here

597: (
598: p_user_name,
599: p_tranid,
600: r_FND_LOBS.seqno$$,
601: r_FND_LOBS.FILE_ID, -- put PK column here
602: g_object_name,
603: g_pub_name,
604: l_error_msg,
605: l_process_status

Line 613: || ' and PK ' || r_FND_LOBS.FILE_ID,

609: IF l_process_status <> FND_API.G_RET_STS_SUCCESS THEN
610: /*** no -> rollback ***/
611: CSM_UTIL_PKG.LOG
612: ( 'Deleting from inqueue failed, rolling back to savepoint for entity ' || g_object_name
613: || ' and PK ' || r_FND_LOBS.FILE_ID,
614: 'CSM_LOBS_LOBS.APPLY_CLIENT_CHANGES' ,
615: FND_LOG.LEVEL_EVENT);
616:
617: ROLLBACK TO save_rec;

Line 626: || ' and PK ' || r_FND_LOBS.FILE_ID,

622: /*** Record was not processed successfully or delete failed -> defer and reject record ***/
623:
624: CSM_UTIL_PKG.LOG
625: ( 'Record not processed successfully, deferring and rejecting record for entity ' || g_object_name
626: || ' and PK ' || r_FND_LOBS.FILE_ID,
627: 'CSM_LOBS_LOBS.APPLY_CLIENT_CHANGES',
628: FND_LOG.LEVEL_EVENT );
629:
630:

Line 635: , r_FND_LOBS.seqno$$

631: CSM_UTIL_PKG.DEFER_RECORD
632: (
633: p_user_name
634: , p_tranid
635: , r_FND_LOBS.seqno$$
636: , r_FND_LOBS.FILE_ID -- put PK column here
637: , g_object_name
638: , g_pub_name
639: , l_error_msg

Line 636: , r_FND_LOBS.FILE_ID -- put PK column here

632: (
633: p_user_name
634: , p_tranid
635: , r_FND_LOBS.seqno$$
636: , r_FND_LOBS.FILE_ID -- put PK column here
637: , g_object_name
638: , g_pub_name
639: , l_error_msg
640: , l_process_status

Line 641: , r_FND_LOBS.dmltype$$

637: , g_object_name
638: , g_pub_name
639: , l_error_msg
640: , l_process_status
641: , r_FND_LOBS.dmltype$$
642: );
643:
644: /*** Was defer successful? ***/
645: IF l_process_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 649: || ' and PK ' || r_FND_LOBS.FILE_ID,

645: IF l_process_status <> FND_API.G_RET_STS_SUCCESS THEN
646: /*** no -> rollback ***/
647: CSM_UTIL_PKG.LOG
648: ( 'Defer record failed, rolling back to savepoint for entity ' || g_object_name
649: || ' and PK ' || r_FND_LOBS.FILE_ID,
650: 'CSM_LOBS_LOBS.APPLY_CLIENT_CHANGES',
651: FND_LOG.LEVEL_EVENT );
652:
653: ROLLBACK TO save_rec;