Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_CostCenter" of service "API_COSTCENTER_SRV". This service is part of the following communication scenarios: SAP Analytics Cloud for Planning Integration (SAP_COM_0087). See https://api.sap.com/api/API_COSTCENTER_SRV for more information.

Hierarchy

  • Entity
    • CostCenter

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Returns CostCenter

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 businessArea

businessArea: undefined | string

Business Area. Key that uniquely identifies a business area. Maximum length: 4.

nullable

Optional cityName

cityName: undefined | string

City. Name of the city as a part of the address. Maximum length: 35.

nullable

Optional companyCode

companyCode: undefined | string

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

nullable

Optional consumptionQtyIsRecorded

consumptionQtyIsRecorded: undefined | string

Indicator for Recording Consumption Quantities. Indicator defining whether the system issues a message if no quantity or quantity unit is specified for commitment or actual postings. The indicator has no effect on planning.You can also plan consumption quantities at a later date.The indicator has no effect on quantity updates or on the identification of quantities in reports.You must set the indicator if you want to cost using an overhead that is dependent on the unit of measure posted with this cost element.The indicator is an active default setting for the combination of cost center and cost element if in the master data for the cost center and cost element, it is defined that quantities should be managed.You can specify the recording of quantities in two ways:In the master data for the cost center and cost element, you can activate the Record qty indicator.In the master data, the indicator specifies whether consumption quantities should be recorded for each object (cost center, cost element).You can change the indicator in planning.In planning, the indicator specifies whether consumption quantities are to be recorded for planning values as well as actual values. This is for the object combination to be planned (such as cost center/cost element).A combination of objects is used for planning or actual postings, which means that the effect this has depends on the indicator setting for each object combination.The object combination comes fromThe first planning entriesThe first actual postingIf planning does not exist, the system determines whether the indicator is set for the object combination. It does this by using the logical AND link for the field values in the master record of the corresponding single objects.CautionIf you want to record consumption quantities, you need to specify a quantity and a unit of measure for actual and commitment postings.For the first posting in a fiscal year to an object using a particular cost element, specify the following for the object and the corresponding cost element:Whether quantities are to be recorded in the totals recordsWhich unit of measure is to be used for recording the quantitiesOnce you have specified this for the relevant fiscal year, you cannot change it.Specify a different unit of measure for a later posting.If you can convert the unit of measure using that of the first posting (such as kilograms into tons), then- The system converts the units of measure accordingly- The system displays the posted quantities using the unit of measure that you specified for the first posting.If the unit of measure cannot be converted (such as hours into pieces), then- The system does not update any quantities after this posting- The system does not display any quantities in the information system- The system displays the posted quantities in the line items using the corresponding posted unit of measure. Maximum length: 1.

nullable

controllingArea

controllingArea: string

Controlling Area. Uniquely identifies a controlling area. The controlling area is the highest organizational unit in Controlling.Whether controlling area and company code are in a 1:1 relationship or a 1:n relationship, the number of posting periods in both controlling area and company code(s) must be identical. However, special periods may vary. Maximum length: 4.

costCenter

costCenter: string

Cost Center. A key that uniquely identifies a cost center. Maximum length: 10.

Optional costCenterCategory

costCenterCategory: undefined | string

Cost Center Category. Indicator used to define a cost center category. The master data of an activity type includes one or more cost center categories. The activity type may be used only by cost centers of the appropriate categories.You define categories in Customizing. For each category, you can define default values for the "Lock" and "Record quantity" indicators, for transfer to cost center master data. Maintain these indicators only if the entry diverges from the default cost center category.In addition, you may use the categories for reports and evaluations.Production cost centerService cost centerAdministration cost center. Maximum length: 1.

nullable

Optional costCenterCreatedByUser

costCenterCreatedByUser: undefined | string

Entered By. User ID of the person who created the cost estimate. Maximum length: 12.

nullable

Optional costCenterCreationDate

costCenterCreationDate: Moment

Entered On. Date on which the cost estimate was created.

nullable

Optional costCenterCurrency

costCenterCurrency: undefined | string

