Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_PhysInventoryDocHeader" of service "API_PHYSICAL_INVENTORY_DOC_SRV". This service is part of the following communication scenarios: Physical Inventory Document Integration (SAP_COM_0107). See https://api.sap.com/api/API_PHYSICAL_INVENTORY_DOC_SRV for more information.

Hierarchy

  • Entity
    • PhysInventoryDocHeader

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

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 createdByUser

createdByUser: undefined | string

Physical Inventory Created by User. Maximum length: 12.

nullable

Optional documentDate

documentDate: Moment

Document Date in Document. The document date is the date on which the original document was issued.

nullable

Optional fiscalPeriod

fiscalPeriod: undefined | string

Posting Period. Maximum length: 2.

nullable

fiscalYear

fiscalYear: string

Fiscal Year. Period, 12 months as a rule, for which the company is to create its inventory and balance sheet. The fiscal year can be the same as the calendar year, but does not have to be. Maximum length: 4.

Optional inventorySpecialStockType

inventorySpecialStockType: undefined | string

Special Stock Indicator. Specifies the special stock type. If you need to separately manage certain stock (for example, consignment stock) of a material, the stock type in question is defined using this indicator. Maximum length: 1.

nullable

Optional inventoryTransactionType

inventoryTransactionType: undefined | string

Inventory Transaction Type. Maximum length: 2.

nullable

Optional lastChangeDateTime

lastChangeDateTime: Moment

Last Change Timestamp.

nullable

Optional physInventoryPlannedCountDate

physInventoryPlannedCountDate: Moment

Planned Date of Inventory Count. Indicates the date on which the physical inventory count is to take place. The planned count date determines the fiscal year in which the physical inventory document is posted. All other postings involving this document must be effected during this fiscal year.

nullable

Optional physInventoryReferenceNumber

physInventoryReferenceNumber: undefined | string

Physical Inventory Reference. Maximum length: 16.

nullable

Optional physInvtryAdjustmentPostingSts

physInvtryAdjustmentPostingSts: undefined | string

Status of Adjustment Posting (Inventory Differences). Indicates that differences have been posted for this physical inventory document. Status A means that inventory differences have been posted for some of the items of the physical inventory document only. For these items, the physical inventory has been completed.Status X means that differences have been posted for all items of the physical inventory document. The document can now be archived. Maximum length: 1.

nullable

Optional physInvtryDeletionStatus

physInvtryDeletionStatus: undefined | string

Status of Deletion. Indicates that items of this physical inventory document have been deleted. Status A means that only some items have been deleted.Status X means that all items of the document have been deleted. However, physical deletion of the document is not possible, because inventory differences have been posted for at least one item.The delete status (in conjunction with the adjustment status) is relevant to the archiving of the documents: A document can only be archived after all items have been deleted or all inventory differences have been posted.If an already counted item is still open, you must process this item before you can archive or delete the document. Maximum length: 1.

nullable

Optional physInvtryDocHasQtySnapshot

physInvtryDocHasQtySnapshot: undefined | false | true

Book Inventory Freeze.

nullable

Optional physicalInventoryCountStatus

physicalInventoryCountStatus: undefined | string

Count Status. Indicates that items from this physical inventory document have been counted. Status A means that only some items have been counted.Status X means that all items have been counted. Maximum length: 1.

nullable

physicalInventoryDocument

physicalInventoryDocument: string

Physical Inventory Document. Maximum length: 10.

Optional physicalInventoryDocumentDesc

physicalInventoryDocumentDesc: undefined | string

Description of Physical Inventory Document. Maximum length: 40.

nullable

Optional physicalInventoryGroup

physicalInventoryGroup: undefined | string

Grouping Criterion of Physical Inventory Document Item. Indicates the grouping criterion of the items in a physical inventory document. Physical inventory documents can be created so that all items in a document have one common characteristic.The materials of all items in a document belong to material group '001'. The grouping characteristic stored in the document header then has the value '001'. Maximum length: 10.

nullable

Optional physicalInventoryGroupType

physicalInventoryGroupType: undefined | string

Type of Grouping Criterion. Specifies the grouping type for the physical inventory document items. Physical inventory documents can be created so that all items in the document have one common characteristic. The field defines which characteristic this is.One of the values of this indicator defines that the materials of all items in a physical inventory document belong to the same material group. Maximum length: 2.

nullable

Optional physicalInventoryLastCountDate

physicalInventoryLastCountDate: Moment

Date of Last Count. Specifies the date of the last physical inventory count. The actual count date must be in the same year as the planned count date.The date of the first entry of count results for a physical inventory document determines the posting period in which all further count results as well as the inventory differences relating to this physical inventory document must be posted.

nullable

Optional physicalInventoryNumber

physicalInventoryNumber: undefined | string

Physical Inventory Number. Maximum length: 16.

nullable

Optional physicalInventoryType

physicalInventoryType: undefined | string

Physical Inventory Type. Maximum length: 1.

nullable

Optional plant

plant: undefined | string

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

nullable

Optional postingDate

postingDate: Moment

Posting Date in the Document. Date which is used when entering the document in Financial Accounting or Controlling. The fiscal year and the period for which an update of the accounts specified in the document or cost elements is made, are derived from the posting date.When entering documents, the system checks whether the posting date entered is allowed by means of the posting period permitted.The posting date can differ from both the entry date (day of entry into the system) and the document date (day of creation of the original document).

nullable

Optional postingIsBlockedForPhysInvtry

postingIsBlockedForPhysInvtry: undefined | false | true

Posting Block Due to Physical Inventory. Indicates that no goods movements involving the materials listed in the physical inventory document can be posted for the duration of a physical inventory count. The indicator is set for the affected stocks in each case (storage location stock, batch stock, or special stock) for all associated stock types and is not cancelled until the count results are posted.The indicator remains in the physical document header even if the stock is unblocked through the posting of inventory differences. It then only indicates that a posting block was set for the documents.The blocking indicator can be set in one of two ways:Directly upon entry of the physical inventory document (if the count is to take place immediately)Shortly before the count (if the count is to take place later)You can set the indicator by choosing Physical inventory document -> Change in the header data of the physical inventory document or via batch input.

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

Optional storageLocation

storageLocation: undefined | string

Storage Location. Number of the storage location in which the material is stored. A plant may contain one or more storage locations. Maximum length: 4.

nullable

toPhysicalInventoryDocumentItem

toPhysicalInventoryDocumentItem: PhysInventoryDocItem[]

One-to-many navigation property to the PhysInventoryDocItem entity.

versionIdentifier

versionIdentifier: string

ETag version identifier accessor.

returns

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

Static ALL_FIELDS

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

All fields selector.

Static CREATED_BY_USER

