Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_Defect" of service "API_DEFECT_SRV". This service is part of the following communication scenarios: Defect Processing Integration (SAP_COM_0153). See https://api.sap.com/api/API_DEFECT_SRV for more information.

Hierarchy

  • Entity
    • Defect

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Returns Defect

Properties

Protected _customFields

_customFields: MapType<any>

A mapper representing custom fields in an entity. Custom fields are represented by their field names and the corresponding values. A custom field can be added or updated using setCustomField method.

Protected _versionIdentifier

_versionIdentifier: string

The current ETag version of the entity in the remote system. The ETag identified the version of the in the remote system. It will be automatically set in the "if-match" header of update requests and can be set as a custom header for delete requests. When no ETag is provided by the remote system the value of this variable defaults to "*".

Optional catalogProfile

catalogProfile: undefined | string

Catalog Profile. Key of the catalog profile that is intended as the basis for the notification. In Plant Maintenance and Customer Service, the catalog profile is proposed in the notification if:A notification is created without a reference object orThe reference object entered (equipment or functional location) does not contain a catalog profile. Maximum length: 9.

nullable

Optional changedDateTime

changedDateTime: Moment

UTC Time Stamp in Short Form (YYYYMMDDhhmmss). The UTC time stamp is the date and time relative to UTC (Universal Coordinated Time). To standardize local times in a UTC time stamp and thus make them comparable with other times, these local times need to be converted using your time zone and the ABAP command convert.Even if the system is able to determine the time zone from Customizing or master data, you shoul save the time zone redundantly here.The internal structure of the UTC time stamp is subdivided into a date part and a time part in packed number format <YYYYMMDDhhmmss>. You can also use the high resolution UTC time stamp (10^-7 seconds).

nullable

Optional createdByUser

createdByUser: undefined | string

Name of Person Who Created Object. Maximum length: 12.

nullable

Optional creationDate

creationDate: Moment

Date on Which Record Was Created.

nullable

Optional creationTime

creationTime: Time

Time, at Which Record Was Added.

nullable

Optional defect

defect: undefined | string

Defect Number. Maximum length: 11.

nullable

Optional defectCategory

defectCategory: undefined | string

Defect Category. Maximum length: 2.

nullable

Optional defectClass

defectClass: undefined | string

Defect Class. Categorizes the possible defects into classes according to a defect valuation based on the results caused by the defect. Defects are usually assigned to one of three classes: critical defect, major defect, or minor defect. Maximum length: 2.

nullable

Optional defectCode

defectCode: undefined | string

Defect Code. Maximum length: 4.

nullable

Optional defectCodeCatalog

defectCodeCatalog: undefined | string

Catalog Type - Problems/Defects. Key for the catalog type on which the damages are based. Maximum length: 1.

nullable

Optional defectCodeGroup

defectCodeGroup: undefined | string

Defect Code Group. Maximum length: 8.

nullable

Optional defectCodeVersion

defectCodeVersion: undefined | string

Version Number. A master record can be maintained with different versions. The version number is always assigned by the system. The system assigns a new version number if:an existing master record is created with a new validity perioda master record is changed with history. Maximum length: 6.

nullable

defectInternalId

defectInternalId: string

Notification Number. Number that identifies the notification. Maximum length: 12.

Optional defectObjectCode

defectObjectCode: undefined | string

Defect Location Code. Maximum length: 4.

nullable

Optional defectObjectCodeCatalog

defectObjectCodeCatalog: undefined | string

Defect Location Catalog Type. Maximum length: 1.

nullable

Optional defectObjectCodeGroup

defectObjectCodeGroup: undefined | string

Defect Location Code Group. Maximum length: 8.

nullable

Optional defectOrigin

defectOrigin: undefined | string

Origin of Item Record. Maximum length: 1.

nullable

Optional defectText

defectText: undefined | string

Defect Text. Maximum length: 40.

nullable

Optional equipment

equipment: undefined | string

Equipment Number. Number by which a piece of equipment can be clearly identified. Maximum length: 18.

nullable

Optional functionalLocation

functionalLocation: undefined | string

Functional Location. Label that uniquely identifies a functional location. If alternative labels exist for a functional location, you can define in your user profile which label should be displayed in this field. Maximum length: 40.

nullable

Optional inspPlanOperationInternalId

inspPlanOperationInternalId: undefined | string

Current Node Number from Order Counter. Maximum length: 8.

nullable

Optional inspectionCharacteristic

inspectionCharacteristic: undefined | string

Inspection Characteristic Number. The number that explicitly identifies an inspection characteristic within an operation in an inspection plan. Maximum length: 4.

nullable

Optional inspectionLot

inspectionLot: undefined | string

Inspection Lot Number. Number that uniquely identifies an inspection lot. The inspection lot number is assigned by the system. Maximum length: 12.

nullable

Optional inspectionSubsetInternalId

inspectionSubsetInternalId: undefined | string

Inspection Sample Number. Number identifying an inspection sample if dependent or independent multiple samples are used in the sampling procedure of the characteristic or if inspection points are involved. Maximum length: 6.

nullable

Optional isDeleted

isDeleted: undefined | string

Delete Data Record. The data record is marked for deletion if the indicator is set. Maximum length: 1.

nullable

Optional lastChangeDate

lastChangeDate: Moment

Date of Last Change.

nullable

Optional lastChangeTime

lastChangeTime: Time

Time of Change. Time at which the current record was last changed.

nullable

Optional lastChangedByUser

lastChangedByUser: undefined | string

Name of Person who Changed Object. Maximum length: 12.

nullable

Optional mainWorkCenterInternalId

mainWorkCenterInternalId: undefined | string

Object ID of the Work Center. Maximum length: 8.

nullable

Optional mainWorkCenterPlant

mainWorkCenterPlant: undefined | string

Plant for Work Center. Key which unambiguously identifies a plant. Maximum length: 4.

nullable

Optional material

material: undefined | string

Material Number. Alphanumeric key uniquely identifying the material. Maximum length: 40.

nullable

Optional materialSample

materialSample: undefined | string

Material Sample Number. Unique, client-wide identifier for a sample. Maximum length: 12.

nullable

Optional numberOfDefects

numberOfDefects: undefined | number

Number of Defect Occurrences.

nullable

Optional plant

plant: undefined | string

Plant. Key uniquely identifying a plant. Maximum length: 4.

nullable

Protected remoteState

remoteState: object

The remote state of the entity. Remote state refers to the last known state of the entity on the remote system from which it has been retrieved or to which it has been posted. It is stored as map, where the keys are stored in the format of VDM properties.

Type declaration

  • [keys: string]: any

versionIdentifier

versionIdentifier: string

ETag version identifier accessor.

returns

The ETag version identifier of the retrieved entity, returns undefined if not retrieved

Optional workCenterTypeCode

workCenterTypeCode: undefined | string

Object types of the CIM resource. Internally used key which identifies the type of operating resource. For example, the following indicators represent: A - a work centerFH - a production resource/tool.The key is only used internally but it is displayed within matchcode selection on technical grounds. You do not have to make an entry. Maximum length: 2.

nullable

Static ALL_FIELDS

ALL_FIELDS: AllFields<Defect> = new AllFields('*', Defect)

All fields selector.

Static CATALOG_PROFILE

CATALOG_PROFILE: StringField<Defect> = new StringField('CatalogProfile', Defect, 'Edm.String')

Static representation of the catalogProfile property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static CHANGED_DATE_TIME

CHANGED_DATE_TIME: DateField<Defect> = new DateField('ChangedDateTime', Defect, 'Edm.DateTimeOffset')

Static representation of the changedDateTime property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static CREATED_BY_USER

CREATED_BY_USER: StringField<Defect> = new StringField('CreatedByUser', Defect, 'Edm.String')

Static representation of the createdByUser property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static CREATION_DATE

CREATION_DATE: DateField<Defect> = new DateField('CreationDate', Defect, 'Edm.DateTime')

Static representation of the creationDate property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static CREATION_TIME

CREATION_TIME: TimeField<Defect> = new TimeField('CreationTime', Defect, 'Edm.Time')

Static representation of the creationTime property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT

DEFECT: StringField<Defect> = new StringField('Defect', Defect, 'Edm.String')

Static representation of the defect property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_CATEGORY

DEFECT_CATEGORY: StringField<Defect> = new StringField('DefectCategory', Defect, 'Edm.String')

Static representation of the defectCategory property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_CLASS

