131: -- =========================================================================
132: -- Validate Environment
133: -- =========================================================================
134:
135: IF FND_GLOBAL.User_Id IS NULL
136: THEN
137: AMS_Utility_PVT.Error_Message(p_message_name => 'USER_PROFILE_MISSING');
138: RAISE FND_API.G_EXC_ERROR;
139: END IF;
174: product_service_flag
175: ) VALUES (
176: DECODE( l_template_id, FND_API.g_miss_num, NULL, l_template_id)
177: ,SYSDATE
178: ,fnd_global.user_id
179: ,SYSDATE
180: ,fnd_global.user_id
181: ,l_object_version_number
182: ,FND_GLOBAL.CONC_LOGIN_ID
176: DECODE( l_template_id, FND_API.g_miss_num, NULL, l_template_id)
177: ,SYSDATE
178: ,fnd_global.user_id
179: ,SYSDATE
180: ,fnd_global.user_id
181: ,l_object_version_number
182: ,FND_GLOBAL.CONC_LOGIN_ID
183: ,DECODE( p_prod_template_rec.product_service_flag, FND_API.g_miss_char, NULL, p_prod_template_rec.product_service_flag)
184: );
178: ,fnd_global.user_id
179: ,SYSDATE
180: ,fnd_global.user_id
181: ,l_object_version_number
182: ,FND_GLOBAL.CONC_LOGIN_ID
183: ,DECODE( p_prod_template_rec.product_service_flag, FND_API.g_miss_char, NULL, p_prod_template_rec.product_service_flag)
184: );
185:
186:
199: DECODE( l_template_id, FND_API.g_miss_num, NULL, l_template_id),
200: l.language_code,
201: USERENV('LANG'),
202: sysdate,
203: FND_GLOBAL.user_id,
204: FND_GLOBAL.conc_login_id,
205: sysdate,
206: FND_GLOBAL.user_id,
207: DECODE( p_prod_template_rec.template_name, FND_API.g_miss_char, NULL, p_prod_template_rec.template_name),
200: l.language_code,
201: USERENV('LANG'),
202: sysdate,
203: FND_GLOBAL.user_id,
204: FND_GLOBAL.conc_login_id,
205: sysdate,
206: FND_GLOBAL.user_id,
207: DECODE( p_prod_template_rec.template_name, FND_API.g_miss_char, NULL, p_prod_template_rec.template_name),
208: DECODE( p_prod_template_rec.description, FND_API.g_miss_char, NULL, p_prod_template_rec.description)
202: sysdate,
203: FND_GLOBAL.user_id,
204: FND_GLOBAL.conc_login_id,
205: sysdate,
206: FND_GLOBAL.user_id,
207: DECODE( p_prod_template_rec.template_name, FND_API.g_miss_char, NULL, p_prod_template_rec.template_name),
208: DECODE( p_prod_template_rec.description, FND_API.g_miss_char, NULL, p_prod_template_rec.description)
209: FROM fnd_languages l
210: WHERE l.installed_flag IN ('I','B')
244: ) VALUES
245: ( ams_prod_template_attr_s.nextval,
246: x_template_id,
247: SYSDATE,
248: fnd_global.user_id,
249: SYSDATE,
250: fnd_global.user_id,
251: 1,
252: FND_GLOBAL.CONC_LOGIN_ID,
246: x_template_id,
247: SYSDATE,
248: fnd_global.user_id,
249: SYSDATE,
250: fnd_global.user_id,
251: 1,
252: FND_GLOBAL.CONC_LOGIN_ID,
253: l_get_prod_attr.parent_setup_attribute,
254: 'Y',
248: fnd_global.user_id,
249: SYSDATE,
250: fnd_global.user_id,
251: 1,
252: FND_GLOBAL.CONC_LOGIN_ID,
253: l_get_prod_attr.parent_setup_attribute,
254: 'Y',
255: l_get_prod_attr.setup_attribute,
256: 'Y',
284: ) VALUES
285: (ams_prod_template_attr_s.nextval,
286: x_template_id,
287: SYSDATE,
288: fnd_global.user_id,
289: SYSDATE,
290: fnd_global.user_id,
291: 1,
292: FND_GLOBAL.CONC_LOGIN_ID,
286: x_template_id,
287: SYSDATE,
288: fnd_global.user_id,
289: SYSDATE,
290: fnd_global.user_id,
291: 1,
292: FND_GLOBAL.CONC_LOGIN_ID,
293: l_get_service_attr.parent_setup_attribute,
294: 'Y',
288: fnd_global.user_id,
289: SYSDATE,
290: fnd_global.user_id,
291: 1,
292: FND_GLOBAL.CONC_LOGIN_ID,
293: l_get_service_attr.parent_setup_attribute,
294: 'Y',
295: l_get_service_attr.setup_attribute,
296: 'Y',
304: /*
305: SELECT ams_prod_template_attr_s.nextval,
306: x_template_id,
307: SYSDATE,
308: fnd_global.user_id,
309: SYSDATE,
310: fnd_global.user_id,
311: 1,
312: FND_GLOBAL.CONC_LOGIN_ID,
306: x_template_id,
307: SYSDATE,
308: fnd_global.user_id,
309: SYSDATE,
310: fnd_global.user_id,
311: 1,
312: FND_GLOBAL.CONC_LOGIN_ID,
313: stp.parent_setup_attribute,
314: 'N',
308: fnd_global.user_id,
309: SYSDATE,
310: fnd_global.user_id,
311: 1,
312: FND_GLOBAL.CONC_LOGIN_ID,
313: stp.parent_setup_attribute,
314: 'N',
315: stp.setup_attribute,
316: 'N',
514:
515: Update AMS_PROD_TEMPLATES_B
516: SET template_id = DECODE( p_prod_template_rec.template_id, FND_API.g_miss_num, template_id, p_prod_template_rec.template_id),
517: last_update_date = sysdate,
518: last_updated_by = fnd_global.user_id,
519: object_version_number = p_prod_template_rec.object_version_number +1,
520: last_update_login = FND_GLOBAL.CONC_LOGIN_ID,
521: product_service_flag = DECODE(p_prod_template_rec.product_service_flag, FND_API.g_miss_char, product_service_flag, p_prod_template_rec.product_service_flag)
522: WHERE TEMPLATE_ID = p_prod_template_rec.template_id
516: SET template_id = DECODE( p_prod_template_rec.template_id, FND_API.g_miss_num, template_id, p_prod_template_rec.template_id),
517: last_update_date = sysdate,
518: last_updated_by = fnd_global.user_id,
519: object_version_number = p_prod_template_rec.object_version_number +1,
520: last_update_login = FND_GLOBAL.CONC_LOGIN_ID,
521: product_service_flag = DECODE(p_prod_template_rec.product_service_flag, FND_API.g_miss_char, product_service_flag, p_prod_template_rec.product_service_flag)
522: WHERE TEMPLATE_ID = p_prod_template_rec.template_id
523: AND object_version_number = p_prod_template_rec.object_version_number;
524:
530: UPDATE AMS_PROD_TEMPLATES_TL
531: SET template_name = DECODE( p_prod_template_rec.template_name, FND_API.g_miss_char, template_name, p_prod_template_rec.template_name)
532: ,description = DECODE(p_prod_template_rec.description,FND_API.g_miss_char,description,p_prod_template_rec.description)
533: ,last_update_date = sysdate
534: ,last_updated_by = fnd_global.user_id
535: ,last_update_login = FND_GLOBAL.CONC_LOGIN_ID
536: ,source_lang = USERENV('LANG')
537: WHERE TEMPLATE_ID = p_prod_template_rec.template_id
538: AND USERENV('LANG') IN (language, source_lang);
531: SET template_name = DECODE( p_prod_template_rec.template_name, FND_API.g_miss_char, template_name, p_prod_template_rec.template_name)
532: ,description = DECODE(p_prod_template_rec.description,FND_API.g_miss_char,description,p_prod_template_rec.description)
533: ,last_update_date = sysdate
534: ,last_updated_by = fnd_global.user_id
535: ,last_update_login = FND_GLOBAL.CONC_LOGIN_ID
536: ,source_lang = USERENV('LANG')
537: WHERE TEMPLATE_ID = p_prod_template_rec.template_id
538: AND USERENV('LANG') IN (language, source_lang);
539: