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 1610: fnd_user u

1606: )
1607: IS
1608: SELECT rsc.resource_id resource_id
1609: FROM jtf_rs_resource_extns rsc,
1610: fnd_user u
1611: WHERE u.user_id = rsc.user_id
1612: AND u.user_id = p_user_id;
1613:
1614: l_rownotfound BOOLEAN := FALSE;

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

2539: IF oks_k_headers_b.person_party_id IS NULL THEN
2540: Fetch the person_party_id for quote to contact id
2541: UPDATE oks_k_headers_b record with the person_party_id for quote to contact id
2542:
2543: Step 2: Check if record exists in fnd_user for the above person_party_id (filter expired records here)
2544: -- 1 or more Record Exists
2545: If record found then
2546: take the first hit record and put the user name and password in the email notification
2547: check if this user has the responsibility' Electronic Renewal'

Line 2553: 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

2549: else
2550: add responsibility and return
2551: end if;
2552:
2553: 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
2554:
2555: CASE A: Record NOT Found in fnd_user
2556:
2557: Call FND_USER_PKG.TestUserName

Line 2555: CASE A: Record NOT Found in fnd_user

2551: end if;
2552:
2553: 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
2554:
2555: CASE A: Record NOT Found in fnd_user
2556:
2557: Call FND_USER_PKG.TestUserName
2558: --@ TestUserName() returns:
2559: --@ USER_OK_CREATE constant pls_integer := 0;

Line 2557: Call FND_USER_PKG.TestUserName

2553: 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
2554:
2555: CASE A: Record NOT Found in fnd_user
2556:
2557: Call FND_USER_PKG.TestUserName
2558: --@ TestUserName() returns:
2559: --@ USER_OK_CREATE constant pls_integer := 0;
2560: --@ USER_INVALID_NAME constant pls_integer := 1;
2561: --@ USER_EXISTS_IN_FND constant pls_integer := 2;

Line 2566: CALL FND_USER_PKG.CreateUserIdParty

2562: --@ USER_SYNCHED constant pls_integer := 3;
2563: --@ USER_EXISTS_NO_LINK_ALLOWED constant pls_integer := 4;
2564:
2565: IF l_test_user IN (0,3) THEN
2566: CALL FND_USER_PKG.CreateUserIdParty
2567: FND_USER_RESP_GROUPS_API.insert_assignment with responsibility as 'OKS_ERN_WEB'
2568:
2569: ELSE -- l_test_user <> 0 ,3
2570: -- error, raise exception

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

2563: --@ USER_EXISTS_NO_LINK_ALLOWED constant pls_integer := 4;
2564:
2565: IF l_test_user IN (0,3) THEN
2566: CALL FND_USER_PKG.CreateUserIdParty
2567: FND_USER_RESP_GROUPS_API.insert_assignment with responsibility as 'OKS_ERN_WEB'
2568:
2569: ELSE -- l_test_user <> 0 ,3
2570: -- error, raise exception
2571: RAISE FND_API.G_EXC_ERROR;

Line 2575: CASE B: Record Found in fnd_user

2571: RAISE FND_API.G_EXC_ERROR;
2572: END IF;
2573:
2574:
2575: CASE B: Record Found in fnd_user
2576:
2577: Check if fnd_user is Valid or expired
2578: Case Valid
2579:

Line 2577: Check if fnd_user is Valid or expired

2573:
2574:
2575: CASE B: Record Found in fnd_user
2576:
2577: Check if fnd_user is Valid or expired
2578: Case Valid
2579:
2580: Check person_party_id of fnd_user
2581: CASE 1: fnd_user person_party_id is NULL

Line 2580: Check person_party_id of fnd_user

2576:
2577: Check if fnd_user is Valid or expired
2578: Case Valid
2579:
2580: Check person_party_id of fnd_user
2581: CASE 1: fnd_user person_party_id is NULL
2582: UPDATE fnd_user record with person_party_id from step 1 above
2583: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2584: RAISE error here

Line 2581: CASE 1: fnd_user person_party_id is NULL

2577: Check if fnd_user is Valid or expired
2578: Case Valid
2579:
2580: Check person_party_id of fnd_user
2581: CASE 1: fnd_user person_party_id is NULL
2582: UPDATE fnd_user record with person_party_id from step 1 above
2583: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2584: RAISE error here
2585: CASE 3: person_party_id of fnd_user MATCHES the person_party_id from step 1 above

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