Currency Key. Currency key for amounts in the system. Maximum length: 5.

nullable

Optional costCenterStandardHierArea

costCenterStandardHierArea: undefined | string

Standard Hierarchy Area. Standard hierarchy To create cost centers, you require a structure in master data maintenance to which you can assign cost centers. You create this CO structure, the standard hierarchy, when you create a controlling area. If this hierarchy is not present during controlling area maintenance, the system automatically creates the highest node there.Use group maintenance to construct the structure of the standard hierarchy. This is possible in both application and customizing menus.About the Application MenuAbout the Customizing MenuYou may create as many alternative groups as you wish. You cannot create new cost centers in groups, but you can enter existing cost centers and cost centers that are to be created.The direct assignment to the controlling area guarantees that all cost centers of a controlling area are collected together. Maximum length: 12.

nullable

Optional costCtrResponsiblePersonName

costCtrResponsiblePersonName: undefined | string

Person Responsible. Person responsible for the given cost center. Maximum length: 20.

nullable

Optional costCtrResponsibleUser

costCtrResponsibleUser: undefined | string

User Responsible. In this field, you can enter the user ID of the person responsible for the cost center. This user ID is stored in the SAP user master record. In the Person Responsible field, you can type in the name of the person responsible. No consistency check is performed against the user master record. Maximum length: 12.

nullable

Optional costingSheet

costingSheet: undefined | string

Costing Sheet. Controls the calculation of overhead. You must store one costing sheet for each object for which the R/3 System is to determine overhead costs.For orders, you enter the costing sheet in the order master record.For overhead cost orders the costing sheet can be defaulted through a model order.For CO production orders without quantity structure the costing sheet can be defaulted through a planning profile.For production orders, process orders, produc cost collectors, maintenance orders, regular maintenance orders and service orders the costing sheet is defaulted through a valuation variant.The valuation variant is stored in the costing variant. You can store the costing variant as default value per order type and plant.For cost centers you enter the costing sheet in the master data.For buiness processes you enter the costing sheet in the master data.For projects you enter the costing sheet in the project profile.For materials the R/3 System selects the costing sheet through the valuation variant.For base object plannings, enter the costing sheet in the master data of the costing sheet.For cost object IDs the costing sheet is defaulted through the cost object profile.For cost and revenue carrying sales document items the costing sheet is defaulted through the requirements class. Maximum length: 6.

nullable

Optional country

country: undefined | string

Country Key. The country key contains information which the system uses to check entries such as the length of the postal code or bank account number. The two-character ISO code in accordance with ISO 3166, which is delivered by SAP as a default, is usually used.It could also be the vehicle license plate country-code or a typical country key, for example, in Germany the Federal statistics office key.The country keys are determined at system installation in the global settings.The definition of the country key in the SAP system does not have to match political or government entities.Since the country key does not have to correspond to the ISO code in all installations, programs that differ according to certain values of the country key cannot query the country key T005-LAND1, but have to program based on the ISO code T005 INTCA. Maximum length: 3.

nullable

Optional department

department: undefined | string

Department. In this field, you can enter the name of the department to which the cost center belongs. It then can be used for evaluations. Maximum length: 12.

nullable

Optional functionalArea

functionalArea: undefined | string

Functional Area. Structure criterion for an enterprise or government based on functional aspects. Use for Cost-of-Sales AccountingThe functional area is required to create a profit and loss account in Financial Accounting using cost-of-sales accounting. The following are examples of structure criteria:ManufacturingAdministrationSalesResearch and developmentUse for GovernmentThe functional area is needed for Funds Management to meet legal requirements for reporting with functional aspects. You can use the functional area to represent the global targets and goals (such as public safety or city development), in particular the expenses of your organization.Use in cost-of-sales accountingSee the documentation on Filling the Functional Area Field.For comprehensive information on cost-of-sales accounting and on the functional area, see the SAP Library under Accounting -> Financial Accounting -> General Ledger -> Cost-of-Sales Accounting.Use in governmentFor more information on the functional area, see the implementation Guide for Funds Management Government in the section Activate Account Assignment Elements. Maximum length: 16.

