Options
All
  • Public
  • Public/Protected
  • All
Menu

This class represents the entity "A_PurchasingSource" of service "API_PURCHASING_SOURCE_SRV". This service is part of the following communication scenarios: Purchasing Source Integration (SAP_COM_0162). See https://api.sap.com/api/API_PURCHASING_SOURCE_SRV for more information.

Hierarchy

  • Entity
    • PurchasingSource

Implements

Index

Constructors

constructor

  • Returns PurchasingSource

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 createdByUserName

createdByUserName: string

Name of Person Who Created Object. Maximum length: 12.

nullable

Optional creationDate

creationDate: Moment

Date on Which Record Was Created.

nullable

Optional issgPlantIsFixed

issgPlantIsFixed: boolean

Fixed issuing plant in case of stock transport order. Indicator specifying that the supplying plant is the fixed supplying plant for the validity period of the source list record.

nullable

Optional lastChangeDateTime

lastChangeDateTime: Moment

UTC Time Stamp in Long Form (YYYYMMDDhhmmssmmmuuun). The UTC timestamp displays date and time according to UTC (Universal Coordinated Time). In order to convert local time into a UTC time stamp, which makes it easier to compare times, the local time must be converted according to your time zone. The ABAP command convert is available for this purpose.Even if the time zone that the conversion is based on can be redetermined from Customizing or master data, we still recommend that you save the time zone.The internal structure of the high-resolution UTC time stamp is logically organized in date and time sections in a packed decimal format (YYYYMMDDhhmmssmmmuuun), which depicts the year, month, day, hour,second, millisecond, microsecond and the first decimal of the nanoseconds. Please note that the hardware that is normally used does not fully support a resolution of 100 nanoseconds, which is available in the structure.See also GET TIME STAMPA UTC time stamp in short form is also available.

nullable

material

material: string

Material Number. Alphanumeric key uniquely identifying the material. Maximum length: 40.

Optional mrpSourcingControl

mrpSourcingControl: string

Source List Usage in Materials Planning. Key that determines how the source of supply defined in the source list record is used in material requirements planning (MRP). The following are valid entries for this field:"1"Purchase requisitions generated within the framework of material requirements planning are automatically assigned to this source."2"If the source of supply is a scheduling agreement, MRP can create a delivery schedule line with respect to a requirement." "The source of supply is not taken into account by material requirements planning. Maximum length: 1.

nullable

Optional orderQuantityUnit

orderQuantityUnit: string

Purchase Order Unit of Measure. Specifies the unit of measure in which the material is ordered. Maximum length: 3.

nullable

plant

plant: string

Plant. Specifies the key for a production facility or branch office within the company (that is, the company code). You use the plant key to determine, for instance, which plant is to receive ordered goods. Maximum length: 4.

Optional purOutlineAgreementIsFixed

purOutlineAgreementIsFixed: boolean

Fixed Outline Purchase Agreement Item. Specifies that an outline agreement item is to be considered as a fixed source of supply during the validity period of the source list record. If you flag an outline agreement item as a fixed source, it will be determined in the course of the source determination process and the material entered can only be procured under this outline agreement when a purchase order is created.

nullable

Optional purchaseOutlineAgreement

purchaseOutlineAgreement: string

Agreement Number. Number of the outline agreement. Maximum length: 10.

nullable

Optional purchaseOutlineAgreementItem

purchaseOutlineAgreementItem: string

Agreement Item. Specifies the number that uniquely identifies an item in . Maximum length: 5.

nullable

Optional purchasingOrganization

purchasingOrganization: string

Purchasing Organization. Denotes the purchasing organization. Maximum length: 4.

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

sourceListRecord

sourceListRecord: string

Number of Source List Record. Alphanumeric key uniquely identifying the document. This counter is assigned internally by the system at material master plant segment level. Maximum length: 5.

Optional sourceOfSupplyIsBlocked

sourceOfSupplyIsBlocked: boolean

Blocked Source of Supply. Species whether the source ofsupply is blocked for ordering purposes. A blocked source will not be suggested in the course of the source determination process that takes place in the purchase requisition or purchase order.The issue of purchase orders to blocked sources is not allowed.Note:If you set the Blk indicator and enter just one validity period, the material is generally blocked for external procurement.

