Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_SalesOrderPrcgElmntSimln" of service "API_SALES_ORDER_SIMULATION_SRV". This service is part of the following communication scenarios: Sales Order Integration (SAP_COM_0109). See https://api.sap.com/api/API_SALES_ORDER_SIMULATION_SRV for more information.

Hierarchy

  • Entity
    • SalesOrderPrcgElmntSimln

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 conditionAmount

conditionAmount: BigNumber

Condition Value. The value, resulting from pricing, for a particular condition, total, or subtotal in a document. This value is used as a total for the condition in the pricing procedure.

nullable

Optional conditionCalculationType

conditionCalculationType: string

Calculation Type for Condition. Determines how the system calculates prices, discounts, or surcharges in a condition. For example, the system can calculate a price as a fixed amount or as a percentage based on quantity, volume, or weight. The calculation type can be set when generating new condition records. If this does not happen, the calculation type maintained here is valid for the condition record. Maximum length: 3.

nullable

Optional conditionCurrency

conditionCurrency: string

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

nullable

Optional conditionInactiveReason

conditionInactiveReason: string

Condition is Inactive. Indicates if the condition is active. A condition can be inactive due to the following reasons:Condition is excludedSubsequent price deactivates conditionFormula deactivates conditionError during pricing. Maximum length: 1.

nullable

Optional conditionIsForStatistics

conditionIsForStatistics: boolean

Condition is used for statistics. This indicator causes a surcharge or discount to be set in the document statistically (that is, without altering the value).

nullable

Optional conditionIsManuallyChanged

conditionIsManuallyChanged: boolean

Condition Changed Manually. If this flag is set, the condition has been manually or automatically changed or created (by entry in the condition screen).

nullable

Optional conditionQuantity

conditionQuantity: BigNumber

Condition Pricing Unit. The quantity on which the amount or percentage is based. The quantity is expressed in sales units (for example, bottles). You want to create a condition record for a material price of US$8 for 1 piece. You enter "8" in the Rate field, "USD" in the Unit field, and "1" as the condition pricing unit in this field.You create a condition record that gives a fixed discount of $10 to a customer who buys 1000 bottles. In this case, the condition pricing unit is 1000.

nullable

Optional conditionQuantityUnit

conditionQuantityUnit: string

Condition Unit in the Document. Quantity unit, to which the condition amount or percentage refers. Maximum length: 3.

nullable

Optional conditionRateValue

conditionRateValue: BigNumber

Rate (Amount or Percentage). Determines how the system calculates pricing using this condition. Depending on the condition type, the rate can be an amount or a percentage. If the condition includes a pricing scale, the rate displays the first line of the scale. The following examples illustrate how you can use the rate in different condition types:If you create a condition that includes prices (for example, prices for a material), you enter an amount.If you are creating a condition based on percentage discounts or surcharges (for example, a customer-specific discount), you enter the value of a percentage. If the condition is a discount, the system automatically enters a minus sign behind the amount and a percent sign in the Rate unit field.

nullable

Optional conditionType

conditionType: string

Condition Type. The key that uniquely identifies the condition. The condition type indicates, for example, whether, during pricing, the system applies a price, a discount, a surcharge, or other pricing elements, such as freight costs and sales taxes. For each of these pricing elements, there is a condition type defined in the system. Maximum length: 4.

nullable

pricingProcedureCounter

pricingProcedureCounter: string

Condition Counter. Access number of the conditions within a step in the pricing procedure. During automatic pricing, the system takes into account the sequence specified by the counter. Maximum length: 3.

pricingProcedureStep

pricingProcedureStep: string

Step Number. Number that determines the sequence of the condition within a procedure. Maximum length: 3.

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

salesOrder

salesOrder: string

Sales Order. Maximum length: 10.

toSalesOrder

toSalesOrder: SalesOrderSimulation

One-to-one navigation property to the SalesOrderSimulation entity.

Optional transactionCurrency

transactionCurrency: string

SD document currency. The currency that applies to the document (for example, to a sales order or an invoice). The system proposes the document currency from the customer master record of the sold-to party. You can change the currency manually in the document. If you change the currency, the system recalculates prices for the entire document. Maximum length: 5.

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

All fields selector.

Static CONDITION_AMOUNT

CONDITION_AMOUNT: BigNumberField<SalesOrderPrcgElmntSimln> = new BigNumberField('ConditionAmount', SalesOrderPrcgElmntSimln, 'Edm.Decimal')

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

Static CONDITION_CALCULATION_TYPE

CONDITION_CALCULATION_TYPE: StringField<SalesOrderPrcgElmntSimln> = new StringField('ConditionCalculationType', SalesOrderPrcgElmntSimln, 'Edm.String')

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

Static CONDITION_CURRENCY

CONDITION_CURRENCY: StringField<SalesOrderPrcgElmntSimln> = new StringField('ConditionCurrency', SalesOrderPrcgElmntSimln, 'Edm.String')

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

Static CONDITION_INACTIVE_REASON

CONDITION_INACTIVE_REASON: StringField<SalesOrderPrcgElmntSimln> = new StringField('ConditionInactiveReason', SalesOrderPrcgElmntSimln, 'Edm.String')

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

Static CONDITION_IS_FOR_STATISTICS

