Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_CustomerMaterial" of service "API_CUSTOMER_MATERIAL_SRV". This service is part of the following communication scenarios: Customer Material Info Record Integration (SAP_COM_0134). See https://api.sap.com/api/API_CUSTOMER_MATERIAL_SRV for more information.

Hierarchy

  • Entity
    • CustomerMaterial

Implements

Index

Constructors

constructor

  • Returns CustomerMaterial

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 baseUnit

baseUnit: undefined | string

Base Unit of Measure. Unit of measure in which stocks of the material are managed. The system converts all the quantities you enter in other units of measure (alternative units of measure) to the base unit of measure. You define the base unit of measure and also alternative units of measure and their conversion factors in the material master record.Since all data is updated in the base unit of measure, your entry is particularly important for the conversion of alternative units of measure. A quantity in the alternative unit of measure can only be shown precisely if its value can be shown with the decimal places available. To ensure this, please note the following:The base unit of measure is the unit satisfying the highest necessary requirement for precision.The conversion of alternative units of measure to the base unit should result in simple decimal fractions (not, for example, 1/3 = 0.333...).Inventory ManagementIn Inventory Management, the base unit of measure is the same as the stockkeeping unit.ServicesServices have units of measure of their own, including the following:Service unitUnit of measure at the higher item level. The precise quantities of the individual services are each at the detailed service line level.BlanketUnit of measure at service line level for services to be provided once only, and for which no precise quantities can or are to be specified. Maximum length: 3.

nullable

customer

customer: string

Customer number. The customer to whom the condition or the customer-material info record applies. Enter the number of your customer. Maximum length: 10.

Optional customerMaterialItemUsage

customerMaterialItemUsage: undefined | string

Item Usage. The item usage controls the system reaction when you process a sales document item in a certain context. The item usage can be used for the determination of item categories. It controls which other item categories are to be found in a certain environment (text items and packing items, for example).It can also control which items are to be billed in a service quotation or the corresponding sales order and which are only there for statistical reasons. Maximum length: 4.

nullable

Optional deliveryPriority

deliveryPriority: undefined | string

Delivery Priority. The delivery priority assigned to an item. You can assign delivery priority to either a particular material or to a combination of customer and material. When you process deliveries collectively, you can use delivery priority as one of the selection criteria. Maximum length: 2.

nullable

distributionChannel

distributionChannel: string

Distribution Channel. The way in which products or services reach the customer. Typical examples of distribution channels are wholesale, retail, or direct sales. You can maintain information about customers and materials by sales organization and distribution channel. Within a sales organization you can deliver goods to a given customer through more than one distribution channel.You can assign a distribution channel to one or more sales organizations. If, for example, you have numerous sales organizations, each sales organization may use the "Wholesale" distribution channel.For each combination of sales organization and distribution channel, you can further assign one or more of the divisions that are defined for the sales organization. You can, for example, assign "Food" and "Non-food" divisions to the "Wholesale" distribution channel. A particular combination of sales organization, distribution channel, and division is known as a sales area. Maximum length: 2.

Optional eTag

eTag: undefined | string

ETag. Comparison key for tracking the most recent version of the customer material. Maximum length: 10.

nullable

material

material: string

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

Optional materialByCustomer

materialByCustomer: undefined | string

Material Number Used by Customer. Uniquely identifies the material from the customer's point of view. If the customer uses a different identifier than the one you use for the material, you can include this information in a customer-material info record. You can also include in this record specific shipping details, such asMinimum delivery quantityPartial delivery conditionsEnter a value from an existing customer-material info record. Maximum length: 35.

nullable

Optional materialDescriptionByCustomer

materialDescriptionByCustomer: undefined | string

Customer Description of Material. The short text that the customer uses to describe the material. If you include the customer's description as short text in the customer-material info record, the system automatically uses the text during sales document processing. When you create a sales order, for example, the customer's description appears instead of the short text from the material master record. Maximum length: 40.

nullable

Optional maxNmbrOfPartialDelivery

maxNmbrOfPartialDelivery: BigNumber

Maximum Number of Partial Deliveries Allowed Per Item. The maximum number of partial deliveries you can make (including the first delivery) to satisfy the order quantity for an item. The system can propose a number from the shipping information in the customer master record. During sales order processing, you can change the proposed value in the shipping information for each item in the sales document.You can only specify a maximum number of partial deliveries if the Partial delivery/item field (in either the customer master record or in the sales document) indicates that partial deliveries are allowed.

nullable

Optional minDeliveryQtyInBaseUnit

minDeliveryQtyInBaseUnit: BigNumber

Minimum Delivery Quantity in Delivery Note Processing. Minimum quantity that may be delivered to a customer.

nullable

Optional overdelivTolrtdLmtRatioInPct

overdelivTolrtdLmtRatioInPct: BigNumber

Overdelivery Tolerance. Percentage (based on the order quantity) up to which an overdelivery of this item will be accepted. If you have set the indicator in the Partial delivery/Item field to 'D' (partial delivery allowed), this takes priority. It makes no sense to define a tolerance limit for overdelivery in such case.

