457: AND cq.calc_formula_id = ccf.calc_formula_id;
458:
459: l_number_dim NUMBER;
460: BEGIN
461: l_user_id := fnd_global.user_id;
462: l_resp_id := fnd_global.resp_id;
463: l_login_id := fnd_global.login_id;
464: IF x_srp_plan_assign_id IS NOT NULL AND x_quota_id IS NULL THEN
465: -- A new plan is assigned to a salesrep
458:
459: l_number_dim NUMBER;
460: BEGIN
461: l_user_id := fnd_global.user_id;
462: l_resp_id := fnd_global.resp_id;
463: l_login_id := fnd_global.login_id;
464: IF x_srp_plan_assign_id IS NOT NULL AND x_quota_id IS NULL THEN
465: -- A new plan is assigned to a salesrep
466: -- case 1: callled from cn_srp_quota_assigns_pkg
459: l_number_dim NUMBER;
460: BEGIN
461: l_user_id := fnd_global.user_id;
462: l_resp_id := fnd_global.resp_id;
463: l_login_id := fnd_global.login_id;
464: IF x_srp_plan_assign_id IS NOT NULL AND x_quota_id IS NULL THEN
465: -- A new plan is assigned to a salesrep
466: -- case 1: callled from cn_srp_quota_assigns_pkg
467: FOR itd_p_rec IN ytd_flag
1375: AND cq.calc_formula_id = ccf.calc_formula_id ;
1376:
1377: l_count NUMBER;
1378: BEGIN
1379: l_user_id := fnd_global.user_id;
1380: l_login_id := fnd_global.login_id;
1381: IF x_operation = 'INSERT' THEN
1382: -- get number dim if necessary
1383: IF x_number_dim is NULL THEN
1376:
1377: l_count NUMBER;
1378: BEGIN
1379: l_user_id := fnd_global.user_id;
1380: l_login_id := fnd_global.login_id;
1381: IF x_operation = 'INSERT' THEN
1382: -- get number dim if necessary
1383: IF x_number_dim is NULL THEN
1384: l_number_dim := 0;