45: l_default_update_format2 VARCHAR2(100) := '';
46:
47: FUNCTION get_user_id RETURN NUMBER AS
48: BEGIN
49: Return FND_GLOBAL.USER_ID;
50: END get_user_id;
51:
52: FUNCTION get_date_format_from_user(p_user_id IN NUMBER)
53: RETURN VARCHAR2 AS
233: --Get the template id from the next available sequence number
234: select cs_tp_templates_s.nextval into l_template_id from dual;
235:
236: l_current_date := sysdate;
237: l_created_by := fnd_global.user_id;
238: l_login := fnd_global.login_id;
239:
240: CS_TP_TEMPLATES_PKG.INSERT_ROW (
241: x_rowid => l_rowid,
234: select cs_tp_templates_s.nextval into l_template_id from dual;
235:
236: l_current_date := sysdate;
237: l_created_by := fnd_global.user_id;
238: l_login := fnd_global.login_id;
239:
240: CS_TP_TEMPLATES_PKG.INSERT_ROW (
241: x_rowid => l_rowid,
242: x_template_id => l_template_id,
423: RAISE FND_API.G_EXC_ERROR;
424: End If;
425:
426: l_current_date := sysdate;
427: l_last_updated_by := fnd_global.user_id;
428: l_login := fnd_global.login_id;
429:
430: CS_TP_TEMPLATES_PKG.Update_Row (
431: x_template_id => P_One_Template.mTemplateID,
424: End If;
425:
426: l_current_date := sysdate;
427: l_last_updated_by := fnd_global.user_id;
428: l_login := fnd_global.login_id;
429:
430: CS_TP_TEMPLATES_PKG.Update_Row (
431: x_template_id => P_One_Template.mTemplateID,
432: x_default_flag => P_One_Template.mDefaultFlag,
569: Close Last_Updated_Date_C;
570: End If;
571:
572: l_current_date := sysdate;
573: l_created_by := FND_GLOBAL.user_id;
574: l_login := fnd_global.login_id;
575:
576: If (l_One_Template_Attribute.mAttributeID is NULL
577: OR l_One_Template_Attribute.mAttributeID = FND_API.G_MISS_NUM) Then
570: End If;
571:
572: l_current_date := sysdate;
573: l_created_by := FND_GLOBAL.user_id;
574: l_login := fnd_global.login_id;
575:
576: If (l_One_Template_Attribute.mAttributeID is NULL
577: OR l_One_Template_Attribute.mAttributeID = FND_API.G_MISS_NUM) Then
578: -- need to insert into the Attribute Table
683: Raise FND_API.G_EXC_ERROR ;
684: End If;
685: Close C;
686: l_current_date := sysdate;
687: l_created_by := fnd_global.user_id;
688: l_login := fnd_global.login_id;
689:
690: --loop through each link. If the link id is present, perform an update.
691: If (P_Template_Links.COUNT >0) Then
684: End If;
685: Close C;
686: l_current_date := sysdate;
687: l_created_by := fnd_global.user_id;
688: l_login := fnd_global.login_id;
689:
690: --loop through each link. If the link id is present, perform an update.
691: If (P_Template_Links.COUNT >0) Then
692: For i In P_Template_Links.FIRST..P_Template_Links.LAST Loop
3224: Raise FND_API.G_EXC_ERROR ;
3225: End If;
3226: Close C;
3227: l_current_date := sysdate;
3228: l_created_by := fnd_global.user_id;
3229: l_login := fnd_global.login_id;
3230:
3231: --loop through each link. If the link id is present, perform an update.
3232: If (P_Template_Links.COUNT >0) Then
3225: End If;
3226: Close C;
3227: l_current_date := sysdate;
3228: l_created_by := fnd_global.user_id;
3229: l_login := fnd_global.login_id;
3230:
3231: --loop through each link. If the link id is present, perform an update.
3232: If (P_Template_Links.COUNT >0) Then
3233: For i In P_Template_Links.FIRST..P_Template_Links.LAST Loop