DBA Data[Home] [Help]

APPS.OKS_AUTO_REMINDER dependencies on FND_USER

Line 292: Step 2: Get the user_name and person_party_id in fnd_user where user_name is quote to contact email address

288: Pseudo Logic:
289: -------------
290: Step 1: Get the person_party_id for quote to contact id
291:
292: Step 2: Get the user_name and person_party_id in fnd_user where user_name is quote to contact email address
293: Case A: Record found in fnd_user
294: If person_party_id in fnd_user is null then
295: UPDATE fnd_user record with person_party_id from step 1 above
296: If person_party_id in fnd_user is NOT the same as person_party_id from step 1 above

Line 293: Case A: Record found in fnd_user

289: -------------
290: Step 1: Get the person_party_id for quote to contact id
291:
292: Step 2: Get the user_name and person_party_id in fnd_user where user_name is quote to contact email address
293: Case A: Record found in fnd_user
294: If person_party_id in fnd_user is null then
295: UPDATE fnd_user record with person_party_id from step 1 above
296: If person_party_id in fnd_user is NOT the same as person_party_id from step 1 above
297: RAISE error here

Line 294: If person_party_id in fnd_user is null then

290: Step 1: Get the person_party_id for quote to contact id
291:
292: Step 2: Get the user_name and person_party_id in fnd_user where user_name is quote to contact email address
293: Case A: Record found in fnd_user
294: If person_party_id in fnd_user is null then
295: UPDATE fnd_user record with person_party_id from step 1 above
296: If person_party_id in fnd_user is NOT the same as person_party_id from step 1 above
297: RAISE error here
298: If person_party_id in fnd_user = person_party_id from step 1 above

Line 295: UPDATE fnd_user record with person_party_id from step 1 above

291:
292: Step 2: Get the user_name and person_party_id in fnd_user where user_name is quote to contact email address
293: Case A: Record found in fnd_user
294: If person_party_id in fnd_user is null then
295: UPDATE fnd_user record with person_party_id from step 1 above
296: If person_party_id in fnd_user is NOT the same as person_party_id from step 1 above
297: RAISE error here
298: If person_party_id in fnd_user = person_party_id from step 1 above
299: we are fine, do nothing

Line 296: If person_party_id in fnd_user is NOT the same as person_party_id from step 1 above

292: Step 2: Get the user_name and person_party_id in fnd_user where user_name is quote to contact email address
293: Case A: Record found in fnd_user
294: If person_party_id in fnd_user is null then
295: UPDATE fnd_user record with person_party_id from step 1 above
296: If person_party_id in fnd_user is NOT the same as person_party_id from step 1 above
297: RAISE error here
298: If person_party_id in fnd_user = person_party_id from step 1 above
299: we are fine, do nothing
300:

Line 298: If person_party_id in fnd_user = person_party_id from step 1 above

294: If person_party_id in fnd_user is null then
295: UPDATE fnd_user record with person_party_id from step 1 above
296: If person_party_id in fnd_user is NOT the same as person_party_id from step 1 above
297: RAISE error here
298: If person_party_id in fnd_user = person_party_id from step 1 above
299: we are fine, do nothing
300:
301: Case B: Record NOT found in fnd_user
302: Call FND_USER_PKG.TestUserName

Line 301: Case B: Record NOT found in fnd_user

297: RAISE error here
298: If person_party_id in fnd_user = person_party_id from step 1 above
299: we are fine, do nothing
300:
301: Case B: Record NOT found in fnd_user
302: Call FND_USER_PKG.TestUserName
303: --@ TestUserName() returns:
304: --@ USER_OK_CREATE constant pls_integer := 0;
305: --@ USER_INVALID_NAME constant pls_integer := 1;

Line 302: Call FND_USER_PKG.TestUserName

298: If person_party_id in fnd_user = person_party_id from step 1 above
299: we are fine, do nothing
300:
301: Case B: Record NOT found in fnd_user
302: Call FND_USER_PKG.TestUserName
303: --@ TestUserName() returns:
304: --@ USER_OK_CREATE constant pls_integer := 0;
305: --@ USER_INVALID_NAME constant pls_integer := 1;
306: --@ USER_EXISTS_IN_FND constant pls_integer := 2;

Line 310: CALL FND_USER_PKG.CreateUserIdParty

306: --@ USER_EXISTS_IN_FND constant pls_integer := 2;
307: --@ USER_SYNCHED constant pls_integer := 3;
308: --@ USER_EXISTS_NO_LINK_ALLOWED constant pls_integer := 4;
309: IF l_test_user IN (0,3) THEN
310: CALL FND_USER_PKG.CreateUserIdParty
311: Note : Call FND_CRYPTO for generating the password (track bug 4358822)
312: FND_USER_RESP_GROUPS_API.insert_assignment with responsibility as 'OKS_ERN_WEB'
313: ELSE -- l_test_user <> 0 ,3
314: -- error, raise exception

