311: FOR new_user_resp_rec IN new_user_resp_csr LOOP
312:
313: UPDATE zpb_account_states
314: SET account_status = 10,
315: last_updated_by = fnd_global.user_id,
316: last_update_date = SYSDATE,
317: last_update_login = fnd_global.login_id,
318: account_status_update_date = SYSDATE
319: WHERE business_area_id = p_business_area_id
313: UPDATE zpb_account_states
314: SET account_status = 10,
315: last_updated_by = fnd_global.user_id,
316: last_update_date = SYSDATE,
317: last_update_login = fnd_global.login_id,
318: account_status_update_date = SYSDATE
319: WHERE business_area_id = p_business_area_id
320: AND user_id = new_user_resp_rec.user_id
321: AND resp_id = new_user_resp_rec.resp_id
364: brand_new_user_resp_rec.user_id,
365: brand_new_user_resp_rec.resp_id,
366: null,
367: ADD_ROLE,
368: fnd_global.user_id,
369: SYSDATE,
370: fnd_global.user_id,
371: SYSDATE,
372: fnd_global.login_id,
366: null,
367: ADD_ROLE,
368: fnd_global.user_id,
369: SYSDATE,
370: fnd_global.user_id,
371: SYSDATE,
372: fnd_global.login_id,
373: SYSDATE);
374:
368: fnd_global.user_id,
369: SYSDATE,
370: fnd_global.user_id,
371: SYSDATE,
372: fnd_global.login_id,
373: SYSDATE);
374:
375: END LOOP;
376:
377: FOR expired_user_resp_rec IN expired_user_resp_csr LOOP
378:
379: UPDATE zpb_account_states
380: SET account_status = -10,
381: last_updated_by = fnd_global.user_id,
382: last_update_date = SYSDATE,
383: last_update_login = fnd_global.login_id,
384: account_status_update_date = SYSDATE
385: WHERE business_area_id = p_business_area_id
379: UPDATE zpb_account_states
380: SET account_status = -10,
381: last_updated_by = fnd_global.user_id,
382: last_update_date = SYSDATE,
383: last_update_login = fnd_global.login_id,
384: account_status_update_date = SYSDATE
385: WHERE business_area_id = p_business_area_id
386: AND user_id = expired_user_resp_rec.user_id
387: AND resp_id = expired_user_resp_rec.resp_id
419:
420: -- could be an existing entry
421: update zpb_account_states
422: set account_status = ADD_ROLE,
423: LAST_UPDATED_BY = fnd_global.USER_ID,
424: LAST_UPDATE_DATE = SYSDATE,
425: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
426: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
427: where subject_id = t_subid1
421: update zpb_account_states
422: set account_status = ADD_ROLE,
423: LAST_UPDATED_BY = fnd_global.USER_ID,
424: LAST_UPDATE_DATE = SYSDATE,
425: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
426: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
427: where subject_id = t_subid1
428: and group_id = t_subid2
429: and business_area_id = p_business_area_id;
466: eachgrant.user_id,
467: eachgrant.responsibility_id,
468: null,
469: ADD_ROLE,
470: fnd_global.USER_ID,
471: SYSDATE,
472: fnd_global.USER_ID,
473: SYSDATE,
474: fnd_global.LOGIN_ID,
468: null,
469: ADD_ROLE,
470: fnd_global.USER_ID,
471: SYSDATE,
472: fnd_global.USER_ID,
473: SYSDATE,
474: fnd_global.LOGIN_ID,
475: SYSDATE);
476: end if;
470: fnd_global.USER_ID,
471: SYSDATE,
472: fnd_global.USER_ID,
473: SYSDATE,
474: fnd_global.LOGIN_ID,
475: SYSDATE);
476: end if;
477:
478: if (b_writetolog) then
523: -- mark all existing user accounts as expired
524: --if n_status <> HIDE_ACCOUNT then
525: update zpb_account_states
526: set account_status = EXP_USER,
527: LAST_UPDATED_BY = fnd_global.USER_ID,
528: LAST_UPDATE_DATE = SYSDATE,
529: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
530: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
531: -- Commented out for Bug: 5007124
525: update zpb_account_states
526: set account_status = EXP_USER,
527: LAST_UPDATED_BY = fnd_global.USER_ID,
528: LAST_UPDATE_DATE = SYSDATE,
529: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
530: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
531: -- Commented out for Bug: 5007124
532: -- HAS_READ_ACCESS = 0
533: where subject_id = t_subid1
551: -- mark all accounts as new
552: update zpb_account_states
553: set account_status = NEW_USER,
554: assignee = null,
555: LAST_UPDATED_BY = fnd_global.USER_ID,
556: LAST_UPDATE_DATE = SYSDATE,
557: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
558: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
559: where subject_id = t_subid1
553: set account_status = NEW_USER,
554: assignee = null,
555: LAST_UPDATED_BY = fnd_global.USER_ID,
556: LAST_UPDATE_DATE = SYSDATE,
557: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
558: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
559: where subject_id = t_subid1
560: and account_status <> CURRENT_USER
561: and business_area_id = p_business_area_id;
583:
584: -- update the user state table to indicate removed role
585: update zpb_account_states
586: set account_status = RMV_ROLE,
587: LAST_UPDATED_BY = fnd_global.USER_ID,
588: LAST_UPDATE_DATE = SYSDATE,
589: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
590: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
591: where subject_id = t_subid1
585: update zpb_account_states
586: set account_status = RMV_ROLE,
587: LAST_UPDATED_BY = fnd_global.USER_ID,
588: LAST_UPDATE_DATE = SYSDATE,
589: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
590: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
591: where subject_id = t_subid1
592: and group_id = t_subid2
593: and business_area_id = p_business_area_id
612: -- mark all accounts as new
613: update zpb_account_states
614: set account_status = NEW_USER,
615: assignee = null,
616: LAST_UPDATED_BY = fnd_global.USER_ID,
617: LAST_UPDATE_DATE = SYSDATE,
618: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
619: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
620: where subject_id = t_subid1
614: set account_status = NEW_USER,
615: assignee = null,
616: LAST_UPDATED_BY = fnd_global.USER_ID,
617: LAST_UPDATE_DATE = SYSDATE,
618: LAST_UPDATE_LOGIN = fnd_global.LOGIN_ID,
619: ACCOUNT_STATUS_UPDATE_DATE = SYSDATE
620: where subject_id = t_subid1
621: and group_id = t_subid2
622: and business_area_id = p_business_area_id;
770: 'N',
771: A.USER_ID,
772: 'ZPB'||A.USER_ID||'A'||p_business_area_id,
773: sysdate,
774: FND_GLOBAL.USER_ID,
775: FND_GLOBAL.LOGIN_ID,
776: sysdate,
777: FND_GLOBAL.USER_ID
778: from ZPB_BUSAREA_USERS A,
771: A.USER_ID,
772: 'ZPB'||A.USER_ID||'A'||p_business_area_id,
773: sysdate,
774: FND_GLOBAL.USER_ID,
775: FND_GLOBAL.LOGIN_ID,
776: sysdate,
777: FND_GLOBAL.USER_ID
778: from ZPB_BUSAREA_USERS A,
779: FND_USER_RESP_GROUPS B,
773: sysdate,
774: FND_GLOBAL.USER_ID,
775: FND_GLOBAL.LOGIN_ID,
776: sysdate,
777: FND_GLOBAL.USER_ID
778: from ZPB_BUSAREA_USERS A,
779: FND_USER_RESP_GROUPS B,
780: FND_RESPONSIBILITY C
781: where A.USER_ID = B.USER_ID
867: FOR new_sec_user_resp_rec IN new_sec_user_resp_csr LOOP
868: -- Fix for Bug: 5620740
869: UPDATE zpb_account_states
870: SET account_status = 0,
871: last_updated_by = fnd_global.user_id,
872: last_update_date = SYSDATE,
873: last_update_login = fnd_global.login_id,
874: account_status_update_date = SYSDATE
875: WHERE business_area_id = p_business_area_id
869: UPDATE zpb_account_states
870: SET account_status = 0,
871: last_updated_by = fnd_global.user_id,
872: last_update_date = SYSDATE,
873: last_update_login = fnd_global.login_id,
874: account_status_update_date = SYSDATE
875: WHERE business_area_id = p_business_area_id
876: AND user_id = new_sec_user_resp_rec.user_id
877: AND resp_id = new_sec_user_resp_rec.resp_id
882: FOR expired_sec_user_resp_rec IN expired_sec_user_resp_csr LOOP
883:
884: UPDATE zpb_account_states
885: SET account_status = -10,
886: last_updated_by = fnd_global.user_id,
887: last_update_date = SYSDATE,
888: last_update_login = fnd_global.login_id,
889: account_status_update_date = SYSDATE
890: WHERE business_area_id = p_business_area_id
884: UPDATE zpb_account_states
885: SET account_status = -10,
886: last_updated_by = fnd_global.user_id,
887: last_update_date = SYSDATE,
888: last_update_login = fnd_global.login_id,
889: account_status_update_date = SYSDATE
890: WHERE business_area_id = p_business_area_id
891: AND user_id = expired_sec_user_resp_rec.user_id
892: AND resp_id = expired_sec_user_resp_rec.resp_id