31: select COUNT(*)
32: into MANDATORY_COUNT
33: from AME_MANDATORY_ATTRIBUTES
34: where ATTRIBUTE_ID = X_ATTRIBUTE_ID
35: and ACTION_TYPE_ID = ame_util.mandAttActionTypeId
36: and SYSDATE between START_DATE
37: and nvl(END_DATE - (1/86400), sysdate);
38: if (MANDATORY_COUNT > 0) then
39: NEW_USE_COUNT := 0;
108: end if;
109: return(NEW_USE_COUNT);
110: exception
111: when others then
112: ame_util.runtimeException('ame_attribute_usages_api',
113: 'CALCULATE_USE_COUNT',
114: sqlcode,
115: sqlerrm);
116: raise;
156: end if;
157: return(true);
158: exception
159: when others then
160: ame_util.runtimeException('ame_attribute_usages_api',
161: 'IS_SEED_USG_RULE_MODIFIED',
162: sqlcode,
163: sqlerrm);
164: raise;
318: where ATTRIBUTE_ID = X_ATTRIBUTE_ID
319: and APPLICATION_ID = X_APPLICATION_ID;
320: exception
321: when others then
322: ame_util.runtimeException('ame_attribute_usages_api',
323: 'RECTIFY_RULE_MOD_SEED_USAGE',
324: sqlcode,
325: sqlerrm);
326: raise;
341: )
342: is
343: invalidIsStaticException exception;
344: errorCode integer;
345: errorMessage ame_util.longestStringType;
346: begin
347: if X_IS_STATIC NOT in
348: (ame_util.booleanFalse, ame_util.booleanTrue)
349: then
344: errorCode integer;
345: errorMessage ame_util.longestStringType;
346: begin
347: if X_IS_STATIC NOT in
348: (ame_util.booleanFalse, ame_util.booleanTrue)
349: then
350: raise invalidIsStaticException;
351: end if;
352: exception
353: when invalidIsStaticException then
354: errorCode := -20001;
355: errorMessage :=
356: 'OAM is attempting to upload an attribute usage that is neither static or dynamic. ';
357: ame_util.runtimeException(packageNameIn => 'ame_attribute_usages_api',
358: routineNameIn => 'validate_is_static',
359: exceptionNumberIn => errorCode,
360: exceptionStringIn => errorMessage);
361: raise_application_error(errorCode,
360: exceptionStringIn => errorMessage);
361: raise_application_error(errorCode,
362: errorMessage);
363: when others then
364: ame_util.runtimeException('ame_attribute_usages_api',
365: 'validate_is_static',
366: sqlcode,
367: sqlerrm);
368: raise;
372: )
373: is
374: invalidRejectionException exception;
375: errorCode integer;
376: errorMessage ame_util.longestStringType;
377: begin
378: if X_QUERY_STRING NOT in
379: (ame_util.continueAllOtherItems,
380: ame_util.continueOtherSubItems,
375: errorCode integer;
376: errorMessage ame_util.longestStringType;
377: begin
378: if X_QUERY_STRING NOT in
379: (ame_util.continueAllOtherItems,
380: ame_util.continueOtherSubItems,
381: ame_util.stopAllItems)
382: then
383: raise invalidRejectionException;
376: errorMessage ame_util.longestStringType;
377: begin
378: if X_QUERY_STRING NOT in
379: (ame_util.continueAllOtherItems,
380: ame_util.continueOtherSubItems,
381: ame_util.stopAllItems)
382: then
383: raise invalidRejectionException;
384: end if;
377: begin
378: if X_QUERY_STRING NOT in
379: (ame_util.continueAllOtherItems,
380: ame_util.continueOtherSubItems,
381: ame_util.stopAllItems)
382: then
383: raise invalidRejectionException;
384: end if;
385: exception
386: when invalidRejectionException then
387: errorCode := -20001;
388: errorMessage :=
389: 'OAM is attempting to upload a REJECTION RESPONSE attribute with an invalid usage. ';
390: ame_util.runtimeException(packageNameIn => 'ame_attribute_usages_api',
391: routineNameIn => 'validate_rejection',
392: exceptionNumberIn => errorCode,
393: exceptionStringIn => errorMessage);
394: raise_application_error(errorCode,
393: exceptionStringIn => errorMessage);
394: raise_application_error(errorCode,
395: errorMessage);
396: when others then
397: ame_util.runtimeException('ame_attribute_usages_api',
398: 'validate_rejection',
399: sqlcode,
400: sqlerrm);
401: raise;
531: from AME_ITEM_CLASSES ICLS,
532: AME_ITEM_CLASS_USAGES ICLU
533: where ICLU.APPLICATION_ID = X_APPLICATION_ID
534: and ICLS.ITEM_CLASS_ID = ICLU.ITEM_CLASS_ID
535: and ICLS.NAME = ame_util.lineitemitemclassname
536: and sysdate between ICLS.START_DATE and nvl(ICLS.END_DATE - (1/86400), sysdate)
537: and sysdate between ICLU.START_DATE and nvl(ICLU.END_DATE - (1/86400), sysdate);
538: begin
539: open CSR_GET_LINE_ITEM_CLASS_QUERY;
728: --check if ame full patch for 11510 is applied
729: X_AME_INSTALLATION_LEVEL:= fnd_profile.value('AME_INSTALLATION_LEVEL');
730: --if full patch is not applied, and 11510 ldt is uploaded, do not upload use_workflow and rejection_response usages
731: if (X_AME_INSTALLATION_LEVEL is null) and
732: (X_ATTRIBUTE_NAME in (ame_util.useWorkflowAttribute
733: ,ame_util.rejectionResponseAttribute
734: ,'REPEAT_SUBSTITUTIONS'
735: ,ame_util.nonDefStartingPointPosAttr
736: ,ame_util.nonDefPosStructureAttr
729: X_AME_INSTALLATION_LEVEL:= fnd_profile.value('AME_INSTALLATION_LEVEL');
730: --if full patch is not applied, and 11510 ldt is uploaded, do not upload use_workflow and rejection_response usages
731: if (X_AME_INSTALLATION_LEVEL is null) and
732: (X_ATTRIBUTE_NAME in (ame_util.useWorkflowAttribute
733: ,ame_util.rejectionResponseAttribute
734: ,'REPEAT_SUBSTITUTIONS'
735: ,ame_util.nonDefStartingPointPosAttr
736: ,ame_util.nonDefPosStructureAttr
737: ,ame_util.transactionReqPositionAttr
731: if (X_AME_INSTALLATION_LEVEL is null) and
732: (X_ATTRIBUTE_NAME in (ame_util.useWorkflowAttribute
733: ,ame_util.rejectionResponseAttribute
734: ,'REPEAT_SUBSTITUTIONS'
735: ,ame_util.nonDefStartingPointPosAttr
736: ,ame_util.nonDefPosStructureAttr
737: ,ame_util.transactionReqPositionAttr
738: ,ame_util.topPositionIdAttribute)
739: ) then
732: (X_ATTRIBUTE_NAME in (ame_util.useWorkflowAttribute
733: ,ame_util.rejectionResponseAttribute
734: ,'REPEAT_SUBSTITUTIONS'
735: ,ame_util.nonDefStartingPointPosAttr
736: ,ame_util.nonDefPosStructureAttr
737: ,ame_util.transactionReqPositionAttr
738: ,ame_util.topPositionIdAttribute)
739: ) then
740: return;
733: ,ame_util.rejectionResponseAttribute
734: ,'REPEAT_SUBSTITUTIONS'
735: ,ame_util.nonDefStartingPointPosAttr
736: ,ame_util.nonDefPosStructureAttr
737: ,ame_util.transactionReqPositionAttr
738: ,ame_util.topPositionIdAttribute)
739: ) then
740: return;
741: end if;
734: ,'REPEAT_SUBSTITUTIONS'
735: ,ame_util.nonDefStartingPointPosAttr
736: ,ame_util.nonDefPosStructureAttr
737: ,ame_util.transactionReqPositionAttr
738: ,ame_util.topPositionIdAttribute)
739: ) then
740: return;
741: end if;
742:
740: return;
741: end if;
742:
743: if X_AME_INSTALLATION_LEVEL is not null then
744: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerLIAttribute
745: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerItemAttribute;
746: end if;
747: if X_ATTRIBUTE_NAME = ame_util.restrictiveLIEvalAttribute
748: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveItemEvalAttribute;
741: end if;
742:
743: if X_AME_INSTALLATION_LEVEL is not null then
744: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerLIAttribute
745: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerItemAttribute;
746: end if;
747: if X_ATTRIBUTE_NAME = ame_util.restrictiveLIEvalAttribute
748: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveItemEvalAttribute;
749: end if;
743: if X_AME_INSTALLATION_LEVEL is not null then
744: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerLIAttribute
745: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerItemAttribute;
746: end if;
747: if X_ATTRIBUTE_NAME = ame_util.restrictiveLIEvalAttribute
748: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveItemEvalAttribute;
749: end if;
750: else
751: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerItemAttribute
744: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerLIAttribute
745: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerItemAttribute;
746: end if;
747: if X_ATTRIBUTE_NAME = ame_util.restrictiveLIEvalAttribute
748: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveItemEvalAttribute;
749: end if;
750: else
751: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerItemAttribute
752: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerLIAttribute;
747: if X_ATTRIBUTE_NAME = ame_util.restrictiveLIEvalAttribute
748: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveItemEvalAttribute;
749: end if;
750: else
751: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerItemAttribute
752: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerLIAttribute;
753: end if;
754: if X_ATTRIBUTE_NAME = ame_util.restrictiveItemEvalAttribute
755: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveLIEvalAttribute;
748: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveItemEvalAttribute;
749: end if;
750: else
751: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerItemAttribute
752: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerLIAttribute;
753: end if;
754: if X_ATTRIBUTE_NAME = ame_util.restrictiveItemEvalAttribute
755: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveLIEvalAttribute;
756: end if;
750: else
751: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerItemAttribute
752: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerLIAttribute;
753: end if;
754: if X_ATTRIBUTE_NAME = ame_util.restrictiveItemEvalAttribute
755: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveLIEvalAttribute;
756: end if;
757: end if;
758: --
751: if X_ATTRIBUTE_NAME = ame_util.evalPrioritiesPerItemAttribute
752: then X_LINE_ATTRIBUTE_NAME := ame_util.evalPrioritiesPerLIAttribute;
753: end if;
754: if X_ATTRIBUTE_NAME = ame_util.restrictiveItemEvalAttribute
755: then X_LINE_ATTRIBUTE_NAME := ame_util.restrictiveLIEvalAttribute;
756: end if;
757: end if;
758: --
759: -- validation is_static column
760: VALIDATE_IS_STATIC (
761: X_IS_STATIC
762: );
763: -- validation rejection_response attributes
764: if X_ATTRIBUTE_NAME = ame_util.rejectionResponseAttribute then
765: VALIDATE_REJECTION(
766: X_QUERY_STRING
767: );
768: end if;
903: end if;
904: end;
905: exception
906: when others then
907: ame_util.runtimeException('ame_attribute_usages_api',
908: 'load_row',
909: sqlcode,
910: sqlerrm);
911: raise;