Line 312: FND_USER_RESP_GROUPS_API.insert_assignment with responsibility as 'OKS_ERN_WEB'

308: --@ USER_EXISTS_NO_LINK_ALLOWED constant pls_integer := 4;
309: IF l_test_user IN (0,3) THEN
310: CALL FND_USER_PKG.CreateUserIdParty
311: Note : Call FND_CRYPTO for generating the password (track bug 4358822)
312: FND_USER_RESP_GROUPS_API.insert_assignment with responsibility as 'OKS_ERN_WEB'
313: ELSE -- l_test_user <> 0 ,3
314: -- error, raise exception
315: RAISE FND_API.G_EXC_ERROR;
316: END IF;

Line 333: FROM fnd_user

329: )
330: IS
331: SELECT user_id,
332: person_party_id
333: FROM fnd_user
334: WHERE UPPER (user_name) = p_user_name
335: AND SYSDATE BETWEEN NVL (start_date, SYSDATE)
336: AND NVL (end_date, SYSDATE);
337:

Line 344: FROM fnd_user_resp_groups

340: p_responsibility_id IN NUMBER
341: )
342: IS
343: SELECT user_id
344: FROM fnd_user_resp_groups
345: WHERE user_id = p_user_id
346: AND responsibility_id = p_responsibility_id
347: AND SYSDATE BETWEEN NVL (start_date, SYSDATE)
348: AND NVL (end_date, SYSDATE);

Line 412: l_qtc_person_party_id fnd_user.person_party_id%TYPE;

408: AND ks.chr_id = p_contract_id;
409:
410: l_api_name CONSTANT VARCHAR2 (30) := 'create_user';
411: l_test_user PLS_INTEGER;
412: l_qtc_person_party_id fnd_user.person_party_id%TYPE;
413: l_fnd_person_party_id fnd_user.person_party_id%TYPE;
414: l_row_notfound BOOLEAN := TRUE;
415: --
416: BEGIN

Line 413: l_fnd_person_party_id fnd_user.person_party_id%TYPE;

409:
410: l_api_name CONSTANT VARCHAR2 (30) := 'create_user';
411: l_test_user PLS_INTEGER;
412: l_qtc_person_party_id fnd_user.person_party_id%TYPE;
413: l_fnd_person_party_id fnd_user.person_party_id%TYPE;
414: l_row_notfound BOOLEAN := TRUE;
415: --
416: BEGIN
417: -- start debug log

Line 454: -- create a NEW FND USER

450: CLOSE l_user_csr;
451:
452: IF l_row_notfound
453: THEN
454: -- create a NEW FND USER
455: -- Call the testUserName pkg
456: --@ TestUserName() returns:
457: --@ USER_OK_CREATE constant pls_integer := 0;
458: --@ USER_INVALID_NAME constant pls_integer := 1;

Line 463: fnd_user_pkg.testusername (x_user_name => l_user_name);

459: --@ USER_EXISTS_IN_FND constant pls_integer := 2;
460: --@ USER_SYNCHED constant pls_integer := 3;
461: --@ USER_EXISTS_NO_LINK_ALLOWED constant pls_integer := 4;
462: l_test_user :=
463: fnd_user_pkg.testusername (x_user_name => l_user_name);
464:
465: IF l_test_user IN (0, 3)
466: THEN
467: IF l_test_user = 0

Line 479: fnd_user_pkg.createuseridparty

