6: -- MODIFICATION HISTORY
7: -- Person Date Comments
8: -- --------- ------ ------------------------------------------
9: -- Sri Rangarajan 01/06/2002 Created Package
10: -- shitij.vatsa 11/04/2002 Updated for FND_API.G_MISS_XXX
11: -- shitij.vatsa 02/11/2003 Added parameter p_subitem_version_id
12: -- to the APIs
13: -- SHARMA 07/04/2005 Modified LOAD_ROW, TRANSLATE_ROW and created
14: -- LOAD_SEED_ROW for R12 LCT standards bug 4411674
38:
39: -- Primary key validation check
40:
41: IF ((px_compound_relation_id IS NULL) OR
42: (px_compound_relation_id = FND_API.G_MISS_NUM))
43: THEN
44: OPEN c2;
45: FETCH c2 INTO px_compound_relation_id;
46: CLOSE c2;
66: ,p_attribute_type_code
67: ,p_content_type_code
68: ,p_citem_version_id
69: ,p_sort_order
70: ,DECODE(p_object_version_number,FND_API.G_MISS_NUM,1,NULL,1,p_object_version_number)
71: ,DECODE(p_creation_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_creation_date)
72: ,DECODE(p_created_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_created_by)
73: ,DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
74: ,DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
67: ,p_content_type_code
68: ,p_citem_version_id
69: ,p_sort_order
70: ,DECODE(p_object_version_number,FND_API.G_MISS_NUM,1,NULL,1,p_object_version_number)
71: ,DECODE(p_creation_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_creation_date)
72: ,DECODE(p_created_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_created_by)
73: ,DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
74: ,DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
75: ,DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
68: ,p_citem_version_id
69: ,p_sort_order
70: ,DECODE(p_object_version_number,FND_API.G_MISS_NUM,1,NULL,1,p_object_version_number)
71: ,DECODE(p_creation_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_creation_date)
72: ,DECODE(p_created_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_created_by)
73: ,DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
74: ,DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
75: ,DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
76: ,p_subitem_version_id
69: ,p_sort_order
70: ,DECODE(p_object_version_number,FND_API.G_MISS_NUM,1,NULL,1,p_object_version_number)
71: ,DECODE(p_creation_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_creation_date)
72: ,DECODE(p_created_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_created_by)
73: ,DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
74: ,DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
75: ,DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
76: ,p_subitem_version_id
77: );
70: ,DECODE(p_object_version_number,FND_API.G_MISS_NUM,1,NULL,1,p_object_version_number)
71: ,DECODE(p_creation_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_creation_date)
72: ,DECODE(p_created_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_created_by)
73: ,DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
74: ,DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
75: ,DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
76: ,p_subitem_version_id
77: );
78:
71: ,DECODE(p_creation_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_creation_date)
72: ,DECODE(p_created_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_created_by)
73: ,DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
74: ,DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
75: ,DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
76: ,p_subitem_version_id
77: );
78:
79: OPEN c;
137: ,p_subitem_version_id IN NUMBER --DEFAULT NULL
138: ) IS
139: BEGIN
140: UPDATE IBC_COMPOUND_RELATIONS SET
141: content_item_id = DECODE(p_content_item_id,FND_API.G_MISS_NUM,NULL,NULL,content_item_id,p_content_item_id)
142: ,attribute_type_code = DECODE(p_attribute_type_code,FND_API.G_MISS_CHAR,NULL,NULL,attribute_type_code,p_attribute_type_code)
143: ,content_type_code = DECODE(p_content_type_code,FND_API.G_MISS_CHAR,NULL,NULL,content_type_code,p_content_type_code)
144: ,citem_version_id = DECODE(p_citem_version_id,FND_API.G_MISS_NUM,NULL,NULL,citem_version_id,p_citem_version_id)
145: ,sort_order = DECODE(p_sort_order,FND_API.G_MISS_NUM,NULL,NULL,sort_order,p_sort_order)
138: ) IS
139: BEGIN
140: UPDATE IBC_COMPOUND_RELATIONS SET
141: content_item_id = DECODE(p_content_item_id,FND_API.G_MISS_NUM,NULL,NULL,content_item_id,p_content_item_id)
142: ,attribute_type_code = DECODE(p_attribute_type_code,FND_API.G_MISS_CHAR,NULL,NULL,attribute_type_code,p_attribute_type_code)
143: ,content_type_code = DECODE(p_content_type_code,FND_API.G_MISS_CHAR,NULL,NULL,content_type_code,p_content_type_code)
144: ,citem_version_id = DECODE(p_citem_version_id,FND_API.G_MISS_NUM,NULL,NULL,citem_version_id,p_citem_version_id)
145: ,sort_order = DECODE(p_sort_order,FND_API.G_MISS_NUM,NULL,NULL,sort_order,p_sort_order)
146: ,object_version_number = NVL(object_version_number,0) + 1
139: BEGIN
140: UPDATE IBC_COMPOUND_RELATIONS SET
141: content_item_id = DECODE(p_content_item_id,FND_API.G_MISS_NUM,NULL,NULL,content_item_id,p_content_item_id)
142: ,attribute_type_code = DECODE(p_attribute_type_code,FND_API.G_MISS_CHAR,NULL,NULL,attribute_type_code,p_attribute_type_code)
143: ,content_type_code = DECODE(p_content_type_code,FND_API.G_MISS_CHAR,NULL,NULL,content_type_code,p_content_type_code)
144: ,citem_version_id = DECODE(p_citem_version_id,FND_API.G_MISS_NUM,NULL,NULL,citem_version_id,p_citem_version_id)
145: ,sort_order = DECODE(p_sort_order,FND_API.G_MISS_NUM,NULL,NULL,sort_order,p_sort_order)
146: ,object_version_number = NVL(object_version_number,0) + 1
147: ,last_update_date = DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
140: UPDATE IBC_COMPOUND_RELATIONS SET
141: content_item_id = DECODE(p_content_item_id,FND_API.G_MISS_NUM,NULL,NULL,content_item_id,p_content_item_id)
142: ,attribute_type_code = DECODE(p_attribute_type_code,FND_API.G_MISS_CHAR,NULL,NULL,attribute_type_code,p_attribute_type_code)
143: ,content_type_code = DECODE(p_content_type_code,FND_API.G_MISS_CHAR,NULL,NULL,content_type_code,p_content_type_code)
144: ,citem_version_id = DECODE(p_citem_version_id,FND_API.G_MISS_NUM,NULL,NULL,citem_version_id,p_citem_version_id)
145: ,sort_order = DECODE(p_sort_order,FND_API.G_MISS_NUM,NULL,NULL,sort_order,p_sort_order)
146: ,object_version_number = NVL(object_version_number,0) + 1
147: ,last_update_date = DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
148: ,last_updated_by = DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
141: content_item_id = DECODE(p_content_item_id,FND_API.G_MISS_NUM,NULL,NULL,content_item_id,p_content_item_id)
142: ,attribute_type_code = DECODE(p_attribute_type_code,FND_API.G_MISS_CHAR,NULL,NULL,attribute_type_code,p_attribute_type_code)
143: ,content_type_code = DECODE(p_content_type_code,FND_API.G_MISS_CHAR,NULL,NULL,content_type_code,p_content_type_code)
144: ,citem_version_id = DECODE(p_citem_version_id,FND_API.G_MISS_NUM,NULL,NULL,citem_version_id,p_citem_version_id)
145: ,sort_order = DECODE(p_sort_order,FND_API.G_MISS_NUM,NULL,NULL,sort_order,p_sort_order)
146: ,object_version_number = NVL(object_version_number,0) + 1
147: ,last_update_date = DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
148: ,last_updated_by = DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
149: ,last_update_login = DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
143: ,content_type_code = DECODE(p_content_type_code,FND_API.G_MISS_CHAR,NULL,NULL,content_type_code,p_content_type_code)
144: ,citem_version_id = DECODE(p_citem_version_id,FND_API.G_MISS_NUM,NULL,NULL,citem_version_id,p_citem_version_id)
145: ,sort_order = DECODE(p_sort_order,FND_API.G_MISS_NUM,NULL,NULL,sort_order,p_sort_order)
146: ,object_version_number = NVL(object_version_number,0) + 1
147: ,last_update_date = DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
148: ,last_updated_by = DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
149: ,last_update_login = DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
150: ,subitem_version_id = DECODE(p_subitem_version_id,FND_API.G_MISS_NUM,NULL,NULL,subitem_version_id,p_subitem_version_id)
151: WHERE compound_relation_id = p_compound_relation_id;
144: ,citem_version_id = DECODE(p_citem_version_id,FND_API.G_MISS_NUM,NULL,NULL,citem_version_id,p_citem_version_id)
145: ,sort_order = DECODE(p_sort_order,FND_API.G_MISS_NUM,NULL,NULL,sort_order,p_sort_order)
146: ,object_version_number = NVL(object_version_number,0) + 1
147: ,last_update_date = DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
148: ,last_updated_by = DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
149: ,last_update_login = DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
150: ,subitem_version_id = DECODE(p_subitem_version_id,FND_API.G_MISS_NUM,NULL,NULL,subitem_version_id,p_subitem_version_id)
151: WHERE compound_relation_id = p_compound_relation_id;
152:
145: ,sort_order = DECODE(p_sort_order,FND_API.G_MISS_NUM,NULL,NULL,sort_order,p_sort_order)
146: ,object_version_number = NVL(object_version_number,0) + 1
147: ,last_update_date = DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
148: ,last_updated_by = DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
149: ,last_update_login = DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
150: ,subitem_version_id = DECODE(p_subitem_version_id,FND_API.G_MISS_NUM,NULL,NULL,subitem_version_id,p_subitem_version_id)
151: WHERE compound_relation_id = p_compound_relation_id;
152:
153: -- Ignore object_version number as this table will always be updated in conjuction
146: ,object_version_number = NVL(object_version_number,0) + 1
147: ,last_update_date = DECODE(p_last_update_date,FND_API.G_MISS_DATE,SYSDATE,NULL,SYSDATE,p_last_update_date)
148: ,last_updated_by = DECODE(p_last_updated_by,FND_API.G_MISS_NUM,FND_GLOBAL.user_id,NULL,FND_GLOBAL.user_id,p_last_updated_by)
149: ,last_update_login = DECODE(p_last_update_login,FND_API.G_MISS_NUM,FND_GLOBAL.login_id,NULL,FND_GLOBAL.user_id,p_last_update_login)
150: ,subitem_version_id = DECODE(p_subitem_version_id,FND_API.G_MISS_NUM,NULL,NULL,subitem_version_id,p_subitem_version_id)
151: WHERE compound_relation_id = p_compound_relation_id;
152:
153: -- Ignore object_version number as this table will always be updated in conjuction
154: -- with
152:
153: -- Ignore object_version number as this table will always be updated in conjuction
154: -- with
155: /* AND object_version_number = DECODE(p_object_version_number,
156: FND_API.G_MISS_NUM,
157: object_version_number,
158: NULL,
159: object_version_number,
160: p_object_version_number);*/
221: p_LAST_UPDATE_DATE IN VARCHAR2) IS
222:
223: l_user_id NUMBER := 0;
224: l_row_id VARCHAR2(64);
225: lx_object_version_number NUMBER := FND_API.G_MISS_NUM;
226: lx_COMPOUND_RELATION_ID NUMBER := p_COMPOUND_RELATION_ID;
227: l_last_update_date DATE;
228:
229: db_user_id NUMBER := 0;
244: IF (FND_LOAD_UTIL.UPLOAD_TEST(l_user_id, l_last_update_date,
245: db_user_id, db_last_update_date, p_upload_mode )) THEN
246:
247: UPDATE_ROW (
248: p_compound_relation_id => NVL(p_compound_relation_id,FND_API.G_MISS_NUM)
249: ,p_content_item_id => NVL(p_content_item_id,FND_API.G_MISS_NUM)
250: ,p_attribute_type_code => NVL(p_attribute_type_code,FND_API.G_MISS_CHAR)
251: ,p_content_type_code => NVL(p_content_type_code,FND_API.G_MISS_CHAR)
252: ,p_citem_version_id => NVL(p_citem_version_id,FND_API.G_MISS_NUM)
245: db_user_id, db_last_update_date, p_upload_mode )) THEN
246:
247: UPDATE_ROW (
248: p_compound_relation_id => NVL(p_compound_relation_id,FND_API.G_MISS_NUM)
249: ,p_content_item_id => NVL(p_content_item_id,FND_API.G_MISS_NUM)
250: ,p_attribute_type_code => NVL(p_attribute_type_code,FND_API.G_MISS_CHAR)
251: ,p_content_type_code => NVL(p_content_type_code,FND_API.G_MISS_CHAR)
252: ,p_citem_version_id => NVL(p_citem_version_id,FND_API.G_MISS_NUM)
253: ,p_sort_order => NVL(p_sort_order,FND_API.G_MISS_NUM)
246:
247: UPDATE_ROW (
248: p_compound_relation_id => NVL(p_compound_relation_id,FND_API.G_MISS_NUM)
249: ,p_content_item_id => NVL(p_content_item_id,FND_API.G_MISS_NUM)
250: ,p_attribute_type_code => NVL(p_attribute_type_code,FND_API.G_MISS_CHAR)
251: ,p_content_type_code => NVL(p_content_type_code,FND_API.G_MISS_CHAR)
252: ,p_citem_version_id => NVL(p_citem_version_id,FND_API.G_MISS_NUM)
253: ,p_sort_order => NVL(p_sort_order,FND_API.G_MISS_NUM)
254: ,p_last_updated_by => l_user_id
247: UPDATE_ROW (
248: p_compound_relation_id => NVL(p_compound_relation_id,FND_API.G_MISS_NUM)
249: ,p_content_item_id => NVL(p_content_item_id,FND_API.G_MISS_NUM)
250: ,p_attribute_type_code => NVL(p_attribute_type_code,FND_API.G_MISS_CHAR)
251: ,p_content_type_code => NVL(p_content_type_code,FND_API.G_MISS_CHAR)
252: ,p_citem_version_id => NVL(p_citem_version_id,FND_API.G_MISS_NUM)
253: ,p_sort_order => NVL(p_sort_order,FND_API.G_MISS_NUM)
254: ,p_last_updated_by => l_user_id
255: ,p_last_update_date => SYSDATE
248: p_compound_relation_id => NVL(p_compound_relation_id,FND_API.G_MISS_NUM)
249: ,p_content_item_id => NVL(p_content_item_id,FND_API.G_MISS_NUM)
250: ,p_attribute_type_code => NVL(p_attribute_type_code,FND_API.G_MISS_CHAR)
251: ,p_content_type_code => NVL(p_content_type_code,FND_API.G_MISS_CHAR)
252: ,p_citem_version_id => NVL(p_citem_version_id,FND_API.G_MISS_NUM)
253: ,p_sort_order => NVL(p_sort_order,FND_API.G_MISS_NUM)
254: ,p_last_updated_by => l_user_id
255: ,p_last_update_date => SYSDATE
256: ,p_last_update_login => 0
249: ,p_content_item_id => NVL(p_content_item_id,FND_API.G_MISS_NUM)
250: ,p_attribute_type_code => NVL(p_attribute_type_code,FND_API.G_MISS_CHAR)
251: ,p_content_type_code => NVL(p_content_type_code,FND_API.G_MISS_CHAR)
252: ,p_citem_version_id => NVL(p_citem_version_id,FND_API.G_MISS_NUM)
253: ,p_sort_order => NVL(p_sort_order,FND_API.G_MISS_NUM)
254: ,p_last_updated_by => l_user_id
255: ,p_last_update_date => SYSDATE
256: ,p_last_update_login => 0
257: ,p_object_version_number => NULL
254: ,p_last_updated_by => l_user_id
255: ,p_last_update_date => SYSDATE
256: ,p_last_update_login => 0
257: ,p_object_version_number => NULL
258: ,p_subitem_version_id => NVL(p_subitem_version_id,FND_API.G_MISS_NUM)
259: );
260: END IF;
261:
262: EXCEPTION