304:
305: -- Set missing old record elements to NULL.
306:
307: l_old_SEG_rec :=
308: QP_Seg_Util.Convert_Miss_To_Null (l_old_SEG_rec);
309:
310: ELSIF l_SEG_rec.operation = QP_GLOBALS.G_OPR_UPDATE
311: OR l_SEG_rec.operation = QP_GLOBALS.G_OPR_DELETE
312: THEN
317:
318: IF l_old_SEG_rec.segment_id = FND_API.G_MISS_NUM
319: THEN
320:
321: l_old_SEG_rec := QP_Seg_Util.Query_Row
322: ( p_segment_id => l_SEG_rec.segment_id
323: );
324:
325: ELSE
326:
327: -- Set missing old record elements to NULL.
328:
329: l_old_SEG_rec :=
330: QP_Seg_Util.Convert_Miss_To_Null (l_old_SEG_rec);
331:
332: END IF;
333:
334: -- Complete new record from old
332: END IF;
333:
334: -- Complete new record from old
335:
336: l_SEG_rec := QP_Seg_Util.Complete_Record
337: ( p_SEG_rec => l_SEG_rec
338: , p_old_SEG_rec => l_old_SEG_rec
339: );
340:
367: -- Clear dependent attributes.
368:
369: IF l_control_rec.change_attributes THEN
370: l_p_SEG_rec := l_SEG_rec;
371: QP_Seg_Util.Clear_Dependent_Attr
372: ( p_SEG_rec => l_p_SEG_rec
373: , p_old_SEG_rec => l_old_SEG_rec
374: , x_SEG_rec => l_SEG_rec
375: );
394: IF l_control_rec.default_attributes
395: OR l_control_rec.change_attributes
396: THEN
397: l_p_SEG_rec := l_SEG_rec;
398: QP_Seg_Util.Apply_Attribute_Changes
399: ( p_SEG_rec => l_p_SEG_rec
400: , p_old_SEG_rec => l_old_SEG_rec
401: , x_SEG_rec => l_SEG_rec
402: );
437: IF l_control_rec.write_to_db THEN
438:
439: IF l_SEG_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN
440:
441: QP_Seg_Util.Delete_Row
442: ( p_segment_id => l_SEG_rec.segment_id
443: );
444:
445: ELSE
451: l_SEG_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
452:
453: IF l_SEG_rec.operation = QP_GLOBALS.G_OPR_UPDATE THEN
454:
455: QP_Seg_Util.Update_Row (l_SEG_rec);
456:
457: ELSIF l_SEG_rec.operation = QP_GLOBALS.G_OPR_CREATE THEN
458:
459: l_SEG_rec.creation_date := SYSDATE;
458:
459: l_SEG_rec.creation_date := SYSDATE;
460: l_SEG_rec.created_by := FND_GLOBAL.USER_ID;
461:
462: QP_Seg_Util.Insert_Row (l_SEG_rec);
463:
464: END IF;
465:
466: END IF;
864: FOR I IN 1..p_SEG_tbl.COUNT LOOP
865:
866: IF p_SEG_tbl(I).operation = QP_GLOBALS.G_OPR_LOCK THEN
867:
868: QP_Seg_Util.Lock_Row
869: ( p_SEG_rec => p_SEG_tbl(I)
870: , x_SEG_rec => l_SEG_rec
871: , x_return_status => l_return_status
872: );
1010: );
1011:
1012: -- Get SEG ( parent = CON )
1013:
1014: l_SEG_tbl := QP_Seg_Util.Query_Rows
1015: ( p_prc_context_id => l_CON_rec.prc_context_id
1016: );
1017:
1018: