@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'CFIGRIRPURDOCITM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'GR/IR Purchasing Document Item'
@VDM.viewType: #CONSUMPTION
@ObjectModel.representativeKey: 'PurchasingDocumentItem'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@AccessControl.privilegedAssociations: [ '_CreatedByUser', '_RequisitionerUser', '_Supplier' ]
define view C_GRIRPurchasingDocItem
as select from I_PurchasingDocumentItem
//--[ GENERATED:012:GFBfhxvv7kY4nMAHUcRAe0
association [0..1] to I_Supplier as _SupplierText on $projection.Supplier = _SupplierText.Supplier
// ]--GENERATED
association [0..1] to I_UserContactCard as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.ContactCardID
association [0..1] to I_UserContactCard as _RequisitionerUser on $projection.RequisitionerUser = _RequisitionerUser.ContactCardID
association [0..1] to I_GRIRProcess as _GRIRProcess on $projection.CompanyCode = _GRIRProcess.CompanyCode and
$projection.PurchasingDocument = _GRIRProcess.PurchasingDocument and
$projection.PurchasingDocumentItem = _GRIRProcess.PurchasingDocumentItem
{
@ObjectModel.foreignKey.association: '_PurchasingDocument'
key cast( I_PurchasingDocumentItem.PurchasingDocument as fis_ebeln preserving type) as PurchasingDocument,
key cast( I_PurchasingDocumentItem.PurchasingDocumentItem as fis_ebelp preserving type) as PurchasingDocumentItem,
//--[ GENERATED:012:GFBfhxvv7kY4nMAHUcRAe0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_CompanyCodeVH',
element: 'CompanyCode' }
}]
// ]--GENERATED
@ObjectModel.foreignKey.association: '_CompanyCode'
I_PurchasingDocumentItem.CompanyCode,
@ObjectModel.foreignKey.association: '_PurgDocumentCategory'
I_PurchasingDocumentItem.PurchasingDocumentCategory,
//--[ GENERATED:012:GFBfhxvv7kY4nMAHUcRAe0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_Supplier_VH',
element: 'Supplier' }
}]
@ObjectModel.text.association: '_SupplierText'
// ]--GENERATED
I_PurchasingDocumentItem._PurchasingDocument.Supplier as Supplier,
@Semantics.currencyCode:true
I_PurchasingDocumentItem.DocumentCurrency,
I_PurchasingDocumentItem._PurchasingDocument.PurchasingDocumentType,
//--[ GENERATED:012:GFBfhxvv7kY4nMAHUcRAe0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_ProductGroup',
element: 'MaterialGroup' }
}]
// ]--GENERATED
I_PurchasingDocumentItem.MaterialGroup,
//--[ GENERATED:012:GFBfhxvv7kY4nMAHUcRAe0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_ProductVH',
element: 'Product' }
}]
// ]--GENERATED
I_PurchasingDocumentItem.Material,
I_PurchasingDocumentItem.Plant,
cast(I_PurchasingDocumentItem._PurchasingDocument.PurchasingOrganization as fis_grir_ekorg preserving type ) as PurchasingOrganization,
I_PurchasingDocumentItem._PurchasingDocument._PurchasingOrganization.PurchasingOrganizationName,
cast(I_PurchasingDocumentItem._PurchasingDocument.PurchasingGroup as fis_grir_ekgrp preserving type ) as PurchasingGroup,
I_PurchasingDocumentItem._PurchasingDocument._PurchasingGroup.PurchasingGroupName,
I_PurchasingDocumentItem._PurchasingDocument._PurchasingGroup.FaxNumber,
I_PurchasingDocumentItem._PurchasingDocument._PurchasingGroup.PurchasingGroupPhoneNumber,
I_PurchasingDocumentItem.PurchasingDocumentItemText,
@Semantics.unitOfMeasure: true
I_PurchasingDocumentItem.OrderQuantityUnit,
@Semantics.language:true
I_PurchasingDocumentItem._PurchasingDocument.Language,
I_PurchasingDocumentItem._PurchasingDocument.LastChangeDateTime,
I_PurchasingDocumentItem._PurchasingDocument.PurchasingDocumentOrderDate,
I_PurchasingDocumentItem._PurchasingDocument.CreatedByUser as CreatedByUser,
I_PurchasingDocumentItem._PurchaseRequisitionItem.CreatedByUser as RequisitionerUser,
@Semantics.amount.currencyCode: 'DocumentCurrency'
@DefaultAggregation: #SUM
@ObjectModel.filter.enabled: true
I_PurchasingDocumentItem.NetAmount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
@DefaultAggregation: #SUM
@ObjectModel.filter.enabled: true
I_PurchasingDocumentItem.NetPriceAmount,
@Semantics: { quantity : {unitOfMeasure: 'OrderQuantityUnit'} }
@DefaultAggregation: #SUM
@ObjectModel.filter.enabled: true
I_PurchasingDocumentItem.NetPriceQuantity,
@Semantics: { quantity : {unitOfMeasure: 'OrderQuantityUnit'} }
@DefaultAggregation: #SUM
@ObjectModel.filter.enabled: true
I_PurchasingDocumentItem.OrderQuantity,
I_PurchasingDocumentItem.IsFinallyInvoiced,
I_PurchasingDocumentItem._PurchasingInfoRecord.IsDeleted,
//--[ GENERATED:012:GFBfhxvv7kY4nMAHUcRAe0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_ProductVH',
element: 'Product' }
}]
// ]--GENERATED
I_PurchasingDocumentItem.ManufacturerMaterial,
/* Associations */
I_PurchasingDocumentItem._CompanyCode,
I_PurchasingDocumentItem._Material,
I_PurchasingDocumentItem._MaterialGroup,
I_PurchasingDocumentItem._OrderQuantityUnit,
I_PurchasingDocumentItem._Plant,
I_PurchasingDocumentItem._PurgDocumentCategory,
I_PurchasingDocumentItem._DocumentCurrency,
I_PurchasingDocumentItem._ManufacturerMaterial,
I_PurchasingDocumentItem._PurchasingDocument._Language,
// I_PurchasingDocumentItem._PurchasingDocument._PurchasingDocumentType,
I_PurchasingDocumentItem._PurchasingDocument._Supplier as _Supplier,
_CreatedByUser,
_RequisitionerUser,
_GRIRProcess,
//--[ GENERATED:012:GFBfhxvv7kY4nMAHUcRAe0
@Consumption.hidden: true
_SupplierText,
// ]--GENERATED
I_PurchasingDocumentItem._PurchasingDocument
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEREQUISITIONITEM",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM",
"I_PURCHASINGGROUP",
"I_PURCHASINGINFORECORDAPI01",
"I_PURCHASINGORGANIZATION"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CURRENCY",
"I_GRIRPROCESS",
"I_LANGUAGE",
"I_MATERIAL",
"I_MATERIALGROUP",
"I_PLANT",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTCATEGORY",
"I_SUPPLIER",
"I_UNITOFMEASURE",
"I_USERCONTACTCARD"
],
"BASE":
[
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/