Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_CustomerWithHoldingTax" 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
    • CustomerWithHoldingTax

Implements

Index

Constructors

constructor

  • Returns CustomerWithHoldingTax

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 authorizationGroup

authorizationGroup: string

Authorization Group. The authorization group allows extended authorization protection for particular objects. The authorization groups are freely definable. The authorization groups usually occur in authorization objects together with an activity. Maximum length: 4.

nullable

companyCode

companyCode: string

Company Code. The company code is an organizational unit within financial accounting. Maximum length: 4.

customer

customer: string

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

Optional exemptionDateBegin

exemptionDateBegin: Moment

Date on Which Exemption Begins. Date from which withholding tax exemption applies.

nullable

Optional exemptionDateEnd

exemptionDateEnd: Moment

Date on Which Exemption Ends. Date on which withholding tax exemption expires.

nullable

Optional exemptionReason

exemptionReason: string

Reason for Exemption. Indicator used to classify different types of exemption from liability to a particular withholding tax. These indicators can be defined per withholding tax type in the vendor master record. Maximum length: 2.

nullable

Optional obligationDateBegin

obligationDateBegin: Moment

Obligated to Withhold Tax From. Date from which: The company code is obligated to withhold tax for the given withholding tax type.This date must be entered in Customizing under the withholding tax information for the company code.The customer is obligated to withhold tax for the withholding tax type.This date must be defined in the customer master record.

nullable

Optional obligationDateEnd

obligationDateEnd: Moment

Obligated to Withhold Tax Until. Date to which: The company code is obligated to withhold tax for the withholding tax type.This date must be entered in Customizing under the withholding tax information for the company code.The customer is obigated to withhold tax for the withholding tax type.

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 withholdingTaxAgent

withholdingTaxAgent: boolean

Indicator: Withholding Tax Agent?.

nullable

Optional withholdingTaxCertificate

withholdingTaxCertificate: string

Exemption Certificate Number. Numbered assigned by the relevant authorities for exemption from withholding tax. This number must be entered in the system as follows:In the vendor master record in the case of vendorsFor customers, in Customizing under the settings for withholding tax information for the company code per withholding tax type. Maximum length: 25.

nullable

Optional withholdingTaxCode

withholdingTaxCode: string

Withholding Tax Code. One or more "withholding tax codes" are assigned to each withholding tax type. One of the things these codes determine is the various percentage rates for the withholding tax type. Note that when processing a business transaction, no more than one withholding tax code can be assigned per withholding tax type. If the business transaction is subject to more than one withholding taxes, these must be represented in the system by defining various withholding tax types. Maximum length: 2.

nullable

Optional withholdingTaxExmptPercent

withholdingTaxExmptPercent: BigNumber

Exemption Rate. Rate of exemption from withholding tax. Those persons/activities subject to withholding tax can be exempted from withholding tax up to the percentage rate you enter here. This exemption rate refers to the withholding tax amount itself and not to the whole amount liable to withholding tax (withholding tax base amount).The gross amount of an invoice is 100.00 and the withholding tax base amount is defined as gross. The withholding tax rate is 10% meaning that the withholding tax amount is 10.00. Given an exemption rate of 30%, the withholding tax amount is reduced to 7.00.

nullable

Optional withholdingTaxNumber

withholdingTaxNumber: string

Withholding tax identification number. This is a number issued by the tax authorities per withholding tax type. This number must be specified in Customizing either:(a) As part of the withholding tax information defined for the company code, or(b) As part of the withholding tax information defined in the customer or vendor master record. Maximum length: 16.

nullable

withholdingTaxType

withholdingTaxType: string

Indicator for Withholding Tax Type. This indicator is used to classify the different types of withholding tax. Withholding tax types classify particular features of a withholding tax including:The time at which the withholding tax is postedThe basis on which the base amount is calculatedThe basis for accumulation (if applicable)Withholding tax types are to be distinguished from withholding tax codes, to which are allocated the withholding tax percentage rate example.Whether a withholding tax can be defined as an existing type by means of a new code, or if a new type needs to be defined will depend on the type of transaction (see below).Note that a business transaction can only be assigned one withholding tax code per withholding tax type. If the business transaction is subject to several withholding taxes simultaneously, these must be represented by different types.This is the case in Argentina for example, where up to four kinds of withholding tax per business transaction are possible. Maximum length: 2.

Static ALL_FIELDS

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

All fields selector.

Static AUTHORIZATION_GROUP

AUTHORIZATION_GROUP: StringField<CustomerWithHoldingTax> = new StringField('AuthorizationGroup', CustomerWithHoldingTax, 'Edm.String')

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

Static COMPANY_CODE

COMPANY_CODE: StringField<CustomerWithHoldingTax> = new StringField('CompanyCode', CustomerWithHoldingTax, 'Edm.String')

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

