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 215: --For lobs we require file id to insert data into fnd_lobs.So we get the file_id from the client

211: END IF;
212:
213:
214: --setting file id
215: --For lobs we require file id to insert data into fnd_lobs.So we get the file_id from the client
216: --For LOBS we give fileid to the server so that we can avoid the lobs getting downloaded in the client
217: --twice when its uploaded
218: IF l_data_type_id = 6 THEN
219: l_file_id := p_record.file_id;

Line 230: 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';

226: OPEN l_lobs_fileid_csr(l_file_id) ;
227: FETCH l_lobs_fileid_csr into l_dummy;
228:
229: IF l_lobs_fileid_csr%FOUND THEN
230: 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';
231: CSM_UTIL_PKG.LOG( p_error_msg ,'CSM_LOBS_PKG.UPLOAD_SR_TASK_LOB', FND_LOG.LEVEL_ERROR );
232: l_file_id := NULL;
233: --get the file id from the sequence diretly.As the client sent file id is not proper.
234: SELECT fnd_lobs_s.nextval

Line 234: SELECT fnd_lobs_s.nextval

230: 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';
231: CSM_UTIL_PKG.LOG( p_error_msg ,'CSM_LOBS_PKG.UPLOAD_SR_TASK_LOB', FND_LOG.LEVEL_ERROR );
232: l_file_id := NULL;
233: --get the file id from the sequence diretly.As the client sent file id is not proper.
234: SELECT fnd_lobs_s.nextval
235: INTO l_file_id
236: FROM dual;
237: l_dodirty := TRUE;
238: END IF;

Line 268: /* INSERT INTO fnd_lobs(file_id,

264: OPEN l_get_datatype(l_schema_name);
265: FETCH l_get_datatype INTO l_data_type;
266: CLOSE l_get_datatype;
267:
268: /* INSERT INTO fnd_lobs(file_id,
269: file_name,
270: file_content_type,
271: file_data,
272: upload_date,

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

283: WHERE file_id = l_file_id
284: AND tranid$$ = p_record.tranid$$
285: AND clid$$cs = p_record.clid$$cs;*/
286: IF l_data_type ='BLOB' THEN
287: l_dsql := 'INSERT INTO fnd_lobs(file_id,'
288: || 'file_name,'
289: || 'file_content_type,'
290: || 'file_data,'
291: || 'upload_date,'

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