nullable

Optional partialDeliveryIsAllowed

partialDeliveryIsAllowed: undefined | string

Partial Delivery at Item Level. Specifies whether the customer requires full or partial delivery for the item. You use this field to control partial deliveries at the item level. If the customer allows partial delivery, you can choose from different partial delivery options. For example, you can specify whether the customer allows you to make one delivery attempt only on the requested delivery date or whether unlimited delivery attempts are possible.When partial delivery indicator 'D' is set, the order can never have status 'fully delivered'. You must complete each item by entering a reason for rejection. This could be applied to scheduling agreements, for example.You can enter a value in this field only if the customer allows partial deliveries for the entire sales document. Maximum length: 1.

nullable

Optional plant

plant: undefined | string

Plant (Own or External). Key that uniquely identifies 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

salesOrganization

salesOrganization: string

Sales Organization. An organizational unit responsible for the sale of certain products or services. The responsibility of a sales organization may include legal liability for products and customer claims. You can assign any number of distribution channels and divisions to a sales organization. A particular combination of sales organization, distribution channel, and division is known as a sales area. Maximum length: 4.

Optional salesQtyToBaseQtyDnmntr

salesQtyToBaseQtyDnmntr: BigNumber

Denominator (Divisor) for Conversion of Sales Qty into SKU. Denominator of the conversion factor that the system uses to convert sales units base units of measure. Many material processing functions, such as the generation of production requirements, may require that sales units are converted into base units of measureYou store a certain beverage in casks, but sell it in 1-liter bottles. The conversion factor is as follows:100 bt <=> 1 caThe first number (the denominator) represents the sales units, in this case, bottles. The second number (the numerator) represents the equivalent quantity in base units of measure, in this case, casks.

nullable

Optional salesQtyToBaseQtyNmrtr

salesQtyToBaseQtyNmrtr: BigNumber

Numerator (factor) for conversion of sales quantity into SKU. Numerator of the conversion factor that the system uses to convert sales units base units of measure. Many material processing functions, such as the generation of production requirements, may require that sales units are converted into base units of measureYou store a certain beverage in casks, but sell it in 1-liter bottles. The conversion factor is as follows:100 bt <=> 1 caThe first number (the denominator) represents the sales units, in this case, bottles. The second number (the numerator) represents the equivalent quantity in base units of measure, in this case, casks.

nullable

Optional salesUnit

salesUnit: undefined | string

Sales Unit. Unit of measure in which the material is sold. Maximum length: 3.

nullable

Optional underdelivTolrtdLmtRatioInPct

underdelivTolrtdLmtRatioInPct: BigNumber

Underdelivery Tolerance. Percentage (based on the order quantity) up to which an underdelivery of this item will be accepted.

nullable

Optional unlimitedOverdeliveryIsAllowed

unlimitedOverdeliveryIsAllowed: undefined | false | true

Unlimited Overdelivery Allowed. Indicates whether the customer allows unlimited over- and underdeliveries. If the customer allows unlimited over- and underdeliveries, you cannot enter values in the fields that specify over- and underdelivery tolerance.

nullable

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<CustomerMaterial> = new AllFields('*', CustomerMaterial)

All fields selector.

Static BASE_UNIT

BASE_UNIT: StringField<CustomerMaterial> = new StringField('BaseUnit', CustomerMaterial, 'Edm.String')

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

Static CUSTOMER

CUSTOMER: StringField<CustomerMaterial> = new StringField('Customer', CustomerMaterial, 'Edm.String')

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

Static CUSTOMER_MATERIAL_ITEM_USAGE

CUSTOMER_MATERIAL_ITEM_USAGE: StringField<CustomerMaterial> = new StringField('CustomerMaterialItemUsage', CustomerMaterial, 'Edm.String')

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

Static DELIVERY_PRIORITY

DELIVERY_PRIORITY: StringField<CustomerMaterial> = new StringField('DeliveryPriority', CustomerMaterial, 'Edm.String')

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

Static DISTRIBUTION_CHANNEL

DISTRIBUTION_CHANNEL: StringField<CustomerMaterial> = new StringField('DistributionChannel', CustomerMaterial, 'Edm.String')

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

Static E_TAG

E_TAG: StringField<CustomerMaterial> = new StringField('ETag', CustomerMaterial, 'Edm.String')

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

Static MATERIAL

MATERIAL: StringField<CustomerMaterial> = new StringField('Material', CustomerMaterial, '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_BY_CUSTOMER

MATERIAL_BY_CUSTOMER: StringField<CustomerMaterial> = new StringField('MaterialByCustomer', CustomerMaterial, 'Edm.String')

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

Static MATERIAL_DESCRIPTION_BY_CUSTOMER

MATERIAL_DESCRIPTION_BY_CUSTOMER: StringField<CustomerMaterial> = new StringField('MaterialDescriptionByCustomer', CustomerMaterial, 'Edm.String')

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

Static MAX_NMBR_OF_PARTIAL_DELIVERY

MAX_NMBR_OF_PARTIAL_DELIVERY: BigNumberField<CustomerMaterial> = new BigNumberField('MaxNmbrOfPartialDelivery', CustomerMaterial, 'Edm.Decimal')

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

Static MIN_DELIVERY_QTY_IN_BASE_UNIT

MIN_DELIVERY_QTY_IN_BASE_UNIT: BigNumberField<CustomerMaterial> = new BigNumberField('MinDeliveryQtyInBaseUnit', CustomerMaterial, 'Edm.Decimal')

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

Static OVERDELIV_TOLRTD_LMT_RATIO_IN_PCT

OVERDELIV_TOLRTD_LMT_RATIO_IN_PCT: BigNumberField<CustomerMaterial> = new BigNumberField('OverdelivTolrtdLmtRatioInPct', CustomerMaterial, 'Edm.Decimal')

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

Static PARTIAL_DELIVERY_IS_ALLOWED

PARTIAL_DELIVERY_IS_ALLOWED: StringField<CustomerMaterial> = new StringField('PartialDeliveryIsAllowed', CustomerMaterial, 'Edm.String')

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

Static PLANT

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

SALES_ORGANIZATION: StringField<CustomerMaterial> = new StringField('SalesOrganization', CustomerMaterial, 'Edm.String')

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

Static SALES_QTY_TO_BASE_QTY_DNMNTR

SALES_QTY_TO_BASE_QTY_DNMNTR: BigNumberField<CustomerMaterial> = new BigNumberField('SalesQtyToBaseQtyDnmntr', CustomerMaterial, 'Edm.Decimal')

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

Static SALES_QTY_TO_BASE_QTY_NMRTR

SALES_QTY_TO_BASE_QTY_NMRTR: BigNumberField<CustomerMaterial> = new BigNumberField('SalesQtyToBaseQtyNmrtr', CustomerMaterial, 'Edm.Decimal')

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

Static SALES_UNIT

SALES_UNIT: StringField<CustomerMaterial> = new StringField('SalesUnit', CustomerMaterial, 'Edm.String')

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

Static UNDERDELIV_TOLRTD_LMT_RATIO_IN_PCT

UNDERDELIV_TOLRTD_LMT_RATIO_IN_PCT: BigNumberField<CustomerMaterial> = new BigNumberField('UnderdelivTolrtdLmtRatioInPct', CustomerMaterial, 'Edm.Decimal')

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

Static UNLIMITED_OVERDELIVERY_IS_ALLOWED

UNLIMITED_OVERDELIVERY_IS_ALLOWED: BooleanField<CustomerMaterial> = new BooleanField('UnlimitedOverdeliveryIsAllowed', CustomerMaterial, 'Edm.Boolean')

Static representation of the unlimitedOverdeliveryIsAllowed 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<CustomerMaterial> | BigNumberField<CustomerMaterial> | BooleanField<CustomerMaterial>> = [CustomerMaterial.SALES_ORGANIZATION,CustomerMaterial.DISTRIBUTION_CHANNEL,CustomerMaterial.CUSTOMER,CustomerMaterial.MATERIAL,CustomerMaterial.MATERIAL_BY_CUSTOMER,CustomerMaterial.MATERIAL_DESCRIPTION_BY_CUSTOMER,CustomerMaterial.PLANT,CustomerMaterial.DELIVERY_PRIORITY,CustomerMaterial.MIN_DELIVERY_QTY_IN_BASE_UNIT,CustomerMaterial.BASE_UNIT,CustomerMaterial.PARTIAL_DELIVERY_IS_ALLOWED,CustomerMaterial.MAX_NMBR_OF_PARTIAL_DELIVERY,CustomerMaterial.UNDERDELIV_TOLRTD_LMT_RATIO_IN_PCT,CustomerMaterial.OVERDELIV_TOLRTD_LMT_RATIO_IN_PCT,CustomerMaterial.UNLIMITED_OVERDELIVERY_IS_ALLOWED,CustomerMaterial.CUSTOMER_MATERIAL_ITEM_USAGE,CustomerMaterial.SALES_UNIT,CustomerMaterial.SALES_QTY_TO_BASE_QTY_DNMNTR,CustomerMaterial.SALES_QTY_TO_BASE_QTY_NMRTR,CustomerMaterial.E_TAG]

All fields of the CustomerMaterial entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_CustomerMaterial"

Technical entity name for CustomerMaterial.

Static _keyFields

_keyFields: Array<Selectable<CustomerMaterial>> = [CustomerMaterial.SALES_ORGANIZATION, CustomerMaterial.DISTRIBUTION_CHANNEL, CustomerMaterial.CUSTOMER, CustomerMaterial.MATERIAL]

All key fields of the CustomerMaterial entity.

Static _keys

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

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

Type declaration

Static _serviceName

_serviceName: string = "API_CUSTOMER_MATERIAL_SRV"
deprecated

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

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

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<CustomerMaterial>

    A builder that constructs instances of entity type CustomerMaterial.

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

    Returns CustomerMaterialRequestBuilder

    A CustomerMaterial request builder.