127: l_return_status,
128: l_oracle_error,
129: l_msg_data);
130: IF l_return_status <> 'S' THEN
131: FND_FILE.PUT(FND_FILE.LOG,' Foreign Key error on insert');
132: FND_FILE.NEW_LINE(FND_FILE.LOG,1);
133: RAISE Foreign_Key_Error;
134: END IF;
135:
128: l_oracle_error,
129: l_msg_data);
130: IF l_return_status <> 'S' THEN
131: FND_FILE.PUT(FND_FILE.LOG,' Foreign Key error on insert');
132: FND_FILE.NEW_LINE(FND_FILE.LOG,1);
133: RAISE Foreign_Key_Error;
134: END IF;
135:
136: /* Now check the primary key doesn't already exist */
144: IF FND_API.To_Boolean(l_key_exists) THEN
145: RAISE Label_Exists_Error;
146: END IF;
147:
148: FND_FILE.PUT(FND_FILE.LOG,' Record does not exist:' || TO_CHAR(p_document_text_id));
149: FND_FILE.NEW_LINE(FND_FILE.LOG,1);
150:
151: INSERT INTO gr_document_print
152: (document_text_id,
145: RAISE Label_Exists_Error;
146: END IF;
147:
148: FND_FILE.PUT(FND_FILE.LOG,' Record does not exist:' || TO_CHAR(p_document_text_id));
149: FND_FILE.NEW_LINE(FND_FILE.LOG,1);
150:
151: INSERT INTO gr_document_print
152: (document_text_id,
153: document_code,
240: p_last_updated_by,
241: p_last_update_date,
242: p_last_update_login);
243:
244: FND_FILE.PUT(FND_FILE.LOG,' Insert completed');
245: FND_FILE.NEW_LINE(FND_FILE.LOG,1);
246:
247:
248: /* Now get the row id of the inserted record */
241: p_last_update_date,
242: p_last_update_login);
243:
244: FND_FILE.PUT(FND_FILE.LOG,' Insert completed');
245: FND_FILE.NEW_LINE(FND_FILE.LOG,1);
246:
247:
248: /* Now get the row id of the inserted record */
249: