Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_ProductUnitsOfMeasure" of service "API_PRODUCT_SRV". This service is part of the following communication scenarios: Distributed Manufacturing Integration (SAP_COM_0077), SAP Analytics Cloud for Planning Integration (SAP_COM_0087), Product Integration (SAP_COM_0009). See https://api.sap.com/api/API_PRODUCT_SRV for more information.

Hierarchy

  • Entity
    • ProductUnitsOfMeasure

Implements

Index

Constructors

constructor

  • Returns ProductUnitsOfMeasure

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 "*".

alternativeUnit

alternativeUnit: string

Alternative Unit of Measure for Stockkeeping Unit. Unit of measure in which quantities can be entered alternatively to the base unit of measure / stockkeeping unit. Maximum length: 3.

Optional capacityUsage

capacityUsage: BigNumber

Capacity Usage.

nullable

Optional globalTradeItemNumber

globalTradeItemNumber: string

International Article Number (EAN/UPC). Glossary definition. Maximum length: 18.

nullable

Optional globalTradeItemNumberCategory

globalTradeItemNumberCategory: string

Category of International Article Number (EAN). Defines how the system determines an International Article Number (EAN) to be assigned internally, and which check criteria (check digit, prefix, and so on) an EAN of this category must fulfil. Maximum length: 2.

nullable

Optional grossWeight

grossWeight: BigNumber

Gross Weight. Gross weight expressed in the unit of weight specified by you in the Unit of weight field.

nullable

Optional lowerLevelPackagingUnit

lowerLevelPackagingUnit: string

Lower-Level Unit of Measure in a Packing Hierarchy. Your base unit of measure is piece. 12 pieces fit into a box, and 10 boxes fit onto a pallet. In this case, piece is the lower-level unit of measure with regard to box, and box is the lower-level unit of measure with regard to pallet. Conversely, pallet is the higher-level unit of measure with regard to box, and so on. Maximum length: 3.

nullable

Optional materialVolume

materialVolume: BigNumber

Volume. Space that the material occupies per unit of volume. The volume refers to the unit specified in the "Volume unit" field. The volume and its unit always refer to the base unit of measure.

nullable

Optional maximumStackingFactor

maximumStackingFactor: number

Maximum Stacking Factor. Specifies the allowed stacking factor. You can use the maximum stacking factor, for example, to specify how many pieces of a material, or how many crates can be placed on top of each other. The factor is quantity-dependent.

nullable

product

product: string

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

Optional productMeasurementUnit

productMeasurementUnit: string

Unit of Dimension for Length/Width/Height. Unit in which the dimensions of length, breadth, and height of a material or its packaging are measured. Maximum length: 3.

nullable

Optional quantityDenominator

quantityDenominator: BigNumber

Denominator for conversion to base units of measure. Denominator of the quotient that specifies the ratio of the alternative unit of measure to the base unit of measure. To convert a quantity, whose unit of measure is not the same as the base unit of measure, into the base unit of measure, the system requires a quotient:Quantity (in alternative unit of measure) = quotient * quantity (in base unit of measure)Enter the number of units of the alternative unit of measure (denominator) that corresponds to the number of units of the base unit of measure (numerator).The alternative unit of measure is kilogram (kg). The base unit of measure is piece (PC). 5 kg correspond to 3 pieces.5 kg = 3 PC => 1 kg = 3/5 PCIn this case, the quotient is therefore 3/5 (the numerator being 3 and the denominator 5).You may enter only whole numbers in the numerator and denominator fields; that is, if 3.14 m² correspond to one piece, you must enter integer multiples (314 m² = 100 PC). In this case, the quotient is therefore 100/314 (the numerator being 100 and the denominator 314).

nullable

Optional quantityNumerator

quantityNumerator: BigNumber

Numerator for Conversion to Base Units of Measure. Numerator of the quotient that specifies the ratio of the alternative unit of measure to the base unit of measure. To convert a quantity, whose unit of measure is not the same as the base unit of measure, into the base unit of measure, the system requires a quotient:Quantity (in alternative unit of measure) = quotient * quantity (in base unit of measure)Enter the number of units of the alternative unit of measure (denominator) that corresponds to the number of units of the base unit of measure (numerator).The alternative unit of measure is kilogram (kg). The base unit of measure is piece (PC). 5 kg correspond to 3 pieces.5 kg = 3 PC => 1 kg = 3/5 PCIn this case, the quotient is therefore 3/5 (the numerator being 3 and the denominator 5).You may enter only whole numbers in the numerator and denominator fields; that is, if 3.14 m² correspond to one piece, you must enter integer multiples (314 m² = 100 PC). In this case, the quotient is therefore 100/314 (the numerator being 100 and the denominator 314).

nullable

Optional remainingVolumeAfterNesting

remainingVolumeAfterNesting: BigNumber

Remaining Volume after Nesting (in Percentage). Describes the remaining volume in percent when two materials are stacked inside each other. For example, if you place a cup on another cup, the volume of the first cup remains the same. However, since part of the second cup disappears into the first cup, the volume of the second cup is reduced.This data element describes the remaining volume of the first cup as a percentage of the 'normal' volume.

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

toInternationalArticleNumber

toInternationalArticleNumber: ProductUnitsOfMeasureEan[]

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

Optional unitSpecificProductHeight

unitSpecificProductHeight: BigNumber

Height. Height of the material or its packaging, measured in the unit of dimension.

nullable

Optional unitSpecificProductLength

unitSpecificProductLength: BigNumber

Length. Length of the material or its packaging, measured in the unit of dimension.

nullable

Optional unitSpecificProductWidth

unitSpecificProductWidth: BigNumber

Width. Breadth of the material or its packaging, measured in the unit of dimension.

nullable

versionIdentifier

versionIdentifier: string

ETag version identifier accessor.

returns

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

Optional volumeUnit

volumeUnit: string

Volume Unit. Unit referring to the volume of the material. If you specify a volume, you have to enter the corresponding volume unit here. Maximum length: 3.

nullable

Optional weightUnit

weightUnit: string

Unit of Weight. Unit referring to the gross weight or net weight of the material. If you specify a weight, you must enter the corresponding unit of weight here. Maximum length: 3.

nullable

Static ALL_FIELDS

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

All fields selector.

Static ALTERNATIVE_UNIT

ALTERNATIVE_UNIT: StringField<ProductUnitsOfMeasure> = new StringField('AlternativeUnit', ProductUnitsOfMeasure, 'Edm.String')

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

Static CAPACITY_USAGE

CAPACITY_USAGE: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('CapacityUsage', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static GLOBAL_TRADE_ITEM_NUMBER

GLOBAL_TRADE_ITEM_NUMBER: StringField<ProductUnitsOfMeasure> = new StringField('GlobalTradeItemNumber', ProductUnitsOfMeasure, 'Edm.String')

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

Static GLOBAL_TRADE_ITEM_NUMBER_CATEGORY

GLOBAL_TRADE_ITEM_NUMBER_CATEGORY: StringField<ProductUnitsOfMeasure> = new StringField('GlobalTradeItemNumberCategory', ProductUnitsOfMeasure, 'Edm.String')

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

Static GROSS_WEIGHT

GROSS_WEIGHT: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('GrossWeight', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static LOWER_LEVEL_PACKAGING_UNIT

LOWER_LEVEL_PACKAGING_UNIT: StringField<ProductUnitsOfMeasure> = new StringField('LowerLevelPackagingUnit', ProductUnitsOfMeasure, 'Edm.String')

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

Static MATERIAL_VOLUME

MATERIAL_VOLUME: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('MaterialVolume', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static MAXIMUM_STACKING_FACTOR

MAXIMUM_STACKING_FACTOR: NumberField<ProductUnitsOfMeasure> = new NumberField('MaximumStackingFactor', ProductUnitsOfMeasure, 'Edm.Byte')

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

Static PRODUCT

PRODUCT: StringField<ProductUnitsOfMeasure> = new StringField('Product', ProductUnitsOfMeasure, 'Edm.String')

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

Static PRODUCT_MEASUREMENT_UNIT

PRODUCT_MEASUREMENT_UNIT: StringField<ProductUnitsOfMeasure> = new StringField('ProductMeasurementUnit', ProductUnitsOfMeasure, 'Edm.String')

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

Static QUANTITY_DENOMINATOR

QUANTITY_DENOMINATOR: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('QuantityDenominator', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static QUANTITY_NUMERATOR

QUANTITY_NUMERATOR: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('QuantityNumerator', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static REMAINING_VOLUME_AFTER_NESTING

REMAINING_VOLUME_AFTER_NESTING: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('RemainingVolumeAfterNesting', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static TO_INTERNATIONAL_ARTICLE_NUMBER

TO_INTERNATIONAL_ARTICLE_NUMBER: Link<ProductUnitsOfMeasure, ProductUnitsOfMeasureEan> = new Link('to_InternationalArticleNumber', ProductUnitsOfMeasure, ProductUnitsOfMeasureEan)

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

Static UNIT_SPECIFIC_PRODUCT_HEIGHT

UNIT_SPECIFIC_PRODUCT_HEIGHT: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('UnitSpecificProductHeight', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static UNIT_SPECIFIC_PRODUCT_LENGTH

UNIT_SPECIFIC_PRODUCT_LENGTH: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('UnitSpecificProductLength', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static UNIT_SPECIFIC_PRODUCT_WIDTH

UNIT_SPECIFIC_PRODUCT_WIDTH: BigNumberField<ProductUnitsOfMeasure> = new BigNumberField('UnitSpecificProductWidth', ProductUnitsOfMeasure, 'Edm.Decimal')

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

Static VOLUME_UNIT

VOLUME_UNIT: StringField<ProductUnitsOfMeasure> = new StringField('VolumeUnit', ProductUnitsOfMeasure, 'Edm.String')

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

Static WEIGHT_UNIT

WEIGHT_UNIT: StringField<ProductUnitsOfMeasure> = new StringField('WeightUnit', ProductUnitsOfMeasure, 'Edm.String')

Static representation of the weightUnit 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<ProductUnitsOfMeasure> | BigNumberField<ProductUnitsOfMeasure> | NumberField<ProductUnitsOfMeasure> | Link<ProductUnitsOfMeasure, ProductUnitsOfMeasureEan>> = [ProductUnitsOfMeasure.PRODUCT,ProductUnitsOfMeasure.ALTERNATIVE_UNIT,ProductUnitsOfMeasure.QUANTITY_NUMERATOR,ProductUnitsOfMeasure.QUANTITY_DENOMINATOR,ProductUnitsOfMeasure.MATERIAL_VOLUME,ProductUnitsOfMeasure.VOLUME_UNIT,ProductUnitsOfMeasure.GROSS_WEIGHT,ProductUnitsOfMeasure.WEIGHT_UNIT,ProductUnitsOfMeasure.GLOBAL_TRADE_ITEM_NUMBER,ProductUnitsOfMeasure.GLOBAL_TRADE_ITEM_NUMBER_CATEGORY,ProductUnitsOfMeasure.UNIT_SPECIFIC_PRODUCT_LENGTH,ProductUnitsOfMeasure.UNIT_SPECIFIC_PRODUCT_WIDTH,ProductUnitsOfMeasure.UNIT_SPECIFIC_PRODUCT_HEIGHT,ProductUnitsOfMeasure.PRODUCT_MEASUREMENT_UNIT,ProductUnitsOfMeasure.LOWER_LEVEL_PACKAGING_UNIT,ProductUnitsOfMeasure.REMAINING_VOLUME_AFTER_NESTING,ProductUnitsOfMeasure.MAXIMUM_STACKING_FACTOR,ProductUnitsOfMeasure.CAPACITY_USAGE,ProductUnitsOfMeasure.TO_INTERNATIONAL_ARTICLE_NUMBER]

All fields of the ProductUnitsOfMeasure entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_ProductUnitsOfMeasure"

Technical entity name for ProductUnitsOfMeasure.

Static _keyFields

_keyFields: Array<Selectable<ProductUnitsOfMeasure>> = [ProductUnitsOfMeasure.PRODUCT, ProductUnitsOfMeasure.ALTERNATIVE_UNIT]

All key fields of the ProductUnitsOfMeasure entity.

Static _keys

_keys: any = ProductUnitsOfMeasure._keyFields.reduce((acc: any, field) => {acc[field.fieldName] = field;return acc;}, {})

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

Static _serviceName

_serviceName: string = "API_PRODUCT_SRV"
deprecated

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

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.

    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): this
  • Set the ETag version identifier of the retrieved entity.

    Parameters

    • etag: string

      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 ProductUnitsOfMeasure.

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<ProductUnitsOfMeasure>

    A builder that constructs instances of entity type ProductUnitsOfMeasure.

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, JsonT>(entityConstructor: Constructable<EntityT>): EntityBuilderType<EntityT, JsonT>
  • Type parameters

    • EntityT: Entity

    • JsonT

    Parameters

    • entityConstructor: Constructable<EntityT>

    Returns EntityBuilderType<EntityT, JsonT>

Static requestBuilder

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

    Returns ProductUnitsOfMeasureRequestBuilder

    A ProductUnitsOfMeasure request builder.