Static CUSTOMER

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

EXEMPTION_DATE_BEGIN: DateField<CustomerWithHoldingTax> = new DateField('ExemptionDateBegin', CustomerWithHoldingTax, 'Edm.DateTime')

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

Static EXEMPTION_DATE_END

EXEMPTION_DATE_END: DateField<CustomerWithHoldingTax> = new DateField('ExemptionDateEnd', CustomerWithHoldingTax, 'Edm.DateTime')

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

Static EXEMPTION_REASON

EXEMPTION_REASON: StringField<CustomerWithHoldingTax> = new StringField('ExemptionReason', CustomerWithHoldingTax, 'Edm.String')

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

Static OBLIGATION_DATE_BEGIN

OBLIGATION_DATE_BEGIN: DateField<CustomerWithHoldingTax> = new DateField('ObligationDateBegin', CustomerWithHoldingTax, 'Edm.DateTime')

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

Static OBLIGATION_DATE_END

OBLIGATION_DATE_END: DateField<CustomerWithHoldingTax> = new DateField('ObligationDateEnd', CustomerWithHoldingTax, 'Edm.DateTime')

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

Static WITHHOLDING_TAX_AGENT

WITHHOLDING_TAX_AGENT: BooleanField<CustomerWithHoldingTax> = new BooleanField('WithholdingTaxAgent', CustomerWithHoldingTax, 'Edm.Boolean')

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

Static WITHHOLDING_TAX_CERTIFICATE

WITHHOLDING_TAX_CERTIFICATE: StringField<CustomerWithHoldingTax> = new StringField('WithholdingTaxCertificate', CustomerWithHoldingTax, 'Edm.String')

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

Static WITHHOLDING_TAX_CODE

WITHHOLDING_TAX_CODE: StringField<CustomerWithHoldingTax> = new StringField('WithholdingTaxCode', CustomerWithHoldingTax, 'Edm.String')

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

Static WITHHOLDING_TAX_EXMPT_PERCENT

WITHHOLDING_TAX_EXMPT_PERCENT: BigNumberField<CustomerWithHoldingTax> = new BigNumberField('WithholdingTaxExmptPercent', CustomerWithHoldingTax, 'Edm.Decimal')

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

Static WITHHOLDING_TAX_NUMBER

WITHHOLDING_TAX_NUMBER: StringField<CustomerWithHoldingTax> = new StringField('WithholdingTaxNumber', CustomerWithHoldingTax, 'Edm.String')

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

Static WITHHOLDING_TAX_TYPE

WITHHOLDING_TAX_TYPE: StringField<CustomerWithHoldingTax> = new StringField('WithholdingTaxType', CustomerWithHoldingTax, 'Edm.String')

Static representation of the withholdingTaxType 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<CustomerWithHoldingTax> | BooleanField<CustomerWithHoldingTax> | DateField<CustomerWithHoldingTax> | BigNumberField<CustomerWithHoldingTax>> = [CustomerWithHoldingTax.CUSTOMER,CustomerWithHoldingTax.COMPANY_CODE,CustomerWithHoldingTax.WITHHOLDING_TAX_TYPE,CustomerWithHoldingTax.WITHHOLDING_TAX_CODE,CustomerWithHoldingTax.WITHHOLDING_TAX_AGENT,CustomerWithHoldingTax.OBLIGATION_DATE_BEGIN,CustomerWithHoldingTax.OBLIGATION_DATE_END,CustomerWithHoldingTax.WITHHOLDING_TAX_NUMBER,CustomerWithHoldingTax.WITHHOLDING_TAX_CERTIFICATE,CustomerWithHoldingTax.WITHHOLDING_TAX_EXMPT_PERCENT,CustomerWithHoldingTax.EXEMPTION_DATE_BEGIN,CustomerWithHoldingTax.EXEMPTION_DATE_END,CustomerWithHoldingTax.EXEMPTION_REASON,CustomerWithHoldingTax.AUTHORIZATION_GROUP]

All fields of the CustomerWithHoldingTax entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_CustomerWithHoldingTax"

Technical entity name for CustomerWithHoldingTax.

Static _keyFields

_keyFields: Array<Selectable<CustomerWithHoldingTax>> = [CustomerWithHoldingTax.CUSTOMER, CustomerWithHoldingTax.COMPANY_CODE, CustomerWithHoldingTax.WITHHOLDING_TAX_TYPE]

All key fields of the CustomerWithHoldingTax entity.

Static _keys

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

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

Static _serviceName

_serviceName: string = "API_BUSINESS_PARTNER"
deprecated

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

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

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<CustomerWithHoldingTax>

    A builder that constructs instances of entity type CustomerWithHoldingTax.

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

    Returns CustomerWithHoldingTaxRequestBuilder

    A CustomerWithHoldingTax request builder.