1: PACKAGE BODY GR_DOCUMENT_HEADINGS_PKG AS
2: /*$Header: GRHIDHB.pls 115.10 2002/10/28 23:01:06 mgrosser ship $*/
3: PROCEDURE Insert_Row
4: (p_commit IN VARCHAR2,
5: p_called_by_form IN VARCHAR2,
76: IF FND_API.To_Boolean(l_key_exists) THEN
77: RAISE Label_Exists_Error;
78: END IF;
79:
80: INSERT INTO gr_document_headings
81: (document_headings_seqno,
82: document_code,
83: main_heading_code,
84: main_display_order,
89: last_updated_by,
90: last_update_date,
91: last_update_login)
92: VALUES
93: (gr_document_headings_s.nextval,
94: p_document_code,
95: p_main_heading_code,
96: p_main_display_order,
97: p_sub_heading_code,
103: p_last_update_login);
104:
105: /* Get the assigned sequence number */
106:
107: SELECT gr_document_headings_s.currval
108: INTO l_current_seq
109: FROM dual;
110:
111: /* Now get the row id of the inserted record */
252:
253: IF l_return_status <> 'S' THEN
254: RAISE Foreign_Key_Error;
255: ELSE
256: UPDATE gr_document_headings
257: SET document_headings_seqno = p_document_headings_seqno,
258: document_code = p_document_code,
259: main_heading_code = p_main_heading_code,
260: main_display_order = p_main_display_order,
367: x_msg_data := NULL;
368:
369: /* Update the table */
370:
371: UPDATE gr_document_headings
372: SET main_display_order = p_main_display_order,
373: sub_display_order = p_sub_display_order,
374: last_updated_by = p_last_updated_by,
375: last_update_date = p_last_update_date,
460:
461: CURSOR c_lock_document
462: IS
463: SELECT *
464: FROM gr_document_headings
465: WHERE rowid = p_rowid
466: FOR UPDATE NOWAIT;
467: LockDocumentRcd c_lock_document%ROWTYPE;
468:
598: IF l_return_status <> 'S' THEN
599: RAISE Check_Integrity_Error;
600: END IF;
601:
602: DELETE FROM gr_document_headings
603: -- WHERE rowid = p_rowid;
604: WHERE document_headings_seqno = p_document_headings_seqno;
605:
606: /* Check the commit flag and if set, then commit the work. */
685: x_oracle_error := 0;
686: x_msg_data := NULL;
687: l_msg_token := p_document_code;
688:
689: DELETE FROM gr_document_headings
690: WHERE document_code = p_document_code;
691:
692: IF FND_API.To_Boolean(p_commit) THEN
693: COMMIT WORK;
923:
924: CURSOR c_get_document_rowid
925: IS
926: SELECT dh.rowid
927: FROM gr_document_headings dh
928: WHERE dh.document_headings_seqno = p_document_headings_seqno;
929: DocumentRecord c_get_document_rowid%ROWTYPE;
930:
931: BEGIN
982:
983: CURSOR c_lock_document
984: IS
985: SELECT last_update_date
986: FROM gr_document_headings
987: WHERE document_code = p_document_code
988: FOR UPDATE NOWAIT;
989: LockDocumentRcd c_lock_document%ROWTYPE;
990:
1042: APP_EXCEPTION.Raise_Exception;
1043:
1044: END Lock_Rows;
1045:
1046: END GR_DOCUMENT_HEADINGS_PKG;