DBA Data[Home] [Help]

APPS.WSM_SPLIT_PERC_PVT dependencies on WSM_COPRODUCT_SPLIT_PERC

Line 50: insert into WSM_COPRODUCT_SPLIT_PERC

46:
47: x_err_code := 0;
48: x_err_msg := NULL;
49:
50: insert into WSM_COPRODUCT_SPLIT_PERC
51: (
52: CO_PRODUCT_GROUP_ID,
53: CO_PRODUCT_ID,
54: ORGANIZATION_ID,

Line 176: UPDATE WSM_COPRODUCT_SPLIT_PERC

172:
173: x_err_code := 0;
174: x_err_msg := NULL;
175:
176: UPDATE WSM_COPRODUCT_SPLIT_PERC
177: SET
178: CO_PRODUCT_GROUP_ID = p_co_product_group_id,
179: CO_PRODUCT_ID = p_co_product_id,
180: ORGANIZATION_ID = p_organization_id,

Line 257: FROM WSM_COPRODUCT_SPLIT_PERC

253: ) IS
254:
255: CURSOR C IS
256: SELECT *
257: FROM WSM_COPRODUCT_SPLIT_PERC
258: WHERE rowid = p_rowid
259: FOR UPDATE of co_product_id NOWAIT;
260:
261: l_rec C%ROWTYPE;

Line 368: DELETE FROM WSM_COPRODUCT_SPLIT_PERC

364:
365: x_err_code := 0;
366: x_err_msg := NULL;
367:
368: DELETE FROM WSM_COPRODUCT_SPLIT_PERC
369: WHERE co_product_id = p_co_product_id
370: AND co_product_group_id = p_co_product_group_id
371: AND organization_id = p_organization_id;
372:

Line 393: DELETE FROM WSM_COPRODUCT_SPLIT_PERC

389:
390: x_err_code := 0;
391: x_err_msg := NULL;
392:
393: DELETE FROM WSM_COPRODUCT_SPLIT_PERC
394: WHERE co_product_group_id = p_co_product_group_id
395: AND organization_id = p_organization_id;
396:
397: EXCEPTION

Line 427: delete from wsm_coproduct_split_perc

423:
424: x_err_code := 0;
425: x_err_msg := NULL;
426:
427: delete from wsm_coproduct_split_perc
428: where co_product_group_id = l_co_product_gr_id
429: and ( (effectivity_date >= from_eff_dt and
430: ((disable_date is not null and disable_date < nvl(to_eff_dt,disable_date+1))
431: OR

Line 449: from wsm_coproduct_split_perc

445: stmt_num := 10;
446:
447: select max(effectivity_date)
448: into h_eff_date
449: from wsm_coproduct_split_perc
450: where co_product_group_id = l_co_product_gr_id
451: and effectivity_date <= from_eff_dt
452: and not ( effectivity_date = from_eff_dt
453: and

Line 473: from wsm_coproduct_split_perc

469:
470: stmt_num := 20;
471: select min(disable_date)
472: into h_disable_date
473: from wsm_coproduct_split_perc
474: where co_product_group_id = l_co_product_gr_id
475: and nvl(disable_date,to_eff_dt+1) >= to_eff_dt
476: and not (effectivity_date = from_eff_dt and nvl(disable_date,to_eff_dt+1) = to_eff_dt);
477:

Line 503: from wsm_coproduct_split_perc

499: stmt_num := 30;
500:
501: select 1
502: into intersect_exists
503: from wsm_coproduct_split_perc
504: where co_product_group_id = l_co_product_gr_id
505: and effectivity_date < from_eff_dt
506: and effectivity_date <= h_eff_date
507: and (( (disable_date is not null )

Line 536: insert into wsm_coproduct_split_perc (

532: IF h_eff_date <> from_eff_dt THEN
533:
534: stmt_num := 40;
535:
536: insert into wsm_coproduct_split_perc (
537: co_product_group_id,
538: co_product_id,
539: ORGANIZATION_ID,
540: CREATION_DATE,

Line 563: from wsm_coproduct_split_perc

559: SPLIT,
560: h_eff_date,
561: from_eff_dt,
562: PRIMARY_FLAG
563: from wsm_coproduct_split_perc
564: where co_product_group_id = l_co_product_gr_id
565: and effectivity_date = h_eff_date
566: and ((disable_date IS NULL and h_disable_date IS NULL) OR (disable_date IS NOT NULL AND (disable_date = nvl(h_disable_date,disable_date+1)))));
567: end if;

Line 573: insert into wsm_coproduct_split_perc (

569: if (nvl(h_disable_date,to_eff_dt+1) <> to_eff_dt) THEN
570:
571: stmt_num := 50;
572:
573: insert into wsm_coproduct_split_perc (
574: co_product_group_id,
575: co_product_id,
576: ORGANIZATION_ID,
577: CREATION_DATE,

Line 600: from wsm_coproduct_split_perc

596: SPLIT,
597: to_eff_dt,
598: h_disable_date,
599: PRIMARY_FLAG
600: from wsm_coproduct_split_perc
601: where co_product_group_id = l_co_product_gr_id
602: and ((disable_date IS NULL and h_disable_date IS NULL) OR (disable_date IS NOT NULL AND (disable_date = nvl(h_disable_date,disable_date+1))))
603: and not(effectivity_date = from_eff_dt));
604:

Line 610: delete from wsm_coproduct_split_perc

606: end if;
607:
608: stmt_num := 60;
609:
610: delete from wsm_coproduct_split_perc
611: where co_product_group_id = l_co_product_gr_id
612: and effectivity_date = h_eff_date
613: and ((disable_date IS NULL and h_disable_date IS NULL) OR (disable_date IS NOT NULL AND (disable_date = nvl(h_disable_date,disable_date+1))));
614: --End of possibility 1.

Line 626: update wsm_coproduct_split_perc

622: stmt_num := 70;
623:
624: IF to_eff_dt is not null THEN
625:
626: update wsm_coproduct_split_perc
627: set effectivity_date = to_eff_dt
628: where co_product_group_id = l_co_product_gr_id
629: and ((disable_date IS NULL and h_disable_date IS NULL) OR (disable_date IS NOT NULL AND (disable_date = nvl(h_disable_date,disable_date+1))));
630:

Line 639: update wsm_coproduct_split_perc

635: update D5-D10 to D5-D7*/
636:
637: stmt_num := 80;
638:
639: update wsm_coproduct_split_perc
640: set disable_date = from_eff_dt
641: where co_product_group_id = l_co_product_gr_id
642: and effectivity_date = h_eff_date;
643:

Line 673: from WSM_COPRODUCT_SPLIT_PERC

669:
670: BEGIN
671: select 1
672: into l_num
673: from WSM_COPRODUCT_SPLIT_PERC
674: where organization_id = p_organization_id
675: and co_product_group_id = p_co_product_group_id
676: and disable_date is not NULL
677: and disable_date <= p_effectivity_date;

Line 695: from WSM_COPRODUCT_SPLIT_PERC

691: BEGIN
692: IF p_disable_date is NOT NULL THEN
693: select 1
694: into l_num
695: from WSM_COPRODUCT_SPLIT_PERC
696: where organization_id = p_organization_id
697: and co_product_group_id = p_co_product_group_id
698: and effectivity_date >= p_disable_date;
699:

Line 738: DELETE FROM WSM_COPRODUCT_SPLIT_PERC

734: -- Indicates that effe. date will result in some deletion
735: IF p_update_range IN (1,3) THEN
736: -- delete any range which has the disable date less than or equal to the
737: -- new effectivity date
738: DELETE FROM WSM_COPRODUCT_SPLIT_PERC
739: WHERE organization_id = p_organization_id
740: AND co_product_group_id = p_co_product_group_id
741: AND disable_date is NOT NULL
742: AND disable_date <= p_effectivity_date;

Line 747: UPDATE WSM_COPRODUCT_SPLIT_PERC

743: END IF;
744:
745: -- Update the effect. date of the range that has the effec. date less than the
746: -- new effectivity date
747: UPDATE WSM_COPRODUCT_SPLIT_PERC
748: SET effectivity_date = p_effectivity_date
749: WHERE organization_id = p_organization_id
750: AND co_product_group_id = p_co_product_group_id
751: AND effectivity_date < p_effectivity_date;

Line 758: FROM WSM_COPRODUCT_SPLIT_PERC

754: IF p_update_range IN (2,3) THEN
755: -- delete any range which has the effective date greater than or equal
756: -- to the new disable date..
757: DELETE
758: FROM WSM_COPRODUCT_SPLIT_PERC
759: WHERE organization_id = p_organization_id
760: AND co_product_group_id = p_co_product_group_id
761: AND effectivity_date >= NVL(p_disable_date,effectivity_date-1);
762:

Line 771: from WSM_COPRODUCT_SPLIT_PERC

767: l_num := 0;
768:
769: select 1
770: into l_num
771: from WSM_COPRODUCT_SPLIT_PERC
772: WHERE organization_id = p_organization_id
773: AND co_product_group_id = p_co_product_group_id
774: AND disable_date IS NULL;
775:

Line 788: UPDATE WSM_COPRODUCT_SPLIT_PERC

784: IF l_num = 1 THEN
785: -- disable date has been changed from NULL to a non-null value...
786: -- so update all records with NULL disable date.
787: IF p_disable_date IS NOT NULL THEN
788: UPDATE WSM_COPRODUCT_SPLIT_PERC
789: SET disable_date = p_disable_date
790: WHERE organization_id = p_organization_id
791: AND co_product_group_id = p_co_product_group_id
792: AND disable_date is NULL;

Line 799: UPDATE WSM_COPRODUCT_SPLIT_PERC

795: ELSIF l_num = 0 THEN
796:
797: -- No records exist with NULL disable date
798:
799: UPDATE WSM_COPRODUCT_SPLIT_PERC
800: SET disable_date = p_disable_date
801: WHERE organization_id = p_organization_id
802: AND co_product_group_id = p_co_product_group_id
803: AND disable_date IN ( SELECT MAX(disable_date)

Line 804: FROM WSM_COPRODUCT_SPLIT_PERC

800: SET disable_date = p_disable_date
801: WHERE organization_id = p_organization_id
802: AND co_product_group_id = p_co_product_group_id
803: AND disable_date IN ( SELECT MAX(disable_date)
804: FROM WSM_COPRODUCT_SPLIT_PERC
805: WHERE organization_id = p_organization_id
806: AND co_product_group_id = p_co_product_group_id);
807: END IF;
808:

Line 838: from WSM_COPRODUCT_SPLIT_PERC

834: p_last_update_date IN DATE,
835: p_last_updated_by IN NUMBER
836: ) IS
837: CURSOR range_cursor IS select distinct effectivity_date,disable_date
838: from WSM_COPRODUCT_SPLIT_PERC
839: where co_product_group_id= p_co_product_group_id;
840:
841: l_num NUMBER:=0;
842:

Line 855: from WSM_COPRODUCT_SPLIT_PERC

851:
852: BEGIN
853: select 1
854: into l_num
855: from WSM_COPRODUCT_SPLIT_PERC
856: WHERE co_product_group_id = p_co_product_group_id ;
857:
858: EXCEPTION
859: WHEN NO_DATA_FOUND THEN

Line 948: from WSM_COPRODUCT_SPLIT_PERC

944: BEGIN
945:
946: select 1
947: into l_num
948: from WSM_COPRODUCT_SPLIT_PERC
949: where organization_id = p_organization_id
950: and co_product_group_id = p_co_product_group_id
951: and effectivity_date = p_effectivity_date
952: and ((p_disable_date is NULL and disable_date is NULL) OR (p_disable_date = disable_date))

Line 997: from WSM_COPRODUCT_SPLIT_PERC

993: check if it is the only one left and it is the primary.. */
994:
995: SELECT 1
996: INTO l_num
997: from WSM_COPRODUCT_SPLIT_PERC
998: where organization_id = p_organization_id
999: and co_product_group_id = p_co_product_group_id
1000: and co_product_id <> p_co_product_id;
1001:

Line 1017: from WSM_COPRODUCT_SPLIT_PERC

1013: BEGIN
1014:
1015: SELECT 1
1016: INTO l_num
1017: from WSM_COPRODUCT_SPLIT_PERC
1018: where organization_id = p_organization_id
1019: and co_product_group_id = p_co_product_group_id
1020: and co_product_id = p_co_product_id
1021: and split > 0 ;

Line 1039: from WSM_COPRODUCT_SPLIT_PERC

1035: -- given co_product_group_id has 0%
1036: /*Bug 3647337
1037: select distinct max(count(*))
1038: into l_num
1039: from WSM_COPRODUCT_SPLIT_PERC
1040: where organization_id = p_organization_id
1041: and co_product_group_id = p_co_product_group_id
1042: and split = 0
1043: group by co_product_id;

Line 1058: from WSM_COPRODUCT_SPLIT_PERC

1054:
1055: --Following SQL is added for 3647337
1056: select min(sum(split))
1057: into l_num
1058: from WSM_COPRODUCT_SPLIT_PERC
1059: where organization_id = p_organization_id
1060: and co_product_group_id = p_co_product_group_id
1061: group by co_product_id;
1062: -- If equal then atleast one co-product has 0% split in all the ranges..

Line 1105: FROM WSM_COPRODUCT_SPLIT_PERC

1101: 3647337*/
1102: --Following SQL is added for 3647337
1103: SELECT count(*)
1104: INTO l_num
1105: FROM WSM_COPRODUCT_SPLIT_PERC
1106: where organization_id = p_organization_id
1107: and co_product_group_id = p_co_product_group_id
1108: group by EFFECTIVITY_DATE;
1109:

Line 1148: FROM WSM_COPRODUCT_SPLIT_PERC

1144: D5 -------------> D35
1145: */
1146: SELECT 1
1147: INTO l_num
1148: FROM WSM_COPRODUCT_SPLIT_PERC
1149: where organization_id = p_organization_id
1150: and co_product_group_id = p_co_product_group_id
1151: and disable_date is NOT NULL
1152: and effectivity_date >= p_effectivity_date

Line 1167: FROM WSM_COPRODUCT_SPLIT_PERC

1163: */
1164:
1165: SELECT 1
1166: INTO l_num
1167: FROM WSM_COPRODUCT_SPLIT_PERC
1168: WHERE organization_id = p_organization_id
1169: and co_product_group_id = p_co_product_group_id
1170: and disable_date is NOT NULL
1171: and effectivity_date >= p_effectivity_date;

Line 1210: FROM WSM_COPRODUCT_SPLIT_PERC

1206: IF p_disable_date is NULL THEN
1207:
1208: SELECT 1
1209: INTO l_num
1210: FROM WSM_COPRODUCT_SPLIT_PERC
1211: WHERE organization_id = p_organization_id
1212: AND co_product_group_id = p_co_product_group_id
1213: AND effectivity_date = p_effectivity_date
1214: AND disable_date IS NULL;

Line 1222: FROM WSM_COPRODUCT_SPLIT_PERC

1218: ELSE
1219:
1220: SELECT 1
1221: INTO l_num
1222: FROM WSM_COPRODUCT_SPLIT_PERC
1223: WHERE organization_id = p_organization_id
1224: AND co_product_group_id = p_co_product_group_id
1225: AND effectivity_date = p_effectivity_date
1226: AND disable_date = p_disable_date;