137: where responsibility_name = l_responsibility;
138:
139: cursor label_class_resp1 is
140: select 1
141: from GR_LABEL_CLASS_RESPS
142: where LABEL_CLASS_CODE = p_field_name_class;
143:
144:
145: cursor label_class_resp is
143:
144:
145: cursor label_class_resp is
146: select 1
147: from GR_LABEL_CLASS_RESPS
148: where LABEL_CLASS_CODE = p_field_name_class
149: and APPLICATION_ID = 557
150: and RESPONSIBILITY_ID = l_responsibility_id;
151:
150: and RESPONSIBILITY_ID = l_responsibility_id;
151:
152: cursor label_class_resp_ds is
153: select 1
154: from GR_LABEL_CLASS_RESPS
155: where LABEL_CLASS_CODE = p_field_name_class
156: and APPLICATION_ID = 557
157: and display_sequence = l_display_sequence;
158:
384: END IF;
385:
386: END IF; -- IF l_missing_count > 0 THEN
387:
388: -- Insert a record into GR_LABEL_CLASS_RESPS for each valid record in the passed table.
389:
390: FOR i IN 1 .. p_label_class_resp_tab.count LOOP
391:
392: l_responsibility_id := p_label_class_resp_tab(i).responsibility_id;
420: CLOSE resp_name_cur;
421: END IF;
422: IF l_responsibility_id is NOT NULL or l_responsibility is NOT NULL then
423:
424: -- Insert a record into GR_LABEL_CLASS_RESPS for each valid record in the passed table
425:
426: insert into gr_label_class_resps (
427: label_class_code, application_id, responsibility_id, display_sequence,
428: allow_create_update, created_by, creation_date, last_updated_by,
422: IF l_responsibility_id is NOT NULL or l_responsibility is NOT NULL then
423:
424: -- Insert a record into GR_LABEL_CLASS_RESPS for each valid record in the passed table
425:
426: insert into gr_label_class_resps (
427: label_class_code, application_id, responsibility_id, display_sequence,
428: allow_create_update, created_by, creation_date, last_updated_by,
429: last_update_date, last_update_login ) values
430: ( p_field_name_class,
500:
501:
502: ELSE -- object = R
503:
504: -- Insert a record into GR_LABEL_CLASS_RESPS for each valid record in the passed table.
505:
506: FOR i IN 1 .. p_label_class_resp_tab.count LOOP
507:
508: l_responsibility_id := p_label_class_resp_tab(i).responsibility_id;
548: CLOSE resp_name_cur;
549: END IF;
550:
551: -- Validate that the value of Responsibility Id for the specified field name class
552: -- does not exist in the table GR_LABEL_CLASS_RESPS.
553: -- If it does, write an error to the log file.
554:
555: OPEN label_class_resp;
556: FETCH label_class_resp INTO dummy;
564: END IF;
565: CLOSE label_class_resp;
566:
567: -- Validate that the value of display sequence for the specified field name class does not exist
568: -- in the table GR_LABEL_CLASS_RESPS. If it does, write an error to the log file
569:
570: OPEN label_class_resp_ds;
571: FETCH label_class_resp_ds INTO dummy;
572: IF label_class_resp_ds%NOTFOUND THEN
579: END IF;
580: CLOSE label_class_resp_ds;
581:
582: -- The values for field name class, responsibility id,
583: -- display_sequence and allow edit will be written to the GR_LABEL_CLASS_RESPS table.
584:
585: IF l_responsibility_id is NOT NULL then
586:
587: -- Insert a record into GR_LABEL_CLASS_RESPS for each valid record in the passed table
583: -- display_sequence and allow edit will be written to the GR_LABEL_CLASS_RESPS table.
584:
585: IF l_responsibility_id is NOT NULL then
586:
587: -- Insert a record into GR_LABEL_CLASS_RESPS for each valid record in the passed table
588:
589: insert into gr_label_class_resps (
590: label_class_code, application_id, responsibility_id, display_sequence,
591: allow_create_update, created_by, creation_date, last_updated_by,
585: IF l_responsibility_id is NOT NULL then
586:
587: -- Insert a record into GR_LABEL_CLASS_RESPS for each valid record in the passed table
588:
589: insert into gr_label_class_resps (
590: label_class_code, application_id, responsibility_id, display_sequence,
591: allow_create_update, created_by, creation_date, last_updated_by,
592: last_update_date, last_update_login ) values
593: ( p_field_name_class,
752: CLOSE resp_name_cur;
753: END IF;
754:
755: -- Validate that the value of Responsibility Id for the specified field name class exists in the table
756: -- GR_LABEL_CLASS_RESPS. If it does not, write an error to the log file.
757:
758:
759: OPEN label_class_resp;
760: FETCH label_class_resp INTO dummy;
766: END IF;
767: CLOSE label_class_resp;
768:
769: -- If sent in, validate that the value of display sequence for the specified Responsibility Id
770: -- and field name class does not exist in the table GR_LABEL_CLASS_RESPS.
771: -- If it does, write an error to the log file
772:
773: IF l_display_sequence is NOT NULL then
774: OPEN label_class_resp_ds;
783: END IF;
784: CLOSE label_class_resp_ds;
785: END IF; -- IF l_display_sequence is NOT NULL then
786:
787: -- The non-null values for display sequence and allow edit will be updated in the GR_LABEL_CLASS_RESPS table.
788: IF l_responsibility_id is NOT NULL then
789: update gr_label_class_resps
790: set display_sequence = l_display_sequence,
791: allow_create_update = l_allow_create_update
785: END IF; -- IF l_display_sequence is NOT NULL then
786:
787: -- The non-null values for display sequence and allow edit will be updated in the GR_LABEL_CLASS_RESPS table.
788: IF l_responsibility_id is NOT NULL then
789: update gr_label_class_resps
790: set display_sequence = l_display_sequence,
791: allow_create_update = l_allow_create_update
792: where label_class_code = p_field_name_class
793: and application_id = l_application_id
815:
816: IF p_object = 'C' then
817:
818: -- Delete all of the property related records in the
819: -- GR_LABEL_CLASSES_B, GR_LABEL_CLASSES_TL and GR_LABEL_CLASS_RESPS tables.
820:
821: gr_label_classes_tl_pkg.delete_rows
822: (p_commit => 'T',
823: p_called_by_form => 'F',
833: FND_MSG_PUB.ADD;
834: RAISE LTL_del_err;
835: END IF;
836:
837: DELETE FROM gr_label_class_resps
838: WHERE label_class_code = p_field_name_class;
839:
840: DELETE FROM gr_label_classes_b
841: WHERE label_class_code = p_field_name_class;
893:
894:
895: ELSE -- object = R -- up to here
896:
897: -- Validate that the value of Field Name Class exists in the table GR_LABEL_CLASS_RESPS.
898: -- If it does not, write an error to the log file
899: OPEN label_class_resp1; -- lap
900: FETCH label_class_resp1 INTO dummy;
901: IF label_class_resp1%NOTFOUND THEN
945: CLOSE resp_name_cur;
946: END IF;
947:
948: -- Validate that the value of Responsibility Id for the specified field name class exists in the
949: --table GR_LABEL_CLASS_RESPS. If it does not, write an error to the log file.
950:
951: OPEN label_class_resp;
952: FETCH label_class_resp INTO dummy;
953: IF label_class_resp%NOTFOUND THEN
957: RAISE LT_Exists_Error;
958: END IF;
959: CLOSE label_class_resp;
960:
961: -- Delete the record in GR_ GR_LABEL_CLASS_RESPS
962: -- table for the specified field name class and responsibility id.
963: IF l_responsibility_id is NOT NULL then
964: delete from gr_label_class_resps
965: where label_class_code = p_field_name_class
960:
961: -- Delete the record in GR_ GR_LABEL_CLASS_RESPS
962: -- table for the specified field name class and responsibility id.
963: IF l_responsibility_id is NOT NULL then
964: delete from gr_label_class_resps
965: where label_class_code = p_field_name_class
966: and application_id = l_application_id
967: and responsibility_id = l_responsibility_id ;
968: END IF; --IF l_responsibility_id is NOT NULL then