303: || ' AND tranid$$ = ' || p_record.tranid$$
304: || ' AND clid$$cs = ''' || p_record.clid$$cs || '''';
305:
306: ELSE
307: l_dsql := 'INSERT INTO fnd_lobs(file_id,'
308: || 'file_name,'
309: || 'file_content_type,'
310: || 'file_data,'
311: || 'upload_date,'

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

350: END;
351:
352: END IF;--this is execulted only for lobs
353:
354: --After inserting the lobs into fnd_lobs table the attachment is added to the corresponding
355: --Entity ie to task or Debrief or SR we need to call the following API
356: fnd_webattch.add_attachment(
357: seq_num => l_seq_num,
358: category_id => l_category_id,

Line 423: p_record IN c_FND_LOBS%ROWTYPE,

419: This procedure is called by APPLY_CLIENT_CHANGES for every record in in-queue that needs to be processed.
420: ***/
421: PROCEDURE APPLY_RECORD
422: (
423: p_record IN c_FND_LOBS%ROWTYPE,
424: p_error_msg OUT NOCOPY VARCHAR2,
425: x_return_status IN OUT NOCOPY VARCHAR2
426: ) IS
427: l_error_msg varchar(1024);

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

558: FND_LOG.LEVEL_PROCEDURE);
559:
560:
561: /*** loop through CSF_M_LOBS records in inqueue ***/
562: FOR r_FND_LOBS IN c_FND_LOBS( p_user_name, p_tranid) LOOP
563:
564: SAVEPOINT save_rec;
565:
566: /*** apply record ***/

Line 569: r_FND_LOBS

565:
566: /*** apply record ***/
567: APPLY_RECORD
568: (
569: r_FND_LOBS
570: , l_error_msg
571: , l_process_status
572: );
573:

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

576: IF l_process_status = FND_API.G_RET_STS_SUCCESS THEN
577: /*** Yes -> delete record from inqueue ***/
578: CSM_UTIL_PKG.LOG
579: ( 'Record successfully processed, deleting from inqueue ' || g_object_name
580: || ' for PK ' || r_FND_LOBS.FILE_ID,
581: 'CSM_LOBS_LOBS.APPLY_CLIENT_CHANGES',
582: FND_LOG.LEVEL_EVENT );
583:
584:

Line 589: r_FND_LOBS.seqno$$,

585: CSM_UTIL_PKG.DELETE_RECORD
586: (
587: p_user_name,
588: p_tranid,
589: r_FND_LOBS.seqno$$,
590: r_FND_LOBS.FILE_ID, -- put PK column here
591: g_object_name,
592: g_pub_name,
593: l_error_msg,

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

586: (
587: p_user_name,
588: p_tranid,
589: r_FND_LOBS.seqno$$,
590: r_FND_LOBS.FILE_ID, -- put PK column here
591: g_object_name,
592: g_pub_name,
593: l_error_msg,
594: l_process_status

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

598: IF l_process_status <> FND_API.G_RET_STS_SUCCESS THEN
599: /*** no -> rollback ***/
600: CSM_UTIL_PKG.LOG
601: ( 'Deleting from inqueue failed, rolling back to savepoint for entity ' || g_object_name
602: || ' and PK ' || r_FND_LOBS.FILE_ID,
603: 'CSM_LOBS_LOBS.APPLY_CLIENT_CHANGES' ,
604: FND_LOG.LEVEL_EVENT);
605:
606: ROLLBACK TO save_rec;

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

611: /*** Record was not processed successfully or delete failed -> defer and reject record ***/
612:
613: CSM_UTIL_PKG.LOG
614: ( 'Record not processed successfully, deferring and rejecting record for entity ' || g_object_name
615: || ' and PK ' || r_FND_LOBS.FILE_ID,
616: 'CSM_LOBS_LOBS.APPLY_CLIENT_CHANGES',
617: FND_LOG.LEVEL_EVENT );
618:
619:

Line 624: , r_FND_LOBS.seqno$$

620: CSM_UTIL_PKG.DEFER_RECORD
621: (
622: p_user_name
623: , p_tranid
624: , r_FND_LOBS.seqno$$
625: , r_FND_LOBS.FILE_ID -- put PK column here
626: , g_object_name
627: , g_pub_name
628: , l_error_msg

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

621: (
622: p_user_name
623: , p_tranid
624: , r_FND_LOBS.seqno$$
625: , r_FND_LOBS.FILE_ID -- put PK column here
626: , g_object_name
627: , g_pub_name
628: , l_error_msg
629: , l_process_status

Line 630: , r_FND_LOBS.dmltype$$

626: , g_object_name
627: , g_pub_name
628: , l_error_msg
629: , l_process_status
630: , r_FND_LOBS.dmltype$$
631: );
632:
633: /*** Was defer successful? ***/
634: IF l_process_status <> FND_API.G_RET_STS_SUCCESS THEN

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

634: IF l_process_status <> FND_API.G_RET_STS_SUCCESS THEN
635: /*** no -> rollback ***/
636: CSM_UTIL_PKG.LOG
637: ( 'Defer record failed, rolling back to savepoint for entity ' || g_object_name
638: || ' and PK ' || r_FND_LOBS.FILE_ID,
639: 'CSM_LOBS_LOBS.APPLY_CLIENT_CHANGES',
640: FND_LOG.LEVEL_EVENT );
641:
642: ROLLBACK TO save_rec;