49: -- ART request. query the person_party_id
50: -- throw exception if user id is not passed
51:
52: if ( p_reg_request.requested_for_user_id is null) then
53: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
54: fnd_message.set_token('PARAM', 'p_reg_request.requested_for_user_id');
55: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
56: raise_application_error ('-20000', fnd_message.get);
57:
50: -- throw exception if user id is not passed
51:
52: if ( p_reg_request.requested_for_user_id is null) then
53: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
54: fnd_message.set_token('PARAM', 'p_reg_request.requested_for_user_id');
55: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
56: raise_application_error ('-20000', fnd_message.get);
57:
58: else
51:
52: if ( p_reg_request.requested_for_user_id is null) then
53: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
54: fnd_message.set_token('PARAM', 'p_reg_request.requested_for_user_id');
55: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
56: raise_application_error ('-20000', fnd_message.get);
57:
58: else
59:
52: if ( p_reg_request.requested_for_user_id is null) then
53: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
54: fnd_message.set_token('PARAM', 'p_reg_request.requested_for_user_id');
55: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
56: raise_application_error ('-20000', fnd_message.get);
57:
58: else
59:
60: open getPersonPartyId ( p_reg_request.requested_for_user_id );
61: fetch getPersonPartyId into p_reg_request.requested_for_party_id;
62:
63: if (getPersonPartyId%notfound) then
64: close getPersonPartyId;
65: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
66: fnd_message.set_token('PARAM', 'getPersonPartyId');
67: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
68: raise_application_error ('-20000', fnd_message.get);
69: end if;
62:
63: if (getPersonPartyId%notfound) then
64: close getPersonPartyId;
65: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
66: fnd_message.set_token('PARAM', 'getPersonPartyId');
67: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
68: raise_application_error ('-20000', fnd_message.get);
69: end if;
70:
63: if (getPersonPartyId%notfound) then
64: close getPersonPartyId;
65: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
66: fnd_message.set_token('PARAM', 'getPersonPartyId');
67: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
68: raise_application_error ('-20000', fnd_message.get);
69: end if;
70:
71: close getPersonPartyId;
64: close getPersonPartyId;
65: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
66: fnd_message.set_token('PARAM', 'getPersonPartyId');
67: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
68: raise_application_error ('-20000', fnd_message.get);
69: end if;
70:
71: close getPersonPartyId;
72:
92: close getRegSvcFromRegCode;
93:
94: elsif (p_reg_request.wf_role_name is null) then
95: -- this is a smart request and role name should be passed
96: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
97: fnd_message.set_token('PARAM', 'p_reg_request.wf_role_name');
98: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
99: raise_application_error ('-20000', fnd_message.get);
100: end if;
93:
94: elsif (p_reg_request.wf_role_name is null) then
95: -- this is a smart request and role name should be passed
96: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
97: fnd_message.set_token('PARAM', 'p_reg_request.wf_role_name');
98: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
99: raise_application_error ('-20000', fnd_message.get);
100: end if;
101:
94: elsif (p_reg_request.wf_role_name is null) then
95: -- this is a smart request and role name should be passed
96: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
97: fnd_message.set_token('PARAM', 'p_reg_request.wf_role_name');
98: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
99: raise_application_error ('-20000', fnd_message.get);
100: end if;
101:
102: if (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) then
95: -- this is a smart request and role name should be passed
96: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
97: fnd_message.set_token('PARAM', 'p_reg_request.wf_role_name');
98: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.populateRegRecord');
99: raise_application_error ('-20000', fnd_message.get);
100: end if;
101:
102: if (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) then
103: FND_LOG.STRING (FND_LOG.LEVEL_PROCEDURE,
166: OPEN c1;
167: FETCH c1 INTO l_exist;
168: IF c1%NOTFOUND THEN
169: CLOSE c1;
170: fnd_message.set_name('AR','HZ_API_INVALID_LOOKUP');
171: fnd_message.set_token('COLUMN',p_column);
172: fnd_message.set_token('LOOKUP_TYPE',p_lookup_type);
173: fnd_msg_pub.add;
174: x_return_status := fnd_api.g_ret_sts_error;
167: FETCH c1 INTO l_exist;
168: IF c1%NOTFOUND THEN
169: CLOSE c1;
170: fnd_message.set_name('AR','HZ_API_INVALID_LOOKUP');
171: fnd_message.set_token('COLUMN',p_column);
172: fnd_message.set_token('LOOKUP_TYPE',p_lookup_type);
173: fnd_msg_pub.add;
174: x_return_status := fnd_api.g_ret_sts_error;
175: END IF;
168: IF c1%NOTFOUND THEN
169: CLOSE c1;
170: fnd_message.set_name('AR','HZ_API_INVALID_LOOKUP');
171: fnd_message.set_token('COLUMN',p_column);
172: fnd_message.set_token('LOOKUP_TYPE',p_lookup_type);
173: fnd_msg_pub.add;
174: x_return_status := fnd_api.g_ret_sts_error;
175: END IF;
176: CLOSE c1;
320: l_username := (RTRIM (LTRIM (p_username)));
321:
322: if (p_username is null) or (l_username is null) then
323: -- Username is a required input parameter.
324: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
325: fnd_message.set_token('PARAM', 'p_username');
326: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.is_username_available');
327: raise_application_error ('-20000', fnd_message.get);
328: end if;
321:
322: if (p_username is null) or (l_username is null) then
323: -- Username is a required input parameter.
324: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
325: fnd_message.set_token('PARAM', 'p_username');
326: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.is_username_available');
327: raise_application_error ('-20000', fnd_message.get);
328: end if;
329:
322: if (p_username is null) or (l_username is null) then
323: -- Username is a required input parameter.
324: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
325: fnd_message.set_token('PARAM', 'p_username');
326: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.is_username_available');
327: raise_application_error ('-20000', fnd_message.get);
328: end if;
329:
330: open getUserFromFNDUSER (l_username);
323: -- Username is a required input parameter.
324: fnd_message.set_name('FND','UMX_COMMON_MISS_PARAM_MSG');
325: fnd_message.set_token('PARAM', 'p_username');
326: fnd_message.set_token('API', 'UMX_REG_REQUESTS_PVT.is_username_available');
327: raise_application_error ('-20000', fnd_message.get);
328: end if;
329:
330: open getUserFromFNDUSER (l_username);
331: fetch getUserFromFNDUSER into l_username;
1212: 'activeFrom: ' || x_active_from);
1213: end if;
1214:
1215: if (x_active_from is null) or (fnd_date.canonical_to_date (x_active_from) <= sysdate) then
1216: -- active from is null, get fnd message for "Date of approval"
1217: fnd_message.set_name ('FND', 'UMX_USER_ACCT_ACTIVE_FROM_VAL');
1218: x_active_from := fnd_message.get;
1219: else
1220: x_active_from := fnd_date.date_to_displaydate (fnd_date.canonical_to_date (x_active_from));
1213: end if;
1214:
1215: if (x_active_from is null) or (fnd_date.canonical_to_date (x_active_from) <= sysdate) then
1216: -- active from is null, get fnd message for "Date of approval"
1217: fnd_message.set_name ('FND', 'UMX_USER_ACCT_ACTIVE_FROM_VAL');
1218: x_active_from := fnd_message.get;
1219: else
1220: x_active_from := fnd_date.date_to_displaydate (fnd_date.canonical_to_date (x_active_from));
1221: end if;
1214:
1215: if (x_active_from is null) or (fnd_date.canonical_to_date (x_active_from) <= sysdate) then
1216: -- active from is null, get fnd message for "Date of approval"
1217: fnd_message.set_name ('FND', 'UMX_USER_ACCT_ACTIVE_FROM_VAL');
1218: x_active_from := fnd_message.get;
1219: else
1220: x_active_from := fnd_date.date_to_displaydate (fnd_date.canonical_to_date (x_active_from));
1221: end if;
1222: