Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_CustomerSalesAreaTax" of service "API_BUSINESS_PARTNER". This service is part of the following communication scenarios: Business Partner, Customer and Supplier Integration (SAP_COM_0008). See https://api.sap.com/api/API_BUSINESS_PARTNER for more information.

Hierarchy

  • Entity
    • CustomerSalesAreaTax

Implements

Index

Constructors

constructor

  • Returns CustomerSalesAreaTax

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

customer

customer: string

Customer Number. Gives an alphanumeric key, which clearly identifies the customer or vendor in the SAP system. Maximum length: 10.

customerTaxCategory

customerTaxCategory: string

Tax category (sales tax, federal sales tax,...). Identifies the condition that the system uses to automatically determine country-specific taxes during pricing. You can define one or more tax categories for each country. During sales order processing, the system applies the tax category according tothe geographical location of your delivering plant and the location of the customer receiving the goodstax classifications in the customer master record and the material master record.In the USA, for example, you can define tax categories for Federal Sales Tax and Federal Excise Tax. In the U.K., you can define a tax category for Value Added Tax (VAT). Maximum length: 4.

Optional customerTaxClassification

customerTaxClassification: undefined | string

Tax classification for customer. Specifies the tax liability of the customer, based on the tax structure of the customer's country. You can use the tax classification to specify, for example, whether a customer is liable for sales taxes, such as VAT or state sales taxes.During sales order processing, the system copies the tax classification from the tax information stored in thecustomer master record of the payer, if the payer is different from the sold-to party and the sales tax identification number is maintained for the payer.ship to party, if the sales tax identification number of the ship-to party is maintained.sold-to party, if none of the criteria for the payer or the ship-to party are met.During pricing, the system calculates any relevant taxes by taking the following factors into account:The tax classification of the customer and the materialThe country keys of the customer and the delivering plant. Maximum length: 1.

nullable

departureCountry

departureCountry: string

Departure country (country from which the goods are sent). Identifies the country in which the delivery originates. You can define the country key in a table. As a rule, it is a good idea to use the existing international standards for identifying vehicles from different countries (for example: USA = United States, I = Italy, and so on). The system uses the key tohelp determine the relevant taxes during pricingdetermine important country-specific standards (the length of postal codes and bank account numbers, for example). Maximum length: 3.

distributionChannel

distributionChannel: string

Reference distrib.channel for cust.and material masters. Specifies a distribution channel that you want to use as a reference for customer and material master data for other distribution channels. You can specify one distribution channel as the source of customer and material master data for other distribution channels. You need then only to maintain the data in one place.Distrib.channel Ref.distrib.channel01 0102 0103 0104 04In this example, only distribution channels 01 and 04 have customer and material master data defined. Distribution channels 01, 02, and 03 share the master data that you defined for distribution channel 01. Distribution channel 04 has its own master data. When you create a sales order in distribution channel 03, the system checks the customer and material master data against the data defined for distribution channel 01. Maximum length: 2.

division

division: string

Division. A way of grouping materials, products, or services. The system uses divisions to determine the sales areas and the business areas for a material, product, or service. A product or service is always assigned to just one division. From the point of view of sales and distribution, the use of divisions lets you organize your sales structure around groups of similar products or product lines. This allows the people in a division who process orders and service customers to specialize within a manageable area of expertise.If a sales organization sells food and non-food products through both retail and wholesaledistribution channels each distribution channel could then be further split into food and non-food divisions. Maximum length: 2.

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.

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

All fields selector.

Static CUSTOMER

CUSTOMER: StringField<CustomerSalesAreaTax> = new StringField('Customer', CustomerSalesAreaTax, '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_TAX_CATEGORY

CUSTOMER_TAX_CATEGORY: StringField<CustomerSalesAreaTax> = new StringField('CustomerTaxCategory', CustomerSalesAreaTax, 'Edm.String')

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

Static CUSTOMER_TAX_CLASSIFICATION

CUSTOMER_TAX_CLASSIFICATION: StringField<CustomerSalesAreaTax> = new StringField('CustomerTaxClassification', CustomerSalesAreaTax, 'Edm.String')

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

Static DEPARTURE_COUNTRY

DEPARTURE_COUNTRY: StringField<CustomerSalesAreaTax> = new StringField('DepartureCountry', CustomerSalesAreaTax, 'Edm.String')

Static representation of the departureCountry 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<CustomerSalesAreaTax> = new StringField('DistributionChannel', CustomerSalesAreaTax, '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 DIVISION

DIVISION: StringField<CustomerSalesAreaTax> = new StringField('Division', CustomerSalesAreaTax, 'Edm.String')

Static representation of the division 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<CustomerSalesAreaTax> = new StringField('SalesOrganization', CustomerSalesAreaTax, '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 _allFields

_allFields: Array<StringField<CustomerSalesAreaTax>> = [CustomerSalesAreaTax.CUSTOMER,CustomerSalesAreaTax.SALES_ORGANIZATION,CustomerSalesAreaTax.DISTRIBUTION_CHANNEL,CustomerSalesAreaTax.DIVISION,CustomerSalesAreaTax.DEPARTURE_COUNTRY,CustomerSalesAreaTax.CUSTOMER_TAX_CATEGORY,CustomerSalesAreaTax.CUSTOMER_TAX_CLASSIFICATION]

All fields of the CustomerSalesAreaTax entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_CustomerSalesAreaTax"

Technical entity name for CustomerSalesAreaTax.

Static _keyFields

_keyFields: Array<Selectable<CustomerSalesAreaTax>> = [CustomerSalesAreaTax.CUSTOMER, CustomerSalesAreaTax.SALES_ORGANIZATION, CustomerSalesAreaTax.DISTRIBUTION_CHANNEL, CustomerSalesAreaTax.DIVISION, CustomerSalesAreaTax.DEPARTURE_COUNTRY, CustomerSalesAreaTax.CUSTOMER_TAX_CATEGORY]

All key fields of the CustomerSalesAreaTax entity.

Static _keys

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

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

Type declaration

Static _serviceName

_serviceName: string = "API_BUSINESS_PARTNER"
deprecated

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

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

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<CustomerSalesAreaTax>

    A builder that constructs instances of entity type CustomerSalesAreaTax.

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

    Returns CustomerSalesAreaTaxRequestBuilder

    A CustomerSalesAreaTax request builder.