Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_SupplierWithHoldingTax" 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
    • SupplierWithHoldingTax

Implements

Index

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 authorizationGroup

authorizationGroup: undefined | 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.

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: undefined | 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 isWithholdingTaxSubject

isWithholdingTaxSubject: undefined | false | true

Indicator: Subject to Withholding Tax?.

nullable

Optional recipientType

recipientType: undefined | string

Type of Recipient. The type of recipient can be defined in the vendor master record. It is used to group vendors together according to particular characteristics such as occupations that may be subject to the same withholding tax type, but which are required to pay different percentage rates (as defined by the withholding tax code).Application in ThailandThis corresponds to the official Thai form number (Phaw.Ngor.Daw) and is used to determine the sequential numbering of a withholding tax certificate. The form number is defined in the vendor master record. Maximum length: 2.

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

supplier

supplier: string

Account Number of Supplier. Specifies an alphanumeric key that uniquely identifies the supplier in the SAP system. Maximum length: 10.

versionIdentifier

versionIdentifier: string

ETag version identifier accessor.

returns

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

Optional withholdingTaxCertificate

withholdingTaxCertificate: undefined | 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: undefined | 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: undefined | 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<SupplierWithHoldingTax> = new AllFields('*', SupplierWithHoldingTax)

All fields selector.

Static AUTHORIZATION_GROUP

AUTHORIZATION_GROUP: StringField<SupplierWithHoldingTax> = new StringField('AuthorizationGroup', SupplierWithHoldingTax, '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<SupplierWithHoldingTax> = new StringField('CompanyCode', SupplierWithHoldingTax, '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 EXEMPTION_DATE_BEGIN

EXEMPTION_DATE_BEGIN: DateField<SupplierWithHoldingTax> = new DateField('ExemptionDateBegin', SupplierWithHoldingTax, '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<SupplierWithHoldingTax> = new DateField('ExemptionDateEnd', SupplierWithHoldingTax, '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<SupplierWithHoldingTax> = new StringField('ExemptionReason', SupplierWithHoldingTax, '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 IS_WITHHOLDING_TAX_SUBJECT

IS_WITHHOLDING_TAX_SUBJECT: BooleanField<SupplierWithHoldingTax> = new BooleanField('IsWithholdingTaxSubject', SupplierWithHoldingTax, 'Edm.Boolean')

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

Static RECIPIENT_TYPE

RECIPIENT_TYPE: StringField<SupplierWithHoldingTax> = new StringField('RecipientType', SupplierWithHoldingTax, 'Edm.String')

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

Static SUPPLIER

SUPPLIER: StringField<SupplierWithHoldingTax> = new StringField('Supplier', SupplierWithHoldingTax, 'Edm.String')

Static representation of the supplier 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<SupplierWithHoldingTax> = new StringField('WithholdingTaxCertificate', SupplierWithHoldingTax, '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<SupplierWithHoldingTax> = new StringField('WithholdingTaxCode', SupplierWithHoldingTax, '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<SupplierWithHoldingTax> = new BigNumberField('WithholdingTaxExmptPercent', SupplierWithHoldingTax, '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<SupplierWithHoldingTax> = new StringField('WithholdingTaxNumber', SupplierWithHoldingTax, '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<SupplierWithHoldingTax> = new StringField('WithholdingTaxType', SupplierWithHoldingTax, '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<SupplierWithHoldingTax> | DateField<SupplierWithHoldingTax> | BooleanField<SupplierWithHoldingTax> | BigNumberField<SupplierWithHoldingTax>> = [SupplierWithHoldingTax.SUPPLIER,SupplierWithHoldingTax.COMPANY_CODE,SupplierWithHoldingTax.WITHHOLDING_TAX_TYPE,SupplierWithHoldingTax.EXEMPTION_DATE_BEGIN,SupplierWithHoldingTax.EXEMPTION_DATE_END,SupplierWithHoldingTax.EXEMPTION_REASON,SupplierWithHoldingTax.IS_WITHHOLDING_TAX_SUBJECT,SupplierWithHoldingTax.RECIPIENT_TYPE,SupplierWithHoldingTax.WITHHOLDING_TAX_CERTIFICATE,SupplierWithHoldingTax.WITHHOLDING_TAX_CODE,SupplierWithHoldingTax.WITHHOLDING_TAX_EXMPT_PERCENT,SupplierWithHoldingTax.WITHHOLDING_TAX_NUMBER,SupplierWithHoldingTax.AUTHORIZATION_GROUP]

All fields of the SupplierWithHoldingTax entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_SupplierWithHoldingTax"

Technical entity name for SupplierWithHoldingTax.

Static _keyFields

_keyFields: Array<Selectable<SupplierWithHoldingTax>> = [SupplierWithHoldingTax.SUPPLIER, SupplierWithHoldingTax.COMPANY_CODE, SupplierWithHoldingTax.WITHHOLDING_TAX_TYPE]

All key fields of the SupplierWithHoldingTax entity.

Static _keys

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

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

Type declaration

Static _serviceName

_serviceName: string = "API_BUSINESS_PARTNER"
deprecated

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

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

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<SupplierWithHoldingTax>

    A builder that constructs instances of entity type SupplierWithHoldingTax.

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

    Returns SupplierWithHoldingTaxRequestBuilder

    A SupplierWithHoldingTax request builder.