CONDITION_IS_FOR_STATISTICS: BooleanField<SalesOrderPrcgElmntSimln> = new BooleanField('ConditionIsForStatistics', SalesOrderPrcgElmntSimln, 'Edm.Boolean')

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

Static CONDITION_IS_MANUALLY_CHANGED

CONDITION_IS_MANUALLY_CHANGED: BooleanField<SalesOrderPrcgElmntSimln> = new BooleanField('ConditionIsManuallyChanged', SalesOrderPrcgElmntSimln, 'Edm.Boolean')

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

Static CONDITION_QUANTITY

CONDITION_QUANTITY: BigNumberField<SalesOrderPrcgElmntSimln> = new BigNumberField('ConditionQuantity', SalesOrderPrcgElmntSimln, 'Edm.Decimal')

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

Static CONDITION_QUANTITY_UNIT

CONDITION_QUANTITY_UNIT: StringField<SalesOrderPrcgElmntSimln> = new StringField('ConditionQuantityUnit', SalesOrderPrcgElmntSimln, 'Edm.String')

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

Static CONDITION_RATE_VALUE

CONDITION_RATE_VALUE: BigNumberField<SalesOrderPrcgElmntSimln> = new BigNumberField('ConditionRateValue', SalesOrderPrcgElmntSimln, 'Edm.Decimal')

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

Static CONDITION_TYPE

CONDITION_TYPE: StringField<SalesOrderPrcgElmntSimln> = new StringField('ConditionType', SalesOrderPrcgElmntSimln, 'Edm.String')

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

Static PRICING_PROCEDURE_COUNTER

PRICING_PROCEDURE_COUNTER: StringField<SalesOrderPrcgElmntSimln> = new StringField('PricingProcedureCounter', SalesOrderPrcgElmntSimln, 'Edm.String')

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

Static PRICING_PROCEDURE_STEP

PRICING_PROCEDURE_STEP: StringField<SalesOrderPrcgElmntSimln> = new StringField('PricingProcedureStep', SalesOrderPrcgElmntSimln, 'Edm.String')

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

Static SALES_ORDER

SALES_ORDER: StringField<SalesOrderPrcgElmntSimln> = new StringField('SalesOrder', SalesOrderPrcgElmntSimln, 'Edm.String')

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

Static TO_SALES_ORDER

TO_SALES_ORDER: OneToOneLink<SalesOrderPrcgElmntSimln, SalesOrderSimulation> = new OneToOneLink('to_SalesOrder', SalesOrderPrcgElmntSimln, SalesOrderSimulation)

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

Static TRANSACTION_CURRENCY

TRANSACTION_CURRENCY: StringField<SalesOrderPrcgElmntSimln> = new StringField('TransactionCurrency', SalesOrderPrcgElmntSimln, 'Edm.String')

Static representation of the transactionCurrency 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<SalesOrderPrcgElmntSimln> | BigNumberField<SalesOrderPrcgElmntSimln> | BooleanField<SalesOrderPrcgElmntSimln> | OneToOneLink<SalesOrderPrcgElmntSimln, SalesOrderSimulation>> = [SalesOrderPrcgElmntSimln.SALES_ORDER,SalesOrderPrcgElmntSimln.PRICING_PROCEDURE_STEP,SalesOrderPrcgElmntSimln.PRICING_PROCEDURE_COUNTER,SalesOrderPrcgElmntSimln.CONDITION_TYPE,SalesOrderPrcgElmntSimln.CONDITION_CALCULATION_TYPE,SalesOrderPrcgElmntSimln.CONDITION_RATE_VALUE,SalesOrderPrcgElmntSimln.CONDITION_CURRENCY,SalesOrderPrcgElmntSimln.CONDITION_QUANTITY,SalesOrderPrcgElmntSimln.CONDITION_QUANTITY_UNIT,SalesOrderPrcgElmntSimln.CONDITION_IS_FOR_STATISTICS,SalesOrderPrcgElmntSimln.CONDITION_AMOUNT,SalesOrderPrcgElmntSimln.TRANSACTION_CURRENCY,SalesOrderPrcgElmntSimln.CONDITION_INACTIVE_REASON,SalesOrderPrcgElmntSimln.CONDITION_IS_MANUALLY_CHANGED,SalesOrderPrcgElmntSimln.TO_SALES_ORDER]

All fields of the SalesOrderPrcgElmntSimln entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_SalesOrderPrcgElmntSimln"

Technical entity name for SalesOrderPrcgElmntSimln.

Static _keyFields

_keyFields: Array<Selectable<SalesOrderPrcgElmntSimln>> = [SalesOrderPrcgElmntSimln.SALES_ORDER, SalesOrderPrcgElmntSimln.PRICING_PROCEDURE_STEP, SalesOrderPrcgElmntSimln.PRICING_PROCEDURE_COUNTER]

All key fields of the SalesOrderPrcgElmntSimln entity.

Static _keys

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

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

Static _serviceName

_serviceName: string = "API_SALES_ORDER_SIMULATION_SRV"
deprecated

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

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

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<SalesOrderPrcgElmntSimln>

    A builder that constructs instances of entity type SalesOrderPrcgElmntSimln.

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

    Returns SalesOrderPrcgElmntSimlnRequestBuilder

    A SalesOrderPrcgElmntSimln request builder.