DEFECT_CLASS: StringField<Defect> = new StringField('DefectClass', Defect, 'Edm.String')

Static representation of the defectClass property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_CODE

DEFECT_CODE: StringField<Defect> = new StringField('DefectCode', Defect, 'Edm.String')

Static representation of the defectCode property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_CODE_CATALOG

DEFECT_CODE_CATALOG: StringField<Defect> = new StringField('DefectCodeCatalog', Defect, 'Edm.String')

Static representation of the defectCodeCatalog property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_CODE_GROUP

DEFECT_CODE_GROUP: StringField<Defect> = new StringField('DefectCodeGroup', Defect, 'Edm.String')

Static representation of the defectCodeGroup property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_CODE_VERSION

DEFECT_CODE_VERSION: StringField<Defect> = new StringField('DefectCodeVersion', Defect, 'Edm.String')

Static representation of the defectCodeVersion property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_INTERNAL_ID

DEFECT_INTERNAL_ID: StringField<Defect> = new StringField('DefectInternalID', Defect, 'Edm.String')

Static representation of the defectInternalId property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_OBJECT_CODE

DEFECT_OBJECT_CODE: StringField<Defect> = new StringField('DefectObjectCode', Defect, 'Edm.String')

Static representation of the defectObjectCode property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_OBJECT_CODE_CATALOG

DEFECT_OBJECT_CODE_CATALOG: StringField<Defect> = new StringField('DefectObjectCodeCatalog', Defect, 'Edm.String')

Static representation of the defectObjectCodeCatalog property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_OBJECT_CODE_GROUP

DEFECT_OBJECT_CODE_GROUP: StringField<Defect> = new StringField('DefectObjectCodeGroup', Defect, 'Edm.String')

Static representation of the defectObjectCodeGroup property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_ORIGIN

DEFECT_ORIGIN: StringField<Defect> = new StringField('DefectOrigin', Defect, 'Edm.String')

Static representation of the defectOrigin property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static DEFECT_TEXT

DEFECT_TEXT: StringField<Defect> = new StringField('DefectText', Defect, 'Edm.String')

Static representation of the defectText property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static EQUIPMENT

EQUIPMENT: StringField<Defect> = new StringField('Equipment', Defect, 'Edm.String')

Static representation of the equipment property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static FUNCTIONAL_LOCATION

FUNCTIONAL_LOCATION: StringField<Defect> = new StringField('FunctionalLocation', Defect, 'Edm.String')

Static representation of the functionalLocation property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static INSPECTION_CHARACTERISTIC

INSPECTION_CHARACTERISTIC: StringField<Defect> = new StringField('InspectionCharacteristic', Defect, 'Edm.String')

Static representation of the inspectionCharacteristic property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static INSPECTION_LOT

INSPECTION_LOT: StringField<Defect> = new StringField('InspectionLot', Defect, 'Edm.String')

Static representation of the inspectionLot property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static INSPECTION_SUBSET_INTERNAL_ID

INSPECTION_SUBSET_INTERNAL_ID: StringField<Defect> = new StringField('InspectionSubsetInternalID', Defect, 'Edm.String')

Static representation of the inspectionSubsetInternalId property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static INSP_PLAN_OPERATION_INTERNAL_ID

INSP_PLAN_OPERATION_INTERNAL_ID: StringField<Defect> = new StringField('InspPlanOperationInternalID', Defect, 'Edm.String')

Static representation of the inspPlanOperationInternalId property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static IS_DELETED

IS_DELETED: StringField<Defect> = new StringField('IsDeleted', Defect, 'Edm.String')

Static representation of the isDeleted property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static LAST_CHANGED_BY_USER

LAST_CHANGED_BY_USER: StringField<Defect> = new StringField('LastChangedByUser', Defect, 'Edm.String')

Static representation of the lastChangedByUser property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static LAST_CHANGE_DATE

LAST_CHANGE_DATE: DateField<Defect> = new DateField('LastChangeDate', Defect, 'Edm.DateTime')

Static representation of the lastChangeDate property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static LAST_CHANGE_TIME

LAST_CHANGE_TIME: TimeField<Defect> = new TimeField('LastChangeTime', Defect, 'Edm.Time')