475: 3
476: )) ||
477: ROUND (DBMS_RANDOM.VALUE (100, 999));
478: l_user_id :=
479: fnd_user_pkg.createuseridparty
480: (x_user_name => UPPER
481: (TRIM
482: (p_user_name)),
483: x_owner => 'CUST',

Line 493: -- Call the FND_USER_PKG.CreateUserIdParty WITHOUT password as password exists in OID

489: x_person_party_id => l_qtc_person_party_id
490: );
491: ELSE -- l_test_user = 3
492: -- USER_SYNCHED constant pls_integer := 3;
493: -- Call the FND_USER_PKG.CreateUserIdParty WITHOUT password as password exists in OID
494: -- in Notification, put the password as *******'
495: l_user_id :=
496: fnd_user_pkg.createuseridparty
497: (x_user_name => UPPER

Line 496: fnd_user_pkg.createuseridparty

492: -- USER_SYNCHED constant pls_integer := 3;
493: -- Call the FND_USER_PKG.CreateUserIdParty WITHOUT password as password exists in OID
494: -- in Notification, put the password as *******'
495: l_user_id :=
496: fnd_user_pkg.createuseridparty
497: (x_user_name => UPPER
498: (TRIM
499: (p_user_name)),
500: x_owner => 'SEED',

Line 527: fnd_user_resp_groups_api.insert_assignment

523: INTO l_security_grp_id;
524:
525: CLOSE l_security_grp_csr;
526:
527: fnd_user_resp_groups_api.insert_assignment
528: (user_id => l_user_id,
529: responsibility_id => l_responsibility_id,
530: responsibility_application_id => 515,
531: security_group_id => l_security_grp_id,

Line 566: ELSE -- l_row_notfound is false i.e record exists in fnd_user

562: fnd_message.set_token ('RETURN_VAL', l_test_user);
563: x_err_msg (l_count).description := fnd_message.get;
564: RAISE fnd_api.g_exc_error;
565: END IF; -- l_test_user check
566: ELSE -- l_row_notfound is false i.e record exists in fnd_user
567: x_password := '******';
568: IF l_fnd_person_party_id IS NULL
569: THEN
570: fnd_user_pkg.updateuserparty

Line 570: fnd_user_pkg.updateuserparty

566: ELSE -- l_row_notfound is false i.e record exists in fnd_user
567: x_password := '******';
568: IF l_fnd_person_party_id IS NULL
569: THEN
570: fnd_user_pkg.updateuserparty
571: (x_user_name => UPPER
572: (TRIM
573: (p_user_name)),
574: x_owner => 'CUST',

Line 579: -- fnd_user.person_party_id does NOT match oks_person_party_id

575: x_person_party_id => l_qtc_person_party_id
576: );
577: ELSIF l_fnd_person_party_id <> l_qtc_person_party_id
578: THEN
579: -- fnd_user.person_party_id does NOT match oks_person_party_id
580: fnd_message.set_name ('OKS', 'OKS_SSO_PERSON_PARTY_ERROR');
581: x_err_msg (l_count).description := fnd_message.get;
582: RAISE fnd_api.g_exc_error;
583: ELSE

Line 1687: fnd_user u

1683: )
1684: IS
1685: SELECT rsc.resource_id resource_id
1686: FROM jtf_rs_resource_extns rsc,
1687: fnd_user u
1688: WHERE u.user_id = rsc.user_id
1689: AND u.user_id = p_user_id;
1690:
1691: l_rownotfound BOOLEAN := FALSE;

Line 2682: Step 2: Check if record exists in fnd_user for the above person_party_id (filter expired records here)

2678: IF oks_k_headers_b.person_party_id IS NULL THEN
2679: Fetch the person_party_id for quote to contact id
2680: UPDATE oks_k_headers_b record with the person_party_id for quote to contact id
2681:
2682: Step 2: Check if record exists in fnd_user for the above person_party_id (filter expired records here)
2683: -- 1 or more Record Exists
2684: If record found then
2685: take the first hit record and put the user name and password in the email notification
2686: check if this user has the responsibility' Electronic Renewal'

Line 2692: Step 3: If no record found in step 2 above then check in fnd_user if record exists with the user name as quote to contact email

2688: else
2689: add responsibility and return
2690: end if;
2691:
2692: Step 3: If no record found in step 2 above then check in fnd_user if record exists with the user name as quote to contact email
2693:
2694: CASE A: Record NOT Found in fnd_user
2695:
2696: Call FND_USER_PKG.TestUserName

Line 2694: CASE A: Record NOT Found in fnd_user

2690: end if;
2691:
2692: Step 3: If no record found in step 2 above then check in fnd_user if record exists with the user name as quote to contact email
2693:
2694: CASE A: Record NOT Found in fnd_user
2695:
2696: Call FND_USER_PKG.TestUserName
2697: --@ TestUserName() returns:
2698: --@ USER_OK_CREATE constant pls_integer := 0;

Line 2696: Call FND_USER_PKG.TestUserName

2692: Step 3: If no record found in step 2 above then check in fnd_user if record exists with the user name as quote to contact email
2693:
2694: CASE A: Record NOT Found in fnd_user
2695:
2696: Call FND_USER_PKG.TestUserName
2697: --@ TestUserName() returns:
2698: --@ USER_OK_CREATE constant pls_integer := 0;
2699: --@ USER_INVALID_NAME constant pls_integer := 1;
2700: --@ USER_EXISTS_IN_FND constant pls_integer := 2;

Line 2705: CALL FND_USER_PKG.CreateUserIdParty

2701: --@ USER_SYNCHED constant pls_integer := 3;
2702: --@ USER_EXISTS_NO_LINK_ALLOWED constant pls_integer := 4;
2703:
2704: IF l_test_user IN (0,3) THEN
2705: CALL FND_USER_PKG.CreateUserIdParty
2706: FND_USER_RESP_GROUPS_API.insert_assignment with responsibility as 'OKS_ERN_WEB'
2707:
2708: ELSE -- l_test_user <> 0 ,3
2709: -- error, raise exception

Line 2706: FND_USER_RESP_GROUPS_API.insert_assignment with responsibility as 'OKS_ERN_WEB'

2702: --@ USER_EXISTS_NO_LINK_ALLOWED constant pls_integer := 4;
2703:
2704: IF l_test_user IN (0,3) THEN
2705: CALL FND_USER_PKG.CreateUserIdParty
2706: FND_USER_RESP_GROUPS_API.insert_assignment with responsibility as 'OKS_ERN_WEB'
2707:
2708: ELSE -- l_test_user <> 0 ,3
2709: -- error, raise exception
2710: RAISE FND_API.G_EXC_ERROR;

Line 2714: CASE B: Record Found in fnd_user

2710: RAISE FND_API.G_EXC_ERROR;
2711: END IF;
2712:
2713:
2714: CASE B: Record Found in fnd_user
2715:
2716: Check if fnd_user is Valid or expired
2717: Case Valid
2718:

Line 2716: Check if fnd_user is Valid or expired

2712:
2713:
2714: CASE B: Record Found in fnd_user
2715:
2716: Check if fnd_user is Valid or expired
2717: Case Valid
2718:
2719: Check person_party_id of fnd_user
2720: CASE 1: fnd_user person_party_id is NULL

Line 2719: Check person_party_id of fnd_user

2715:
2716: Check if fnd_user is Valid or expired
2717: Case Valid
2718:
2719: Check person_party_id of fnd_user
2720: CASE 1: fnd_user person_party_id is NULL
2721: UPDATE fnd_user record with person_party_id from step 1 above
2722: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2723: (logic introduced as part of bugfix for 58983305)

Line 2720: CASE 1: fnd_user person_party_id is NULL

2716: Check if fnd_user is Valid or expired
2717: Case Valid
2718:
2719: Check person_party_id of fnd_user
2720: CASE 1: fnd_user person_party_id is NULL
2721: UPDATE fnd_user record with person_party_id from step 1 above
2722: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2723: (logic introduced as part of bugfix for 58983305)
2724: CASE i: If the value of the profile option OKS Overide SSO Behaviour is Y then

Line 2721: UPDATE fnd_user record with person_party_id from step 1 above

2717: Case Valid
2718:
2719: Check person_party_id of fnd_user
2720: CASE 1: fnd_user person_party_id is NULL
2721: UPDATE fnd_user record with person_party_id from step 1 above
2722: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2723: (logic introduced as part of bugfix for 58983305)
2724: CASE i: If the value of the profile option OKS Overide SSO Behaviour is Y then
2725: Update the person_party_id of oks_k_headers_b and continue publishing

Line 2722: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above

2718:
2719: Check person_party_id of fnd_user
2720: CASE 1: fnd_user person_party_id is NULL
2721: UPDATE fnd_user record with person_party_id from step 1 above
2722: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2723: (logic introduced as part of bugfix for 58983305)
2724: CASE i: If the value of the profile option OKS Overide SSO Behaviour is Y then
2725: Update the person_party_id of oks_k_headers_b and continue publishing
2726: CASE ii:If the value of the profile option OKS Overide SSO Behaviour is N

Line 2728: CASE 3: person_party_id of fnd_user MATCHES the person_party_id from step 1 above

2724: CASE i: If the value of the profile option OKS Overide SSO Behaviour is Y then
2725: Update the person_party_id of oks_k_headers_b and continue publishing
2726: CASE ii:If the value of the profile option OKS Overide SSO Behaviour is N
2727: RAISE error here
2728: CASE 3: person_party_id of fnd_user MATCHES the person_party_id from step 1 above
2729: we are fine, do nothing
2730:
2731: Case Expired
2732:

Line 2733: fnd_user exists and is expired , raise exception

2729: we are fine, do nothing
2730:
2731: Case Expired
2732:
2733: fnd_user exists and is expired , raise exception
2734:
2735:
2736: */
2737: PROCEDURE create_sso_user (

Line 2750: l_fnd_person_party_id fnd_user.person_party_id%TYPE;

2746: AS
2747: l_api_name CONSTANT VARCHAR2 (30)
2748: := 'create_sso_user';
2749: l_person_party_id oks_k_headers_b.person_party_id%TYPE;
2750: l_fnd_person_party_id fnd_user.person_party_id%TYPE;
2751: l_start_date fnd_user.start_date%TYPE;
2752: l_end_date fnd_user.end_date%TYPE;
2753: l_test_user PLS_INTEGER;
2754: l_responsibility_id fnd_responsibility_vl.responsibility_id%TYPE;

Line 2751: l_start_date fnd_user.start_date%TYPE;

2747: l_api_name CONSTANT VARCHAR2 (30)
2748: := 'create_sso_user';
2749: l_person_party_id oks_k_headers_b.person_party_id%TYPE;
2750: l_fnd_person_party_id fnd_user.person_party_id%TYPE;
2751: l_start_date fnd_user.start_date%TYPE;
2752: l_end_date fnd_user.end_date%TYPE;
2753: l_test_user PLS_INTEGER;
2754: l_responsibility_id fnd_responsibility_vl.responsibility_id%TYPE;
2755: l_security_grp_id fnd_security_groups.security_group_id%TYPE;

Line 2752: l_end_date fnd_user.end_date%TYPE;

2748: := 'create_sso_user';
2749: l_person_party_id oks_k_headers_b.person_party_id%TYPE;
2750: l_fnd_person_party_id fnd_user.person_party_id%TYPE;
2751: l_start_date fnd_user.start_date%TYPE;
2752: l_end_date fnd_user.end_date%TYPE;
2753: l_test_user PLS_INTEGER;
2754: l_responsibility_id fnd_responsibility_vl.responsibility_id%TYPE;
2755: l_security_grp_id fnd_security_groups.security_group_id%TYPE;
2756: l_return_value BOOLEAN;

Line 2757: l_user_id fnd_user.user_id%TYPE;

2753: l_test_user PLS_INTEGER;
2754: l_responsibility_id fnd_responsibility_vl.responsibility_id%TYPE;
2755: l_security_grp_id fnd_security_groups.security_group_id%TYPE;
2756: l_return_value BOOLEAN;
2757: l_user_id fnd_user.user_id%TYPE;
2758: l_quote_to_contact_id oks_k_headers_b.quote_to_contact_id%TYPE;
2759:
2760: l_suggested_user_name fnd_user.user_name%TYPE;
2761:

Line 2760: l_suggested_user_name fnd_user.user_name%TYPE;

2756: l_return_value BOOLEAN;
2757: l_user_id fnd_user.user_id%TYPE;
2758: l_quote_to_contact_id oks_k_headers_b.quote_to_contact_id%TYPE;
2759:
2760: l_suggested_user_name fnd_user.user_name%TYPE;
2761:
2762: CURSOR csr_person_party_id
2763: IS
2764: SELECT ks.person_party_id,

Line 2784: CURSOR csr_check_fnd_user_exists (

2780: AND car.role_type = 'CONTACT'
2781: AND rln.directional_flag = 'F'
2782: AND rln.content_source_type = 'USER_ENTERED';
2783:
2784: CURSOR csr_check_fnd_user_exists (
2785: p_person_party_id IN NUMBER
2786: )
2787: IS
2788: SELECT user_id,

Line 2791: FROM fnd_user

2787: IS
2788: SELECT user_id,
2789: user_name,
2790: encrypted_user_password
2791: FROM fnd_user
2792: WHERE SYSDATE BETWEEN start_date AND NVL (end_date, SYSDATE +
2793: 1)
2794: AND person_party_id = p_person_party_id;
2795:

Line 2796: CURSOR csr_chk_qtc_fnd_user (

2792: WHERE SYSDATE BETWEEN start_date AND NVL (end_date, SYSDATE +
2793: 1)
2794: AND person_party_id = p_person_party_id;
2795:
2796: CURSOR csr_chk_qtc_fnd_user (
2797: p_user_name IN VARCHAR2
2798: )
2799: IS
2800: SELECT f.person_party_id,

Line 2804: FROM fnd_user f

2800: SELECT f.person_party_id,
2801: f.start_date,
2802: f.end_date,
2803: f.encrypted_user_password
2804: FROM fnd_user f
2805: WHERE f.user_name = p_user_name;
2806:
2807: CURSOR l_resp_csr (
2808: p_resp_key VARCHAR2

Line 2976: -- Check if record exists in fnd_user for the above person_party_id

2972: last_update_login = fnd_global.login_id
2973: WHERE chr_id = p_contract_id;
2974: END IF; -- l_person_party_id is null in oks_k_headers_b
2975:
2976: -- Check if record exists in fnd_user for the above person_party_id
2977: OPEN csr_check_fnd_user_exists (p_person_party_id => l_person_party_id);
2978:
2979: FETCH csr_check_fnd_user_exists
2980: INTO l_user_id,

Line 2977: OPEN csr_check_fnd_user_exists (p_person_party_id => l_person_party_id);

2973: WHERE chr_id = p_contract_id;
2974: END IF; -- l_person_party_id is null in oks_k_headers_b
2975:
2976: -- Check if record exists in fnd_user for the above person_party_id
2977: OPEN csr_check_fnd_user_exists (p_person_party_id => l_person_party_id);
2978:
2979: FETCH csr_check_fnd_user_exists
2980: INTO l_user_id,
2981: x_user_name,

Line 2979: FETCH csr_check_fnd_user_exists

2975:
2976: -- Check if record exists in fnd_user for the above person_party_id
2977: OPEN csr_check_fnd_user_exists (p_person_party_id => l_person_party_id);
2978:
2979: FETCH csr_check_fnd_user_exists
2980: INTO l_user_id,
2981: x_user_name,
2982: x_password;
2983:

Line 2984: CLOSE csr_check_fnd_user_exists;

2980: INTO l_user_id,
2981: x_user_name,
2982: x_password;
2983:
2984: CLOSE csr_check_fnd_user_exists;
2985:
2986: -- debug log
2987: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
2988: THEN

Line 3011: 'Check FND User record for person_party_id : ' ||

3007: END IF;
3008:
3009: -- log file
3010: fnd_file.put_line (fnd_file.LOG,
3011: 'Check FND User record for person_party_id : ' ||
3012: l_person_party_id);
3013: fnd_file.put_line (fnd_file.LOG, 'l_user_id : ' ||
3014: l_user_id);
3015: fnd_file.put_line (fnd_file.LOG, 'x_user_name : ' ||

Line 3018: -- Check if valid fnd_user found

3014: l_user_id);
3015: fnd_file.put_line (fnd_file.LOG, 'x_user_name : ' ||
3016: x_user_name);
3017:
3018: -- Check if valid fnd_user found
3019: IF x_user_name IS NOT NULL
3020: THEN
3021: x_password := '******';
3022: -- log file

Line 3024: 'Found FND User record for person_party_id : ' ||

3020: THEN
3021: x_password := '******';
3022: -- log file
3023: fnd_file.put_line (fnd_file.LOG,
3024: 'Found FND User record for person_party_id : ' ||
3025: l_person_party_id);
3026: -- Bug 4650639
3027: -- FND USER found, check if this user has the responsibility G_ERN_WEB_RESPONSIBILITY
3028: fnd_file.put_line (fnd_file.LOG,

Line 3027: -- FND USER found, check if this user has the responsibility G_ERN_WEB_RESPONSIBILITY

3023: fnd_file.put_line (fnd_file.LOG,
3024: 'Found FND User record for person_party_id : ' ||
3025: l_person_party_id);
3026: -- Bug 4650639
3027: -- FND USER found, check if this user has the responsibility G_ERN_WEB_RESPONSIBILITY
3028: fnd_file.put_line (fnd_file.LOG,
3029: 'Check if the user has ERN responsibility');
3030:
3031: OPEN l_resp_csr (p_resp_key => g_ern_web_responsibility);

Line 3045: IF fnd_user_resp_groups_api.assignment_exists (l_user_id,

3041: INTO l_security_grp_id;
3042:
3043: CLOSE l_security_grp_csr;
3044:
3045: IF fnd_user_resp_groups_api.assignment_exists (l_user_id,
3046: l_responsibility_id,
3047: 515,
3048: l_security_grp_id
3049: )

Line 3072: fnd_user_resp_groups_api.insert_assignment

3068: l_responsibility_id);
3069: fnd_file.put_line (fnd_file.LOG,
3070: 'l_security_grp_id : ' ||
3071: l_security_grp_id);
3072: fnd_user_resp_groups_api.insert_assignment
3073: (user_id => l_user_id,
3074: responsibility_id => l_responsibility_id,
3075: responsibility_application_id => 515,
3076: security_group_id => l_security_grp_id,

Line 3115: -- check in fnd_user if record exists with the user name as quote to contact email

3111: END IF; -- l_return_value
3112: END IF; -- assignment_exists
3113: END IF; -- x_user_name IS NOT NULL THEN
3114:
3115: -- check in fnd_user if record exists with the user name as quote to contact email
3116: OPEN csr_chk_qtc_fnd_user (p_user_name => UPPER
3117: (TRIM
3118: (p_user_name)));
3119:

Line 3116: OPEN csr_chk_qtc_fnd_user (p_user_name => UPPER

3112: END IF; -- assignment_exists
3113: END IF; -- x_user_name IS NOT NULL THEN
3114:
3115: -- check in fnd_user if record exists with the user name as quote to contact email
3116: OPEN csr_chk_qtc_fnd_user (p_user_name => UPPER
3117: (TRIM
3118: (p_user_name)));
3119:
3120: FETCH csr_chk_qtc_fnd_user

Line 3120: FETCH csr_chk_qtc_fnd_user

3116: OPEN csr_chk_qtc_fnd_user (p_user_name => UPPER
3117: (TRIM
3118: (p_user_name)));
3119:
3120: FETCH csr_chk_qtc_fnd_user
3121: INTO l_fnd_person_party_id,
3122: l_start_date,
3123: l_end_date,
3124: x_password;

Line 3157: 'Check FND User record for user name : ' ||

3153: END IF;
3154:
3155: -- log file
3156: fnd_file.put_line (fnd_file.LOG,
3157: 'Check FND User record for user name : ' ||
3158: p_user_name);
3159: fnd_file.put_line (fnd_file.LOG,
3160: 'l_fnd_person_party_id : ' ||
3161: l_fnd_person_party_id);

Line 3167: IF csr_chk_qtc_fnd_user%NOTFOUND

3163: l_start_date);
3164: fnd_file.put_line (fnd_file.LOG, 'l_end_date : ' ||
3165: l_end_date);
3166:
3167: IF csr_chk_qtc_fnd_user%NOTFOUND
3168: THEN
3169: -- create a NEW FND USER
3170: -- Call the testUserName pkg
3171: --@ TestUserName() returns:

Line 3169: -- create a NEW FND USER

3165: l_end_date);
3166:
3167: IF csr_chk_qtc_fnd_user%NOTFOUND
3168: THEN
3169: -- create a NEW FND USER
3170: -- Call the testUserName pkg
3171: --@ TestUserName() returns:
3172: --@ USER_OK_CREATE constant pls_integer := 0;
3173: --@ USER_INVALID_NAME constant pls_integer := 1;

Line 3222: 'Creating New user, calling FND_USER_PKG.TestUserName for username :'||l_suggested_user_name);

3218:
3219: -- log file
3220: fnd_file.put_line
3221: (fnd_file.LOG,
3222: 'Creating New user, calling FND_USER_PKG.TestUserName for username :'||l_suggested_user_name);
3223: l_test_user :=
3224: fnd_user_pkg.testusername
3225: (x_user_name => l_suggested_user_name);
3226:

Line 3224: fnd_user_pkg.testusername

3220: fnd_file.put_line
3221: (fnd_file.LOG,
3222: 'Creating New user, calling FND_USER_PKG.TestUserName for username :'||l_suggested_user_name);
3223: l_test_user :=
3224: fnd_user_pkg.testusername
3225: (x_user_name => l_suggested_user_name);
3226:
3227: -- debug log
3228: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)

Line 3241: 'After calling FND_USER_PKG.TestUserName l_test_user : ' ||

3237:
3238: -- log file
3239: fnd_file.put_line
3240: (fnd_file.LOG,
3241: 'After calling FND_USER_PKG.TestUserName l_test_user : ' ||
3242: l_test_user);
3243:
3244: IF l_test_user IN (0, 3)
3245: THEN

Line 3298: fnd_user_pkg.createuseridparty

3294: /* END IF;*/
3295: /*end of modification for bug7207391*/
3296:
3297: l_user_id :=
3298: fnd_user_pkg.createuseridparty
3299: (x_user_name => l_suggested_user_name,
3300: x_owner => 'SEED',
3301: x_unencrypted_password => x_password,
3302: x_description => 'Electronic renewals User',

Line 3312: 'FND_USER_PKG.CreateUserIdParty l_user_id : ' ||

3308: x_user_name := l_suggested_user_name;
3309: -- log file
3310: fnd_file.put_line
3311: (fnd_file.LOG,
3312: 'FND_USER_PKG.CreateUserIdParty l_user_id : ' ||
3313: l_user_id);
3314: ELSE -- l_test_user = 3
3315: -- USER_SYNCHED constant pls_integer := 3;
3316: -- Call the FND_USER_PKG.CreateUserIdParty WITHOUT password as password exists in OID

Line 3316: -- Call the FND_USER_PKG.CreateUserIdParty WITHOUT password as password exists in OID

3312: 'FND_USER_PKG.CreateUserIdParty l_user_id : ' ||
3313: l_user_id);
3314: ELSE -- l_test_user = 3
3315: -- USER_SYNCHED constant pls_integer := 3;
3316: -- Call the FND_USER_PKG.CreateUserIdParty WITHOUT password as password exists in OID
3317: -- in Notification, put the password as '******'
3318:
3319: -- log file
3320: fnd_file.put_line

Line 3322: 'USER_SYNCHED , calling FND_USER_PKG.CreateUserIdParty');

3318:
3319: -- log file
3320: fnd_file.put_line
3321: (fnd_file.LOG,
3322: 'USER_SYNCHED , calling FND_USER_PKG.CreateUserIdParty');
3323: l_user_id :=
3324: fnd_user_pkg.createuseridparty
3325: (x_user_name => l_suggested_user_name,
3326: x_owner => 'SEED',

Line 3324: fnd_user_pkg.createuseridparty

3320: fnd_file.put_line
3321: (fnd_file.LOG,
3322: 'USER_SYNCHED , calling FND_USER_PKG.CreateUserIdParty');
3323: l_user_id :=
3324: fnd_user_pkg.createuseridparty
3325: (x_user_name => l_suggested_user_name,
3326: x_owner => 'SEED',
3327: x_description => 'Electronic renewals User',
3328: x_email_address => UPPER

Line 3338: 'FND_USER_PKG.CreateUserIdParty l_user_id : ' ||

3334: x_password := '******';
3335: -- log file
3336: fnd_file.put_line
3337: (fnd_file.LOG,
3338: 'FND_USER_PKG.CreateUserIdParty l_user_id : ' ||
3339: l_user_id);
3340: END IF; -- l_test_user = 0 or 3
3341:
3342: -- debug log

Line 3415: fnd_user_resp_groups_api.insert_assignment

3411: l_responsibility_id);
3412: fnd_file.put_line (fnd_file.LOG,
3413: 'l_security_grp_id : ' ||
3414: l_security_grp_id);
3415: fnd_user_resp_groups_api.insert_assignment
3416: (user_id => l_user_id,
3417: responsibility_id => l_responsibility_id,
3418: responsibility_application_id => 515,
3419: security_group_id => l_security_grp_id,

Line 3486: ELSE -- csr_chk_qtc_fnd_user%FOUND

3482: fnd_file.put_line (fnd_file.LOG, 'l_test_user: ' ||
3483: l_test_user);
3484: RAISE fnd_api.g_exc_error;
3485: END IF; -- l_test_user check
3486: ELSE -- csr_chk_qtc_fnd_user%FOUND
3487: -- check if the above fnd_user is valid
3488: IF SYSDATE BETWEEN l_start_date AND NVL (l_end_date, SYSDATE +
3489: 1)
3490: THEN

Line 3487: -- check if the above fnd_user is valid

3483: l_test_user);
3484: RAISE fnd_api.g_exc_error;
3485: END IF; -- l_test_user check
3486: ELSE -- csr_chk_qtc_fnd_user%FOUND
3487: -- check if the above fnd_user is valid
3488: IF SYSDATE BETWEEN l_start_date AND NVL (l_end_date, SYSDATE +
3489: 1)
3490: THEN
3491: -- fnd user is valid

Line 3491: -- fnd user is valid

3487: -- check if the above fnd_user is valid
3488: IF SYSDATE BETWEEN l_start_date AND NVL (l_end_date, SYSDATE +
3489: 1)
3490: THEN
3491: -- fnd user is valid
3492:
3493: -- log file
3494: fnd_file.put_line
3495: (fnd_file.LOG,

Line 3496: 'chk_qtc_fnd_user%FOUND, check if the above fnd_user is valid');

3492:
3493: -- log file
3494: fnd_file.put_line
3495: (fnd_file.LOG,
3496: 'chk_qtc_fnd_user%FOUND, check if the above fnd_user is valid');
3497: fnd_file.put_line (fnd_file.LOG,
3498: 'l_fnd_person_party_id : ' ||
3499: l_fnd_person_party_id);
3500: fnd_file.put_line (fnd_file.LOG,

Line 3504: -- Check the person_party_id of the fnd_user

3500: fnd_file.put_line (fnd_file.LOG,
3501: 'l_person_party_id : ' ||
3502: l_person_party_id);
3503:
3504: -- Check the person_party_id of the fnd_user
3505: IF l_fnd_person_party_id IS NULL
3506: THEN
3507: -- fnd_user.person_party_id IS NULL
3508: UPDATE fnd_user

Line 3507: -- fnd_user.person_party_id IS NULL

3503:
3504: -- Check the person_party_id of the fnd_user
3505: IF l_fnd_person_party_id IS NULL
3506: THEN
3507: -- fnd_user.person_party_id IS NULL
3508: UPDATE fnd_user
3509: SET person_party_id = l_person_party_id
3510: WHERE user_name = UPPER (TRIM (p_user_name));
3511: ELSIF l_person_party_id <> l_fnd_person_party_id

Line 3508: UPDATE fnd_user

3504: -- Check the person_party_id of the fnd_user
3505: IF l_fnd_person_party_id IS NULL
3506: THEN
3507: -- fnd_user.person_party_id IS NULL
3508: UPDATE fnd_user
3509: SET person_party_id = l_person_party_id
3510: WHERE user_name = UPPER (TRIM (p_user_name));
3511: ELSIF l_person_party_id <> l_fnd_person_party_id
3512: THEN

Line 3527: -- fnd_user.person_party_id does NOT match oks_person_party_id

3523: fnd_file.put_line (fnd_file.LOG,'OKS Person Party ID updated to:'||l_fnd_person_party_id);
3524: ELSE
3525:
3526: fnd_file.put_line (fnd_file.LOG,'Using SSO behavior');
3527: -- fnd_user.person_party_id does NOT match oks_person_party_id
3528: -- get the party names from hz_parties and raise error
3529: -- oks person party name
3530: OPEN csr_get_per_party_name (p_party_id => l_person_party_id);
3531: FETCH csr_get_per_party_name INTO l_oks_per_party_name;

Line 3582: CLOSE csr_chk_qtc_fnd_user;

3578:
3579: x_user_name := UPPER (TRIM (p_user_name));
3580: x_password := '******'; -- bug 5357772
3581:
3582: CLOSE csr_chk_qtc_fnd_user;
3583:
3584: RETURN;
3585: ELSE
3586: -- fnd user has expired RAISE exception;

Line 3586: -- fnd user has expired RAISE exception;

3582: CLOSE csr_chk_qtc_fnd_user;
3583:
3584: RETURN;
3585: ELSE
3586: -- fnd user has expired RAISE exception;
3587: fnd_message.set_name ('OKS', 'OKS_SSO_USER_EXPIRED');
3588: fnd_message.set_token ('USER_NAME', UPPER (TRIM (p_user_name)));
3589: fnd_msg_pub.ADD;
3590: -- log file

Line 3596: CLOSE csr_chk_qtc_fnd_user;

3592: RAISE fnd_api.g_exc_error;
3593: END IF;
3594: END IF;
3595:
3596: CLOSE csr_chk_qtc_fnd_user;
3597:
3598: -- log file
3599: fnd_file.put_line (fnd_file.LOG, ' ');
3600: fnd_file.put_line