CREATED_BY_USER: StringField<PhysInventoryDocHeader> = new StringField('CreatedByUser', PhysInventoryDocHeader, '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 DOCUMENT_DATE

DOCUMENT_DATE: DateField<PhysInventoryDocHeader> = new DateField('DocumentDate', PhysInventoryDocHeader, 'Edm.DateTime')

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

Static FISCAL_PERIOD

FISCAL_PERIOD: StringField<PhysInventoryDocHeader> = new StringField('FiscalPeriod', PhysInventoryDocHeader, 'Edm.String')

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

Static FISCAL_YEAR

FISCAL_YEAR: StringField<PhysInventoryDocHeader> = new StringField('FiscalYear', PhysInventoryDocHeader, 'Edm.String')

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

Static INVENTORY_SPECIAL_STOCK_TYPE

INVENTORY_SPECIAL_STOCK_TYPE: StringField<PhysInventoryDocHeader> = new StringField('InventorySpecialStockType', PhysInventoryDocHeader, 'Edm.String')

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

Static INVENTORY_TRANSACTION_TYPE

INVENTORY_TRANSACTION_TYPE: StringField<PhysInventoryDocHeader> = new StringField('InventoryTransactionType', PhysInventoryDocHeader, 'Edm.String')

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

Static LAST_CHANGE_DATE_TIME

LAST_CHANGE_DATE_TIME: DateField<PhysInventoryDocHeader> = new DateField('LastChangeDateTime', PhysInventoryDocHeader, 'Edm.DateTimeOffset')

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

Static PHYSICAL_INVENTORY_COUNT_STATUS

PHYSICAL_INVENTORY_COUNT_STATUS: StringField<PhysInventoryDocHeader> = new StringField('PhysicalInventoryCountStatus', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYSICAL_INVENTORY_DOCUMENT

PHYSICAL_INVENTORY_DOCUMENT: StringField<PhysInventoryDocHeader> = new StringField('PhysicalInventoryDocument', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYSICAL_INVENTORY_DOCUMENT_DESC

PHYSICAL_INVENTORY_DOCUMENT_DESC: StringField<PhysInventoryDocHeader> = new StringField('PhysicalInventoryDocumentDesc', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYSICAL_INVENTORY_GROUP

PHYSICAL_INVENTORY_GROUP: StringField<PhysInventoryDocHeader> = new StringField('PhysicalInventoryGroup', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYSICAL_INVENTORY_GROUP_TYPE

PHYSICAL_INVENTORY_GROUP_TYPE: StringField<PhysInventoryDocHeader> = new StringField('PhysicalInventoryGroupType', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYSICAL_INVENTORY_LAST_COUNT_DATE

PHYSICAL_INVENTORY_LAST_COUNT_DATE: DateField<PhysInventoryDocHeader> = new DateField('PhysicalInventoryLastCountDate', PhysInventoryDocHeader, 'Edm.DateTime')

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

Static PHYSICAL_INVENTORY_NUMBER

PHYSICAL_INVENTORY_NUMBER: StringField<PhysInventoryDocHeader> = new StringField('PhysicalInventoryNumber', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYSICAL_INVENTORY_TYPE

PHYSICAL_INVENTORY_TYPE: StringField<PhysInventoryDocHeader> = new StringField('PhysicalInventoryType', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYS_INVENTORY_PLANNED_COUNT_DATE

PHYS_INVENTORY_PLANNED_COUNT_DATE: DateField<PhysInventoryDocHeader> = new DateField('PhysInventoryPlannedCountDate', PhysInventoryDocHeader, 'Edm.DateTime')

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

Static PHYS_INVENTORY_REFERENCE_NUMBER

PHYS_INVENTORY_REFERENCE_NUMBER: StringField<PhysInventoryDocHeader> = new StringField('PhysInventoryReferenceNumber', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYS_INVTRY_ADJUSTMENT_POSTING_STS

PHYS_INVTRY_ADJUSTMENT_POSTING_STS: StringField<PhysInventoryDocHeader> = new StringField('PhysInvtryAdjustmentPostingSts', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYS_INVTRY_DELETION_STATUS

PHYS_INVTRY_DELETION_STATUS: StringField<PhysInventoryDocHeader> = new StringField('PhysInvtryDeletionStatus', PhysInventoryDocHeader, 'Edm.String')

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

Static PHYS_INVTRY_DOC_HAS_QTY_SNAPSHOT

PHYS_INVTRY_DOC_HAS_QTY_SNAPSHOT: BooleanField<PhysInventoryDocHeader> = new BooleanField('PhysInvtryDocHasQtySnapshot', PhysInventoryDocHeader, 'Edm.Boolean')

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

Static PLANT

PLANT: StringField<PhysInventoryDocHeader> = new StringField('Plant', PhysInventoryDocHeader, '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 POSTING_DATE

POSTING_DATE: DateField<PhysInventoryDocHeader> = new DateField('PostingDate', PhysInventoryDocHeader, 'Edm.DateTime')

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

Static POSTING_IS_BLOCKED_FOR_PHYS_INVTRY

POSTING_IS_BLOCKED_FOR_PHYS_INVTRY: BooleanField<PhysInventoryDocHeader> = new BooleanField('PostingIsBlockedForPhysInvtry', PhysInventoryDocHeader, 'Edm.Boolean')

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

Static STORAGE_LOCATION

STORAGE_LOCATION: StringField<PhysInventoryDocHeader> = new StringField('StorageLocation', PhysInventoryDocHeader, 'Edm.String')

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

Static TO_PHYSICAL_INVENTORY_DOCUMENT_ITEM

TO_PHYSICAL_INVENTORY_DOCUMENT_ITEM: Link<PhysInventoryDocHeader, PhysInventoryDocItem> = new Link('to_PhysicalInventoryDocumentItem', PhysInventoryDocHeader, PhysInventoryDocItem)

Static representation of the one-to-many navigation property toPhysicalInventoryDocumentItem for query construction. Use to reference this property in query operations such as 'select' in the fluent request API.

Static _allFields

_allFields: Array<StringField<PhysInventoryDocHeader> | DateField<PhysInventoryDocHeader> | BooleanField<PhysInventoryDocHeader> | Link<PhysInventoryDocHeader, PhysInventoryDocItem>> = [PhysInventoryDocHeader.FISCAL_YEAR,PhysInventoryDocHeader.PHYSICAL_INVENTORY_DOCUMENT,PhysInventoryDocHeader.INVENTORY_TRANSACTION_TYPE,PhysInventoryDocHeader.PLANT,PhysInventoryDocHeader.STORAGE_LOCATION,PhysInventoryDocHeader.INVENTORY_SPECIAL_STOCK_TYPE,PhysInventoryDocHeader.DOCUMENT_DATE,PhysInventoryDocHeader.PHYS_INVENTORY_PLANNED_COUNT_DATE,PhysInventoryDocHeader.PHYSICAL_INVENTORY_LAST_COUNT_DATE,PhysInventoryDocHeader.POSTING_DATE,PhysInventoryDocHeader.FISCAL_PERIOD,PhysInventoryDocHeader.CREATED_BY_USER,PhysInventoryDocHeader.POSTING_IS_BLOCKED_FOR_PHYS_INVTRY,PhysInventoryDocHeader.PHYSICAL_INVENTORY_COUNT_STATUS,PhysInventoryDocHeader.PHYS_INVTRY_ADJUSTMENT_POSTING_STS,PhysInventoryDocHeader.PHYS_INVTRY_DELETION_STATUS,PhysInventoryDocHeader.PHYS_INVTRY_DOC_HAS_QTY_SNAPSHOT,PhysInventoryDocHeader.PHYSICAL_INVENTORY_GROUP_TYPE,PhysInventoryDocHeader.PHYSICAL_INVENTORY_GROUP,PhysInventoryDocHeader.PHYSICAL_INVENTORY_NUMBER,PhysInventoryDocHeader.PHYS_INVENTORY_REFERENCE_NUMBER,PhysInventoryDocHeader.PHYSICAL_INVENTORY_DOCUMENT_DESC,PhysInventoryDocHeader.PHYSICAL_INVENTORY_TYPE,PhysInventoryDocHeader.LAST_CHANGE_DATE_TIME,PhysInventoryDocHeader.TO_PHYSICAL_INVENTORY_DOCUMENT_ITEM]

All fields of the PhysInventoryDocHeader entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_PhysInventoryDocHeader"

Technical entity name for PhysInventoryDocHeader.

Static _keyFields

_keyFields: Array<Selectable<PhysInventoryDocHeader>> = [PhysInventoryDocHeader.FISCAL_YEAR, PhysInventoryDocHeader.PHYSICAL_INVENTORY_DOCUMENT]

All key fields of the PhysInventoryDocHeader entity.

Static _keys

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

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

Type declaration

Static _serviceName

_serviceName: string = "API_PHYSICAL_INVENTORY_DOC_SRV"
deprecated

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

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

  • Returns a selectable object that allows the selection of custom field in a get request for the entity PhysInventoryDocHeader.

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<PhysInventoryDocHeader>

    A builder that constructs instances of entity type PhysInventoryDocHeader.

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 PhysInventoryDocHeader entity type.

    Returns PhysInventoryDocHeaderRequestBuilder

    A PhysInventoryDocHeader request builder.