Static representation of the lastChangeTime property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static MAIN_WORK_CENTER_INTERNAL_ID

MAIN_WORK_CENTER_INTERNAL_ID: StringField<Defect> = new StringField('MainWorkCenterInternalID', Defect, 'Edm.String')

Static representation of the mainWorkCenterInternalId property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static MAIN_WORK_CENTER_PLANT

MAIN_WORK_CENTER_PLANT: StringField<Defect> = new StringField('MainWorkCenterPlant', Defect, 'Edm.String')

Static representation of the mainWorkCenterPlant property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static MATERIAL

MATERIAL: StringField<Defect> = new StringField('Material', Defect, 'Edm.String')

Static representation of the material property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static MATERIAL_SAMPLE

MATERIAL_SAMPLE: StringField<Defect> = new StringField('MaterialSample', Defect, 'Edm.String')

Static representation of the materialSample property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static NUMBER_OF_DEFECTS

NUMBER_OF_DEFECTS: NumberField<Defect> = new NumberField('NumberOfDefects', Defect, 'Edm.Int32')

Static representation of the numberOfDefects property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static PLANT

PLANT: StringField<Defect> = new StringField('Plant', Defect, 'Edm.String')

Static representation of the plant property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static WORK_CENTER_TYPE_CODE

WORK_CENTER_TYPE_CODE: StringField<Defect> = new StringField('WorkCenterTypeCode', Defect, 'Edm.String')

Static representation of the workCenterTypeCode property for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static _allFields

_allFields: Array<StringField<Defect> | DateField<Defect> | TimeField<Defect> | NumberField<Defect>> = [Defect.DEFECT_INTERNAL_ID,Defect.DEFECT,Defect.DEFECT_CATEGORY,Defect.CREATED_BY_USER,Defect.CREATION_DATE,Defect.LAST_CHANGED_BY_USER,Defect.LAST_CHANGE_DATE,Defect.DEFECT_TEXT,Defect.DEFECT_CODE_CATALOG,Defect.DEFECT_CODE_GROUP,Defect.DEFECT_CODE,Defect.DEFECT_CODE_VERSION,Defect.DEFECT_OBJECT_CODE_CATALOG,Defect.DEFECT_OBJECT_CODE_GROUP,Defect.DEFECT_OBJECT_CODE,Defect.CREATION_TIME,Defect.LAST_CHANGE_TIME,Defect.DEFECT_CLASS,Defect.NUMBER_OF_DEFECTS,Defect.INSP_PLAN_OPERATION_INTERNAL_ID,Defect.INSPECTION_CHARACTERISTIC,Defect.INSPECTION_SUBSET_INTERNAL_ID,Defect.MATERIAL_SAMPLE,Defect.WORK_CENTER_TYPE_CODE,Defect.MAIN_WORK_CENTER_INTERNAL_ID,Defect.MAIN_WORK_CENTER_PLANT,Defect.EQUIPMENT,Defect.FUNCTIONAL_LOCATION,Defect.IS_DELETED,Defect.DEFECT_ORIGIN,Defect.MATERIAL,Defect.PLANT,Defect.INSPECTION_LOT,Defect.CATALOG_PROFILE,Defect.CHANGED_DATE_TIME]

All fields of the Defect entity.

Static _defaultServicePath

_defaultServicePath: string = "/sap/opu/odata/sap/API_DEFECT_SRV"

Default url path for the according service.

Static _entityName

_entityName: string = "A_Defect"

Technical entity name for Defect.

Static _keyFields

_keyFields: Array<Selectable<Defect>> = [Defect.DEFECT_INTERNAL_ID]

All key fields of the Defect entity.

Static _keys

_keys: object = Defect._keyFields.reduce((acc: { [keys: string]: Selectable<Defect> }, field: Selectable<Defect>) => {acc[field.fieldName] = field;return acc;}, {})

Mapping of all key field names to the respective static field property Defect.

Type declaration

Static _serviceName

_serviceName: string = "API_DEFECT_SRV"
deprecated

Since v1.0.1 Use _defaultServicePath instead. Technical service name for Defect.

Methods

Protected getCurrentMapKeys

  • getCurrentMapKeys(): Entity
  • Returns a map of all defined fields in entity to their current values.

    Returns Entity

    Entity with all defined entity fields