nullable

Optional sourceOfSupplyIsFixed

sourceOfSupplyIsFixed: boolean

Fixed Source of Supply. Specifies that the source of supply is the preferred procurement option within the specified period. In the source determination process with regard to a purchase requisition or purchase order, the preferred source is suggested first.Only one source of the same type (i.e. supplier or outline agreement) may be preferred within a certain validity period.

nullable

Optional supplier

supplier: string

Vendor Account Number. Alphanumeric key uniquely identifying the document. With the supplier number, information from the supplier master record (such as the supplier's address and bank details) is copied into a purchasing document (such as a request for quotation or a purchase order).You can use the supplier number to keep track of requests for quotation, purchase orders and outline agreements. Maximum length: 10.

nullable

Optional supplierIsFixed

supplierIsFixed: boolean

Indicator: Fixed Supplier. Indicator specifying that the supplier is the fixed supplier for the validity period of the source list record.

nullable

Optional supplyingPlant

supplyingPlant: string

Plant from Which Material is Procured. Key for the factory or branch of a company (that is, a company code), from which the material is to be procured. You can only enter one supplier number or one plant per quota arrangement item.In the case of process orders, this field should remain empty if the quota arrangement is being used to select a production version. Maximum length: 4.

nullable

Optional validityEndDate

validityEndDate: Moment

Source List Record Valid To. Date until which the source list record is valid. When carrying out checks against the source list, the system takes only those source list records into account whose "valid until" date is later than the date to be checked. The date to be checked is normally the delivery date, depending on the application in question.

nullable

Optional validityStartDate

validityStartDate: Moment

Source List Record Valid From. Date from which the source list record is valid. When the system carries out checks against the source list, only those source list records whose "valid from" date is earlier than the date to be checked are taken into account. The date to be checked is normally the delivery date (depending on the application in question).

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

All fields selector.

Static CREATED_BY_USER_NAME

CREATED_BY_USER_NAME: StringField<PurchasingSource> = new StringField('CreatedByUserName', PurchasingSource, 'Edm.String')

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

Static CREATION_DATE

CREATION_DATE: DateField<PurchasingSource> = new DateField('CreationDate', PurchasingSource, 'Edm.DateTime')

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

Static ISSG_PLANT_IS_FIXED

ISSG_PLANT_IS_FIXED: BooleanField<PurchasingSource> = new BooleanField('IssgPlantIsFixed', PurchasingSource, 'Edm.Boolean')

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

Static LAST_CHANGE_DATE_TIME

LAST_CHANGE_DATE_TIME: DateField<PurchasingSource> = new DateField('LastChangeDateTime', PurchasingSource, 'Edm.DateTimeOffset')

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

Static MATERIAL

MATERIAL: StringField<PurchasingSource> = new StringField('Material', PurchasingSource, 'Edm.String')

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

Static MRP_SOURCING_CONTROL

MRP_SOURCING_CONTROL: StringField<PurchasingSource> = new StringField('MRPSourcingControl', PurchasingSource, 'Edm.String')

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

Static ORDER_QUANTITY_UNIT

ORDER_QUANTITY_UNIT: StringField<PurchasingSource> = new StringField('OrderQuantityUnit', PurchasingSource, 'Edm.String')

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

Static PLANT

PLANT: StringField<PurchasingSource> = new StringField('Plant', PurchasingSource, 'Edm.String')

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

Static PURCHASE_OUTLINE_AGREEMENT

PURCHASE_OUTLINE_AGREEMENT: StringField<PurchasingSource> = new StringField('PurchaseOutlineAgreement', PurchasingSource, 'Edm.String')

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

Static PURCHASE_OUTLINE_AGREEMENT_ITEM

PURCHASE_OUTLINE_AGREEMENT_ITEM: StringField<PurchasingSource> = new StringField('PurchaseOutlineAgreementItem', PurchasingSource, 'Edm.String')

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

Static PURCHASING_ORGANIZATION

PURCHASING_ORGANIZATION: StringField<PurchasingSource> = new StringField('PurchasingOrganization', PurchasingSource, 'Edm.String')

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

Static PUR_OUTLINE_AGREEMENT_IS_FIXED

PUR_OUTLINE_AGREEMENT_IS_FIXED: BooleanField<PurchasingSource> = new BooleanField('PurOutlineAgreementIsFixed', PurchasingSource, 'Edm.Boolean')

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

Static SOURCE_LIST_RECORD

SOURCE_LIST_RECORD: StringField<PurchasingSource> = new StringField('SourceListRecord', PurchasingSource, 'Edm.String')

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

Static SOURCE_OF_SUPPLY_IS_BLOCKED

SOURCE_OF_SUPPLY_IS_BLOCKED: BooleanField<PurchasingSource> = new BooleanField('SourceOfSupplyIsBlocked', PurchasingSource, 'Edm.Boolean')

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

Static SOURCE_OF_SUPPLY_IS_FIXED

SOURCE_OF_SUPPLY_IS_FIXED: BooleanField<PurchasingSource> = new BooleanField('SourceOfSupplyIsFixed', PurchasingSource, 'Edm.Boolean')

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

Static SUPPLIER

SUPPLIER: StringField<PurchasingSource> = new StringField('Supplier', PurchasingSource, '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 SUPPLIER_IS_FIXED

SUPPLIER_IS_FIXED: BooleanField<PurchasingSource> = new BooleanField('SupplierIsFixed', PurchasingSource, 'Edm.Boolean')

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

Static SUPPLYING_PLANT

SUPPLYING_PLANT: StringField<PurchasingSource> = new StringField('SupplyingPlant', PurchasingSource, 'Edm.String')

Static representation of the supplyingPlant property 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<PurchasingSource> = new DateField('ValidityEndDate', PurchasingSource, '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<PurchasingSource> = new DateField('ValidityStartDate', PurchasingSource, '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<PurchasingSource> | DateField<PurchasingSource> | BooleanField<PurchasingSource>> = [PurchasingSource.MATERIAL,PurchasingSource.PLANT,PurchasingSource.SOURCE_LIST_RECORD,PurchasingSource.CREATION_DATE,PurchasingSource.CREATED_BY_USER_NAME,PurchasingSource.VALIDITY_START_DATE,PurchasingSource.VALIDITY_END_DATE,PurchasingSource.SUPPLIER,PurchasingSource.SUPPLIER_IS_FIXED,PurchasingSource.PURCHASE_OUTLINE_AGREEMENT,PurchasingSource.PURCHASE_OUTLINE_AGREEMENT_ITEM,PurchasingSource.SUPPLYING_PLANT,PurchasingSource.SOURCE_OF_SUPPLY_IS_BLOCKED,PurchasingSource.PURCHASING_ORGANIZATION,PurchasingSource.MRP_SOURCING_CONTROL,PurchasingSource.ORDER_QUANTITY_UNIT,PurchasingSource.LAST_CHANGE_DATE_TIME,PurchasingSource.ISSG_PLANT_IS_FIXED,PurchasingSource.PUR_OUTLINE_AGREEMENT_IS_FIXED,PurchasingSource.SOURCE_OF_SUPPLY_IS_FIXED]

All fields of the PurchasingSource entity.

Static _defaultServicePath

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

Default url path for the according service.

Static _entityName

_entityName: string = "A_PurchasingSource"

Technical entity name for PurchasingSource.

Static _keyFields

_keyFields: Array<Selectable<PurchasingSource>> = [PurchasingSource.MATERIAL, PurchasingSource.PLANT, PurchasingSource.SOURCE_LIST_RECORD]

All key fields of the PurchasingSource entity.

Static _keys

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

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

Static _serviceName

_serviceName: string = "API_PURCHASING_SOURCE_SRV"
deprecated

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

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

  • Returns an entity builder to construct instances PurchasingSource.

    Returns EntityBuilderType<PurchasingSource, PurchasingSourceType>

    A builder that constructs instances of entity type PurchasingSource.

Static customField

  • Returns a selectable object that allows the selection of custom field in a get request for the entity PurchasingSource.

    Parameters

    • fieldName: string

      Name of the custom field to select

    Returns CustomField<PurchasingSource>

    A builder that constructs instances of entity type PurchasingSource.

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

    Returns PurchasingSourceRequestBuilder

    A PurchasingSource request builder.