2578: Case Valid
2579:
2580: Check person_party_id of fnd_user
2581: CASE 1: fnd_user person_party_id is NULL
2582: UPDATE fnd_user record with person_party_id from step 1 above
2583: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2584: RAISE error here
2585: CASE 3: person_party_id of fnd_user MATCHES the person_party_id from step 1 above
2586: we are fine, do nothing

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

2579:
2580: Check person_party_id of fnd_user
2581: CASE 1: fnd_user person_party_id is NULL
2582: UPDATE fnd_user record with person_party_id from step 1 above
2583: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2584: RAISE error here
2585: CASE 3: person_party_id of fnd_user MATCHES the person_party_id from step 1 above
2586: we are fine, do nothing
2587:

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

2581: CASE 1: fnd_user person_party_id is NULL
2582: UPDATE fnd_user record with person_party_id from step 1 above
2583: CASE 2: person_party_id of fnd_user DOES NOT MATCH the person_party_id from step 1 above
2584: RAISE error here
2585: CASE 3: person_party_id of fnd_user MATCHES the person_party_id from step 1 above
2586: we are fine, do nothing
2587:
2588: Case Expired
2589:

Line 2590: fnd_user exists and is expired , raise exception

2586: we are fine, do nothing
2587:
2588: Case Expired
2589:
2590: fnd_user exists and is expired , raise exception
2591:
2592:
2593: */
2594: PROCEDURE create_sso_user (

Line 2607: l_fnd_person_party_id fnd_user.person_party_id%TYPE;

2603: AS
2604: l_api_name CONSTANT VARCHAR2 (30)
2605: := 'create_sso_user';
2606: l_person_party_id oks_k_headers_b.person_party_id%TYPE;
2607: l_fnd_person_party_id fnd_user.person_party_id%TYPE;
2608: l_start_date fnd_user.start_date%TYPE;
2609: l_end_date fnd_user.end_date%TYPE;
2610: l_test_user PLS_INTEGER;
2611: l_responsibility_id fnd_responsibility_vl.responsibility_id%TYPE;

Line 2608: l_start_date fnd_user.start_date%TYPE;

2604: l_api_name CONSTANT VARCHAR2 (30)
2605: := 'create_sso_user';
2606: l_person_party_id oks_k_headers_b.person_party_id%TYPE;
2607: l_fnd_person_party_id fnd_user.person_party_id%TYPE;
2608: l_start_date fnd_user.start_date%TYPE;
2609: l_end_date fnd_user.end_date%TYPE;
2610: l_test_user PLS_INTEGER;
2611: l_responsibility_id fnd_responsibility_vl.responsibility_id%TYPE;
2612: l_security_grp_id fnd_security_groups.security_group_id%TYPE;

Line 2609: l_end_date fnd_user.end_date%TYPE;

2605: := 'create_sso_user';
2606: l_person_party_id oks_k_headers_b.person_party_id%TYPE;
2607: l_fnd_person_party_id fnd_user.person_party_id%TYPE;
2608: l_start_date fnd_user.start_date%TYPE;
2609: l_end_date fnd_user.end_date%TYPE;
2610: l_test_user PLS_INTEGER;
2611: l_responsibility_id fnd_responsibility_vl.responsibility_id%TYPE;
2612: l_security_grp_id fnd_security_groups.security_group_id%TYPE;
2613: l_return_value BOOLEAN;

Line 2614: l_user_id fnd_user.user_id%TYPE;

2610: l_test_user PLS_INTEGER;
2611: l_responsibility_id fnd_responsibility_vl.responsibility_id%TYPE;
2612: l_security_grp_id fnd_security_groups.security_group_id%TYPE;
2613: l_return_value BOOLEAN;
2614: l_user_id fnd_user.user_id%TYPE;
2615: l_quote_to_contact_id oks_k_headers_b.quote_to_contact_id%TYPE;
2616:
2617: l_suggested_user_name fnd_user.user_name%TYPE;
2618:

Line 2617: l_suggested_user_name fnd_user.user_name%TYPE;

2613: l_return_value BOOLEAN;
2614: l_user_id fnd_user.user_id%TYPE;
2615: l_quote_to_contact_id oks_k_headers_b.quote_to_contact_id%TYPE;
2616:
2617: l_suggested_user_name fnd_user.user_name%TYPE;
2618:
2619: CURSOR csr_person_party_id
2620: IS
2621: SELECT ks.person_party_id,

Line 2641: CURSOR csr_check_fnd_user_exists (

2637: AND car.role_type = 'CONTACT'
2638: AND rln.directional_flag = 'F'
2639: AND rln.content_source_type = 'USER_ENTERED';
2640:
2641: CURSOR csr_check_fnd_user_exists (
2642: p_person_party_id IN NUMBER
2643: )
2644: IS
2645: SELECT user_id,

Line 2648: FROM fnd_user

2644: IS
2645: SELECT user_id,
2646: user_name,
2647: encrypted_user_password
2648: FROM fnd_user
2649: WHERE SYSDATE BETWEEN start_date AND NVL (end_date, SYSDATE +
2650: 1)
2651: AND person_party_id = p_person_party_id;
2652:

Line 2653: CURSOR csr_chk_qtc_fnd_user (

2649: WHERE SYSDATE BETWEEN start_date AND NVL (end_date, SYSDATE +
2650: 1)
2651: AND person_party_id = p_person_party_id;
2652:
2653: CURSOR csr_chk_qtc_fnd_user (
2654: p_user_name IN VARCHAR2
2655: )
2656: IS
2657: SELECT f.person_party_id,

Line 2661: FROM fnd_user f

2657: SELECT f.person_party_id,
2658: f.start_date,
2659: f.end_date,
2660: f.encrypted_user_password
2661: FROM fnd_user f
2662: WHERE f.user_name = p_user_name;
2663:
2664: CURSOR l_resp_csr (
2665: p_resp_key VARCHAR2

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

2827: last_update_login = fnd_global.login_id
2828: WHERE chr_id = p_contract_id;
2829: END IF; -- l_person_party_id is null in oks_k_headers_b
2830:
2831: -- Check if record exists in fnd_user for the above person_party_id
2832: OPEN csr_check_fnd_user_exists (p_person_party_id => l_person_party_id);
2833:
2834: FETCH csr_check_fnd_user_exists
2835: INTO l_user_id,

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

2828: WHERE chr_id = p_contract_id;
2829: END IF; -- l_person_party_id is null in oks_k_headers_b
2830:
2831: -- Check if record exists in fnd_user for the above person_party_id
2832: OPEN csr_check_fnd_user_exists (p_person_party_id => l_person_party_id);
2833:
2834: FETCH csr_check_fnd_user_exists
2835: INTO l_user_id,
2836: x_user_name,

Line 2834: FETCH csr_check_fnd_user_exists

2830:
2831: -- Check if record exists in fnd_user for the above person_party_id
2832: OPEN csr_check_fnd_user_exists (p_person_party_id => l_person_party_id);
2833:
2834: FETCH csr_check_fnd_user_exists
2835: INTO l_user_id,
2836: x_user_name,
2837: x_password;
2838:

Line 2839: CLOSE csr_check_fnd_user_exists;

2835: INTO l_user_id,
2836: x_user_name,
2837: x_password;
2838:
2839: CLOSE csr_check_fnd_user_exists;
2840:
2841: -- debug log
2842: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
2843: THEN

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

2862: END IF;
2863:
2864: -- log file
2865: fnd_file.put_line (fnd_file.LOG,
2866: 'Check FND User record for person_party_id : ' ||
2867: l_person_party_id);
2868: fnd_file.put_line (fnd_file.LOG, 'l_user_id : ' ||
2869: l_user_id);
2870: fnd_file.put_line (fnd_file.LOG, 'x_user_name : ' ||

Line 2873: -- Check if valid fnd_user found

2869: l_user_id);
2870: fnd_file.put_line (fnd_file.LOG, 'x_user_name : ' ||
2871: x_user_name);
2872:
2873: -- Check if valid fnd_user found
2874: IF x_user_name IS NOT NULL
2875: THEN
2876: x_password := '******';
2877: -- log file

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

2875: THEN
2876: x_password := '******';
2877: -- log file
2878: fnd_file.put_line (fnd_file.LOG,
2879: 'Found FND User record for person_party_id : ' ||
2880: l_person_party_id);
2881: -- Bug 4650639
2882: -- FND USER found, check if this user has the responsibility G_ERN_WEB_RESPONSIBILITY
2883: fnd_file.put_line (fnd_file.LOG,

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

2878: fnd_file.put_line (fnd_file.LOG,
2879: 'Found FND User record for person_party_id : ' ||
2880: l_person_party_id);
2881: -- Bug 4650639
2882: -- FND USER found, check if this user has the responsibility G_ERN_WEB_RESPONSIBILITY
2883: fnd_file.put_line (fnd_file.LOG,
2884: 'Check if the user has ERN responsibility');
2885:
2886: OPEN l_resp_csr (p_resp_key => g_ern_web_responsibility);

Line 2900: IF fnd_user_resp_groups_api.assignment_exists (l_user_id,

2896: INTO l_security_grp_id;
2897:
2898: CLOSE l_security_grp_csr;
2899:
2900: IF fnd_user_resp_groups_api.assignment_exists (l_user_id,
2901: l_responsibility_id,
2902: 515,
2903: l_security_grp_id
2904: )

Line 2927: fnd_user_resp_groups_api.insert_assignment

2923: l_responsibility_id);
2924: fnd_file.put_line (fnd_file.LOG,
2925: 'l_security_grp_id : ' ||
2926: l_security_grp_id);
2927: fnd_user_resp_groups_api.insert_assignment
2928: (user_id => l_user_id,
2929: responsibility_id => l_responsibility_id,
2930: responsibility_application_id => 515,
2931: security_group_id => l_security_grp_id,

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

2964: END IF; -- l_return_value
2965: END IF; -- assignment_exists
2966: END IF; -- x_user_name IS NOT NULL THEN
2967:
2968: -- check in fnd_user if record exists with the user name as quote to contact email
2969: OPEN csr_chk_qtc_fnd_user (p_user_name => UPPER
2970: (TRIM
2971: (p_user_name)));
2972:

Line 2969: OPEN csr_chk_qtc_fnd_user (p_user_name => UPPER

2965: END IF; -- assignment_exists
2966: END IF; -- x_user_name IS NOT NULL THEN
2967:
2968: -- check in fnd_user if record exists with the user name as quote to contact email
2969: OPEN csr_chk_qtc_fnd_user (p_user_name => UPPER
2970: (TRIM
2971: (p_user_name)));
2972:
2973: FETCH csr_chk_qtc_fnd_user

Line 2973: FETCH csr_chk_qtc_fnd_user

2969: OPEN csr_chk_qtc_fnd_user (p_user_name => UPPER
2970: (TRIM
2971: (p_user_name)));
2972:
2973: FETCH csr_chk_qtc_fnd_user
2974: INTO l_fnd_person_party_id,
2975: l_start_date,
2976: l_end_date,
2977: x_password;

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

3006: END IF;
3007:
3008: -- log file
3009: fnd_file.put_line (fnd_file.LOG,
3010: 'Check FND User record for user name : ' ||
3011: p_user_name);
3012: fnd_file.put_line (fnd_file.LOG,
3013: 'l_fnd_person_party_id : ' ||
3014: l_fnd_person_party_id);

Line 3020: IF csr_chk_qtc_fnd_user%NOTFOUND

3016: l_start_date);
3017: fnd_file.put_line (fnd_file.LOG, 'l_end_date : ' ||
3018: l_end_date);
3019:
3020: IF csr_chk_qtc_fnd_user%NOTFOUND
3021: THEN
3022: -- create a NEW FND USER
3023: -- Call the testUserName pkg
3024: --@ TestUserName() returns:

Line 3022: -- create a NEW FND USER

3018: l_end_date);
3019:
3020: IF csr_chk_qtc_fnd_user%NOTFOUND
3021: THEN
3022: -- create a NEW FND USER
3023: -- Call the testUserName pkg
3024: --@ TestUserName() returns:
3025: --@ USER_OK_CREATE constant pls_integer := 0;
3026: --@ USER_INVALID_NAME constant pls_integer := 1;

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

3071:
3072: -- log file
3073: fnd_file.put_line
3074: (fnd_file.LOG,
3075: 'Creating New user, calling FND_USER_PKG.TestUserName for username :'||l_suggested_user_name);
3076: l_test_user :=
3077: fnd_user_pkg.testusername
3078: (x_user_name => l_suggested_user_name);
3079:

Line 3077: fnd_user_pkg.testusername

3073: fnd_file.put_line
3074: (fnd_file.LOG,
3075: 'Creating New user, calling FND_USER_PKG.TestUserName for username :'||l_suggested_user_name);
3076: l_test_user :=
3077: fnd_user_pkg.testusername
3078: (x_user_name => l_suggested_user_name);
3079:
3080: -- debug log
3081: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)

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

3090:
3091: -- log file
3092: fnd_file.put_line
3093: (fnd_file.LOG,
3094: 'After calling FND_USER_PKG.TestUserName l_test_user : ' ||
3095: l_test_user);
3096:
3097: IF l_test_user IN (0, 3)
3098: THEN

Line 3116: fnd_user_pkg.createuseridparty

3112: fnd_crypto.randomstring
3113: (NVL (fnd_profile.VALUE ('SIGNON_PASSWORD_LENGTH'),
3114: 4));
3115: l_user_id :=
3116: fnd_user_pkg.createuseridparty
3117: (x_user_name => l_suggested_user_name,
3118: x_owner => 'SEED',
3119: x_unencrypted_password => x_password,
3120: x_description => 'Electronic renewals User',

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

3126: x_user_name := l_suggested_user_name;
3127: -- log file
3128: fnd_file.put_line
3129: (fnd_file.LOG,
3130: 'FND_USER_PKG.CreateUserIdParty l_user_id : ' ||
3131: l_user_id);
3132: ELSE -- l_test_user = 3
3133: -- USER_SYNCHED constant pls_integer := 3;
3134: -- Call the FND_USER_PKG.CreateUserIdParty WITHOUT password as password exists in OID

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

3130: 'FND_USER_PKG.CreateUserIdParty l_user_id : ' ||
3131: l_user_id);
3132: ELSE -- l_test_user = 3
3133: -- USER_SYNCHED constant pls_integer := 3;
3134: -- Call the FND_USER_PKG.CreateUserIdParty WITHOUT password as password exists in OID
3135: -- in Notification, put the password as '******'
3136:
3137: -- log file
3138: fnd_file.put_line

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

3136:
3137: -- log file
3138: fnd_file.put_line
3139: (fnd_file.LOG,
3140: 'USER_SYNCHED , calling FND_USER_PKG.CreateUserIdParty');
3141: l_user_id :=
3142: fnd_user_pkg.createuseridparty
3143: (x_user_name => l_suggested_user_name,
3144: x_owner => 'SEED',

Line 3142: fnd_user_pkg.createuseridparty

3138: fnd_file.put_line
3139: (fnd_file.LOG,
3140: 'USER_SYNCHED , calling FND_USER_PKG.CreateUserIdParty');
3141: l_user_id :=
3142: fnd_user_pkg.createuseridparty
3143: (x_user_name => l_suggested_user_name,
3144: x_owner => 'SEED',
3145: x_description => 'Electronic renewals User',
3146: x_email_address => UPPER

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

3152: x_password := '******';
3153: -- log file
3154: fnd_file.put_line
3155: (fnd_file.LOG,
3156: 'FND_USER_PKG.CreateUserIdParty l_user_id : ' ||
3157: l_user_id);
3158: END IF; -- l_test_user = 0 or 3
3159:
3160: -- debug log

Line 3233: fnd_user_resp_groups_api.insert_assignment

3229: l_responsibility_id);
3230: fnd_file.put_line (fnd_file.LOG,
3231: 'l_security_grp_id : ' ||
3232: l_security_grp_id);
3233: fnd_user_resp_groups_api.insert_assignment
3234: (user_id => l_user_id,
3235: responsibility_id => l_responsibility_id,
3236: responsibility_application_id => 515,
3237: security_group_id => l_security_grp_id,

Line 3303: ELSE -- csr_chk_qtc_fnd_user%FOUND

3299: fnd_file.put_line (fnd_file.LOG, 'l_test_user: ' ||
3300: l_test_user);
3301: RAISE fnd_api.g_exc_error;
3302: END IF; -- l_test_user check
3303: ELSE -- csr_chk_qtc_fnd_user%FOUND
3304: -- check if the above fnd_user is valid
3305: IF SYSDATE BETWEEN l_start_date AND NVL (l_end_date, SYSDATE +
3306: 1)
3307: THEN

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

3300: l_test_user);
3301: RAISE fnd_api.g_exc_error;
3302: END IF; -- l_test_user check
3303: ELSE -- csr_chk_qtc_fnd_user%FOUND
3304: -- check if the above fnd_user is valid
3305: IF SYSDATE BETWEEN l_start_date AND NVL (l_end_date, SYSDATE +
3306: 1)
3307: THEN
3308: -- fnd user is valid

Line 3308: -- fnd user is valid

3304: -- check if the above fnd_user is valid
3305: IF SYSDATE BETWEEN l_start_date AND NVL (l_end_date, SYSDATE +
3306: 1)
3307: THEN
3308: -- fnd user is valid
3309:
3310: -- log file
3311: fnd_file.put_line
3312: (fnd_file.LOG,

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

3309:
3310: -- log file
3311: fnd_file.put_line
3312: (fnd_file.LOG,
3313: 'chk_qtc_fnd_user%FOUND, check if the above fnd_user is valid');
3314: fnd_file.put_line (fnd_file.LOG,
3315: 'l_fnd_person_party_id : ' ||
3316: l_fnd_person_party_id);
3317: fnd_file.put_line (fnd_file.LOG,

Line 3321: -- Check the person_party_id of the fnd_user

3317: fnd_file.put_line (fnd_file.LOG,
3318: 'l_person_party_id : ' ||
3319: l_person_party_id);
3320:
3321: -- Check the person_party_id of the fnd_user
3322: IF l_fnd_person_party_id IS NULL
3323: THEN
3324: -- fnd_user.person_party_id IS NULL
3325: UPDATE fnd_user

Line 3324: -- fnd_user.person_party_id IS NULL

3320:
3321: -- Check the person_party_id of the fnd_user
3322: IF l_fnd_person_party_id IS NULL
3323: THEN
3324: -- fnd_user.person_party_id IS NULL
3325: UPDATE fnd_user
3326: SET person_party_id = l_person_party_id
3327: WHERE user_name = UPPER (TRIM (p_user_name));
3328: ELSIF l_person_party_id <> l_fnd_person_party_id

Line 3325: UPDATE fnd_user

3321: -- Check the person_party_id of the fnd_user
3322: IF l_fnd_person_party_id IS NULL
3323: THEN
3324: -- fnd_user.person_party_id IS NULL
3325: UPDATE fnd_user
3326: SET person_party_id = l_person_party_id
3327: WHERE user_name = UPPER (TRIM (p_user_name));
3328: ELSIF l_person_party_id <> l_fnd_person_party_id
3329: THEN

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

3326: SET person_party_id = l_person_party_id
3327: WHERE user_name = UPPER (TRIM (p_user_name));
3328: ELSIF l_person_party_id <> l_fnd_person_party_id
3329: THEN
3330: -- fnd_user.person_party_id does NOT match oks_person_party_id
3331: -- get the party names from hz_parties and raise error
3332: -- oks person party name
3333: OPEN csr_get_per_party_name (p_party_id => l_person_party_id);
3334: FETCH csr_get_per_party_name INTO l_oks_per_party_name;

Line 3383: CLOSE csr_chk_qtc_fnd_user;

3379:
3380: x_user_name := UPPER (TRIM (p_user_name));
3381: x_password := '******'; -- bug 5357772
3382:
3383: CLOSE csr_chk_qtc_fnd_user;
3384:
3385: RETURN;
3386: ELSE
3387: -- fnd user has expired RAISE exception;

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

3383: CLOSE csr_chk_qtc_fnd_user;
3384:
3385: RETURN;
3386: ELSE
3387: -- fnd user has expired RAISE exception;
3388: fnd_message.set_name ('OKS', 'OKS_SSO_USER_EXPIRED');
3389: fnd_message.set_token ('USER_NAME', UPPER (TRIM (p_user_name)));
3390: fnd_msg_pub.ADD;
3391: -- log file

Line 3397: CLOSE csr_chk_qtc_fnd_user;

3393: RAISE fnd_api.g_exc_error;
3394: END IF;
3395: END IF;
3396:
3397: CLOSE csr_chk_qtc_fnd_user;
3398:
3399: -- log file
3400: fnd_file.put_line (fnd_file.LOG, ' ');
3401: fnd_file.put_line