nullable

Optional isBlkdForPrimaryCostsPosting

isBlkdForPrimaryCostsPosting: undefined | string

Lock Indicator for Actual Primary Postings. Indicator defining whether a cost center is locked for posting with direct costs. If the indicator is active, no primary costs can be posted to the cost center. You may, however, still use the cost center for evaluations such as summarization, etc. Maximum length: 1.

nullable

Optional isBlkdForSecondaryCostsPosting

isBlkdForSecondaryCostsPosting: undefined | string

Lock Indicator for Actual Secondary Costs. Indicator controlling whether the cost center is locked against postings of secondary costs UseIf the indicator is active, you cannot post secondary costs to the cost center from now on.This indicatory normally locks the cost center only against actual debits of secondary costs. However, actual credits to the cost center are possible.To alter the effect of this indicator so that sender cost centers are also locked against allocation, change the type of messsage GM 155 from I (information) to E (error).To do so, access the IMG for General Controlling -> Message Control. Enter GM as the work area. You can then create a new entry for message number 155, which entry differs from the standard message type.Message control. Maximum length: 1.

nullable

Optional isBlockedForCommitmentPosting

isBlockedForCommitmentPosting: undefined | string

Lock Indicator for Commitment Update. Indicator defining whether a commitment is updated for the cost center. If the indicator is active, no commitments can be updated to the affected cost center. Maximum length: 1.

nullable

Optional isBlockedForPlanPrimaryCosts

isBlockedForPlanPrimaryCosts: undefined | string

Lock Indicator for Plan Primary Costs. Indicator defining whether a cost center is locked for planning with direct costs. If the indicator is active, you cannot plan any primary costs on the affected cost center at this time. Maximum length: 1.

nullable

Optional isBlockedForPlanRevenues

isBlockedForPlanRevenues: undefined | string

Lock Indicator for Planning Revenues. Maximum length: 1.

nullable

Optional isBlockedForPlanSecondaryCosts

isBlockedForPlanSecondaryCosts: undefined | string

Lock Indicator for Plan Secondary Costs. Maximum length: 1.

nullable

Optional isBlockedForRevenuePosting

isBlockedForRevenuePosting: undefined | string

Lock Indicator for Actual Revenue Postings. Indicator defining whether a cost center is locked for posting with revenues. If the indicator is active, you cannot post revenues to the affected cost center.If the indicator is inactive, the revenues are written to the cost center as statistics only. Maximum length: 1.

nullable

Optional language

language: undefined | string

Language Key. The language key indicates

  • the language in which texts are displayed,- the language in which you enter texts,- the language in which the system prints texts. Maximum length: 2.
nullable

Optional profitCenter

profitCenter: undefined | string

Profit Center. Key which together with the controlling area uniquely identifies a profit center. Maximum length: 10.

nullable

Optional region

region: undefined | string

Region (State, Province, County). In some countries, the region forms part of the address. The meaning depends on the country. The automatic address formatting function prints the region in addresses in the USA, Canada, Italy, Brazil or Australia, and the county in Great Britain.For more information, see the examples in the documentation on the Address Layout Key.Meaning of the regional code in ...Australia -> ProvinceBrazil -> StateCanada -> ProvinceGermany -> StateGreat Britain -> CountyItaly -> ProvinceJapan -> PrefectureSwitzerland -> CantonUSA -> State. Maximum length: 3.

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

toText

toText: CostCenterText[]

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

validityEndDate

validityEndDate: Moment

Valid To Date. Date indicating up to when an entry is valid.

Optional validityStartDate

validityStartDate: Moment

Valid-From Date. Date indicating as of when an entry is valid.

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

All fields selector.

Static BUSINESS_AREA

BUSINESS_AREA: StringField<CostCenter> = new StringField('BusinessArea', CostCenter, 'Edm.String')

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

Static CITY_NAME

CITY_NAME: StringField<CostCenter> = new StringField('CityName', CostCenter, 'Edm.String')