getCustomField

  • getCustomField(fieldName: string): any
  • Custom field value getter.

    Parameters

    • fieldName: string

      The name of the custom field

    Returns any

    The value of the corresponding custom field

getCustomFields

  • getCustomFields(): MapType<any>
  • Returns a map that contains all entity custom fields.

    Returns MapType<any>

    A map of all defined custom fields in the entity

getUpdatedCustomFields

  • getUpdatedCustomFields(): MapType<any>
  • Returns all updated custom field properties compared to the last known remote state.

    Returns MapType<any>

    A map containing all updated custom properties, with their new values

getUpdatedProperties

  • getUpdatedProperties(): Entity
  • Returns all changed properties compared to the last known remote state. The returned properties does not include custom fields. Use getUpdatedCustomFields, if updated custom fields are needed.

    Returns Entity

    Entity with all properties that changed

hasCustomField

  • hasCustomField(fieldName: string): boolean
  • Validates whether a custom field exists in the entity.

    Parameters

    • fieldName: string

      The name of the custom field to update

    Returns boolean

    A boolean value, that indicates whether a custom field is defined in entity

initializeCustomFields

  • initializeCustomFields(customFields: MapType<any>): this
  • Sets all retrieved custom fields in entity.

    Parameters

    • customFields: MapType<any>

      Extracted custom fields from a retrieved entity

    Returns this

    A boolean value, that indicates the existence of the field in entity

Protected isConflictingCustomField

  • isConflictingCustomField(customFieldName: string): boolean
  • Validates whether a field name does not conflict with an original field name and thus can be defined as custom fields.

    Parameters

    • customFieldName: string

      Field name to check

    Returns boolean

    Boolean value that describes whether a field name can be defined as custom field

setCustomField

  • setCustomField(fieldName: string, value: any): this
  • Sets a new custom field in the entity or updates it. Throws an error, if the provided custom field name is already defined by an original field in entity.

    Parameters

    • fieldName: string

      The name of the custom field to update

    • value: any

      The value of the field

    Returns this

    The entity itself, to facilitate method chaining

setOrInitializeRemoteState

  • setOrInitializeRemoteState(state?: MapType<any>): this
  • Initializes or sets the remoteState of the entity. This function is called on all read, create and update requests. This function should be called after initializeCustomFields, if custom fields are defined.

    deprecated

    Since 1.12.0. Will be removed in version 2.0.

    Parameters

    • Optional state: MapType<any>

      State to be set as remote state

    Returns this

    The entity itself, to facilitate method chaining

setVersionIdentifier

  • setVersionIdentifier(etag: string | undefined): this
  • Set the ETag version identifier of the retrieved entity.

    Parameters

    • etag: string | undefined

      The returned ETag version of the entity

    Returns this

    The entity itself, to facilitate method chaining

toJSON

  • toJSON(): object
  • Overwrites the default toJSON method so that all instance variables as well as all custom fields of the entity are returned.

    Returns object

    An object containing all instance variables + custom fields.

    • [key: string]: any

Static builder

Static customField

  • customField(fieldName: string): CustomField<Defect>
  • Returns a selectable object that allows the selection of custom field in a get request for the entity Defect.

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<Defect>

    A builder that constructs instances of entity type Defect.

Static Protected customFieldSelector

  • customFieldSelector<EntityT>(fieldName: string, entityConstructor: Constructable<EntityT>): CustomField<EntityT>
  • Type parameters

    • EntityT: Entity

    Parameters

    • fieldName: string
    • entityConstructor: Constructable<EntityT>

    Returns CustomField<EntityT>

Static Protected entityBuilder

  • entityBuilder<EntityT, EntityTypeForceMandatoryT>(entityConstructor: Constructable<EntityT, EntityTypeForceMandatoryT>): EntityBuilderType<EntityT, EntityTypeForceMandatoryT>
  • Type parameters

    • EntityT: Entity

    • EntityTypeForceMandatoryT

    Parameters

    • entityConstructor: Constructable<EntityT, EntityTypeForceMandatoryT>

    Returns EntityBuilderType<EntityT, EntityTypeForceMandatoryT>

Static requestBuilder

  • Returns a request builder to construct requests for operations on the Defect entity type.

    Returns DefectRequestBuilder

    A Defect request builder.