Static representation of the cityName 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<CostCenter> = new StringField('CompanyCode', CostCenter, '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 CONSUMPTION_QTY_IS_RECORDED

CONSUMPTION_QTY_IS_RECORDED: StringField<CostCenter> = new StringField('ConsumptionQtyIsRecorded', CostCenter, 'Edm.String')

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

Static CONTROLLING_AREA

CONTROLLING_AREA: StringField<CostCenter> = new StringField('ControllingArea', CostCenter, 'Edm.String')

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

Static COSTING_SHEET

COSTING_SHEET: StringField<CostCenter> = new StringField('CostingSheet', CostCenter, 'Edm.String')

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

Static COST_CENTER

COST_CENTER: StringField<CostCenter> = new StringField('CostCenter', CostCenter, 'Edm.String')

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

Static COST_CENTER_CATEGORY

COST_CENTER_CATEGORY: StringField<CostCenter> = new StringField('CostCenterCategory', CostCenter, 'Edm.String')

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

Static COST_CENTER_CREATED_BY_USER

COST_CENTER_CREATED_BY_USER: StringField<CostCenter> = new StringField('CostCenterCreatedByUser', CostCenter, 'Edm.String')

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

Static COST_CENTER_CREATION_DATE

COST_CENTER_CREATION_DATE: DateField<CostCenter> = new DateField('CostCenterCreationDate', CostCenter, 'Edm.DateTime')

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

Static COST_CENTER_CURRENCY

COST_CENTER_CURRENCY: StringField<CostCenter> = new StringField('CostCenterCurrency', CostCenter, 'Edm.String')

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

Static COST_CENTER_STANDARD_HIER_AREA

COST_CENTER_STANDARD_HIER_AREA: StringField<CostCenter> = new StringField('CostCenterStandardHierArea', CostCenter, 'Edm.String')

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

Static COST_CTR_RESPONSIBLE_PERSON_NAME

COST_CTR_RESPONSIBLE_PERSON_NAME: StringField<CostCenter> = new StringField('CostCtrResponsiblePersonName', CostCenter, 'Edm.String')

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

Static COST_CTR_RESPONSIBLE_USER

COST_CTR_RESPONSIBLE_USER: StringField<CostCenter> = new StringField('CostCtrResponsibleUser', CostCenter, 'Edm.String')

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

Static COUNTRY

COUNTRY: StringField<CostCenter> = new StringField('Country', CostCenter, 'Edm.String')

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

Static DEPARTMENT

DEPARTMENT: StringField<CostCenter> = new StringField('Department', CostCenter, 'Edm.String')

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

Static FUNCTIONAL_AREA

FUNCTIONAL_AREA: StringField<CostCenter> = new StringField('FunctionalArea', CostCenter, 'Edm.String')

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

Static IS_BLKD_FOR_PRIMARY_COSTS_POSTING

IS_BLKD_FOR_PRIMARY_COSTS_POSTING: StringField<CostCenter> = new StringField('IsBlkdForPrimaryCostsPosting', CostCenter, 'Edm.String')

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

Static IS_BLKD_FOR_SECONDARY_COSTS_POSTING

IS_BLKD_FOR_SECONDARY_COSTS_POSTING: StringField<CostCenter> = new StringField('IsBlkdForSecondaryCostsPosting', CostCenter, 'Edm.String')

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

Static IS_BLOCKED_FOR_COMMITMENT_POSTING

IS_BLOCKED_FOR_COMMITMENT_POSTING: StringField<CostCenter> = new StringField('IsBlockedForCommitmentPosting', CostCenter, 'Edm.String')

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

Static IS_BLOCKED_FOR_PLAN_PRIMARY_COSTS

IS_BLOCKED_FOR_PLAN_PRIMARY_COSTS: StringField<CostCenter> = new StringField('IsBlockedForPlanPrimaryCosts', CostCenter, 'Edm.String')

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

Static IS_BLOCKED_FOR_PLAN_REVENUES

IS_BLOCKED_FOR_PLAN_REVENUES: StringField<CostCenter> = new StringField('IsBlockedForPlanRevenues', CostCenter, 'Edm.String')

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

Static IS_BLOCKED_FOR_PLAN_SECONDARY_COSTS

IS_BLOCKED_FOR_PLAN_SECONDARY_COSTS: StringField<CostCenter> = new StringField('IsBlockedForPlanSecondaryCosts', CostCenter, 'Edm.String')

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

Static IS_BLOCKED_FOR_REVENUE_POSTING

IS_BLOCKED_FOR_REVENUE_POSTING: StringField<CostCenter> = new StringField('IsBlockedForRevenuePosting', CostCenter, 'Edm.String')

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

Static LANGUAGE

LANGUAGE: StringField<CostCenter> = new StringField('Language', CostCenter, 'Edm.String')

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

Static PROFIT_CENTER

PROFIT_CENTER: StringField<CostCenter> = new StringField('ProfitCenter', CostCenter, 'Edm.String')

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

Static REGION

REGION: StringField<CostCenter> = new StringField('Region', CostCenter, 'Edm.String')

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

Static TO_TEXT

TO_TEXT: Link<CostCenter, CostCenterText> = new Link('to_Text', CostCenter, CostCenterText)

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

Static VALIDITY_END_DATE

VALIDITY_END_DATE: DateField<CostCenter> = new DateField('ValidityEndDate', CostCenter, 'Edm.DateTime')

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

Static VALIDITY_START_DATE

VALIDITY_START_DATE: DateField<CostCenter> = new DateField('ValidityStartDate', CostCenter, 'Edm.DateTime')

Static representation of the validityStartDate 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<CostCenter> | DateField<CostCenter> | Link<CostCenter, CostCenterText>> = [CostCenter.CONTROLLING_AREA,CostCenter.COST_CENTER,CostCenter.VALIDITY_END_DATE,CostCenter.VALIDITY_START_DATE,CostCenter.COMPANY_CODE,CostCenter.BUSINESS_AREA,CostCenter.COST_CTR_RESPONSIBLE_PERSON_NAME,CostCenter.COST_CTR_RESPONSIBLE_USER,CostCenter.COST_CENTER_CURRENCY,CostCenter.PROFIT_CENTER,CostCenter.DEPARTMENT,CostCenter.COSTING_SHEET,CostCenter.FUNCTIONAL_AREA,CostCenter.COUNTRY,CostCenter.REGION,CostCenter.CITY_NAME,CostCenter.COST_CENTER_STANDARD_HIER_AREA,CostCenter.COST_CENTER_CATEGORY,CostCenter.IS_BLKD_FOR_PRIMARY_COSTS_POSTING,CostCenter.IS_BLKD_FOR_SECONDARY_COSTS_POSTING,CostCenter.IS_BLOCKED_FOR_REVENUE_POSTING,CostCenter.IS_BLOCKED_FOR_COMMITMENT_POSTING,CostCenter.IS_BLOCKED_FOR_PLAN_PRIMARY_COSTS,CostCenter.IS_BLOCKED_FOR_PLAN_SECONDARY_COSTS,CostCenter.IS_BLOCKED_FOR_PLAN_REVENUES,CostCenter.CONSUMPTION_QTY_IS_RECORDED,CostCenter.LANGUAGE,CostCenter.COST_CENTER_CREATED_BY_USER,CostCenter.COST_CENTER_CREATION_DATE,CostCenter.TO_TEXT]

All fields of the CostCenter entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_CostCenter"

Technical entity name for CostCenter.

Static _keyFields

_keyFields: Array<Selectable<CostCenter>> = [CostCenter.CONTROLLING_AREA, CostCenter.COST_CENTER, CostCenter.VALIDITY_END_DATE]

All key fields of the CostCenter entity.

Static _keys

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

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

Type declaration

Static _serviceName

_serviceName: string = "API_COSTCENTER_SRV"
deprecated

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

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

  • customField(fieldName: string): CustomField<CostCenter>
  • Returns a selectable object that allows the selection of custom field in a get request for the entity CostCenter.

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<CostCenter>

    A builder that constructs instances of entity type CostCenter.

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

    Returns CostCenterRequestBuilder

    A CostCenter request builder.