@AbapCatalog.sqlViewName: 'CREQTRACKRFQ'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@VDM.viewType: #CONSUMPTION
@EndUserText.label: 'RFQ by Requirement Tracking'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.semanticKey: [ 'Material', 'Supplier' ]
@Search.searchable: true
@AccessControl.personalData.blocking: #REQUIRED
@VDM.lifecycle.contract.type:#NONE
define view C_RequirementTrackingPurRFQ
as select from I_PurchasingDocumentItem
left outer join I_SupplierQuotationItemEnh on I_PurchasingDocumentItem.PurchasingDocument = I_SupplierQuotationItemEnh.RequestForQuotation
and I_PurchasingDocumentItem.PurchasingDocumentItem = I_SupplierQuotationItemEnh.RequestForQuotationItem
association [1..1] to I_RequestForQuotationEnhanced as _RFQEnhancedWeb on $projection.RequestForQuotation = _RFQEnhancedWeb.RequestForQuotation
// association [1..1] to C_SuplrQuotationEnhWD as _SupplierWeb on $projection.SupplierQuotation = _SupplierWeb.SupplierQuotation
//association [1..1] to I_PurchasingDocumentItem as _PurchasingDocumentItem on $projection.SupplierQuotation = _PurchasingDocumentItem.PurchasingDocument
// and $projection.SupplierQuotationItem = _PurchasingDocumentItem.PurchasingDocumentItem
// association [1..1] to I_PurchasingDocumentItem as _PurchasingDocItem on $projection.RequestForQuotation = _PurchasingDocItem.PurchasingDocument
// and $projection.RequestForQuotationItem = _PurchasingDocItem.PurchasingDocumentItem
association [1..1] to I_PurchasingDocument as _PurchasingDocument on $projection.RequestForQuotation = _PurchasingDocument.PurchasingDocument
association [1..1] to I_PurchasingCategoryMatlGroup as _PurchasingCategoryMatlGroup on $projection.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup
//association [1..1] to I_ProcurementDomainValues as _DomainText on _DomainText.Name = 'VDM_BLOCKED_SUPPLIER'
// and _DomainText.Language = $session.system_language
// and _DomainText.DomainValue = 'X'
//association [1..1] to I_ProcmtBlockedSupplier as _ProcmtBlockedSupplier on _ProcmtBlockedSupplier.PurchasingIsBlockedForSupplier = 'X' //$projection.PurchasingIsBlocked
association [1..1] to I_ProcmtBlockedSupplierTxt as _ProcmtBlockedSupplierTxt on _ProcmtBlockedSupplierTxt.PurchasingIsBlockedForSupplier = 'X'
and _ProcmtBlockedSupplierTxt.Language = $session.system_language //$projection.PurchasingIsBlocked
association [1..1] to I_PurchasingDocument as _SupplierQuotationDocument on $projection.SupplierQuotation = _SupplierQuotationDocument.PurchasingDocument
association [0..1] to I_PurgDocScheduleLine as _PurgDocScheduleLine on _PurgDocScheduleLine.PurchasingDocument = $projection.RequestForQuotation
and _PurgDocScheduleLine.PurchasingDocumentItem = $projection.RequestForQuotationItem
and _PurgDocScheduleLine.ScheduleLine = '0001'
association [1..1] to I_Material as _Material on $projection.Material = _Material.Material
association [1..1] to I_MaterialGroup as _MaterialGroup on $projection.MaterialGroup = _MaterialGroup.MaterialGroup
association [1..1] to I_Supplier as _Supplier on $projection.supplier = _Supplier.Supplier
association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [1..1] to C_PurchasingOrgValueHelp as _PurchasingOrgValueHelp on _PurchasingOrgValueHelp.PurchasingOrganization = $projection.purchasingorganization
association [1..1] to C_PurchasingGroupValueHelp as _PurchasingGroupValueHelp on _PurchasingGroupValueHelp.PurchasingGroup = $projection.purchasinggroup
association [1..1] to C_MM_CompanyCodeValueHelp as _CompanyCodeValueHelp on _CompanyCodeValueHelp.CompanyCode = $projection.companycode
association [1..1] to I_RequestForQuotationType as _RFQType on $projection.purchasingdocumenttype = _RFQType.RFQType
association [1..1] to I_PurgDocumentItemCategory as _PurgDocumentItemCategory on $projection.purgdocexternalitemcategory = _PurgDocumentItemCategory.PurchasingDocumentItemCategory
association [1..1] to I_StorageLocation as _StorageLocation on $projection.Plant = _StorageLocation.Plant
and $projection.StorageLocation = _StorageLocation.StorageLocation
// association [1..1] to I_AccountAssignmentCategory as _AccountAssignmentCategory on $projection.AccountAssignmentCategory = _AccountAssignmentCategory.AccountAssignmentCategory
association [0..1] to I_UnitOfMeasure as _OrderQuantityUnit on $projection.OrderQuantityUnit = _OrderQuantityUnit.UnitOfMeasure
association [1..1] to I_SupplierQuotation as _SupplierQuotation on _SupplierQuotation.SupplierQuotation = $projection.SupplierQuotation
{
@EndUserText.label: 'RFQ'
@Consumption.semanticObject: 'RequestForQuotation'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
key I_PurchasingDocumentItem.PurchasingDocument as RequestForQuotation,
@EndUserText.label: 'Item'
@Consumption.semanticObject: 'RequestForQuotationItem'
key cast (I_PurchasingDocumentItem.PurchasingDocumentItem as vdm_requestforquotationitem preserving type) as RequestForQuotationItem,
@EndUserText.label: 'Supplier Quotation'
@UI.lineItem.position: 110
@Consumption.semanticObject: 'SupplierQuotation'
key I_SupplierQuotationItemEnh.SupplierQuotation,
@EndUserText.label: 'Supplier Quotation Item'
@UI.lineItem.position: 120
key I_SupplierQuotationItemEnh.SupplierQuotationItem,
// key case when I_SupplierQuotationItemEnh.SupplierQuotationItem is null or I_SupplierQuotationItemEnh.SupplierQuotationItem = '00000'
// then ''
// else I_SupplierQuotationItemEnh.SupplierQuotationItem
// end as SupplierQuotationItem,
// key case when C_SuplrQuotationItemEnhWD.SupplierQuotationItem is null or C_SuplrQuotationItemEnhWD.SupplierQuotationItem = ' ' or SupplierQuotationItem = '00000'
// then ''
// else SupplierQuotationItem
// end as SupplierQuotationItem,
@EndUserText.label: 'RFQ Item'
@UI.lineItem.position: 10
concat(concat(I_PurchasingDocumentItem.PurchasingDocument, '/'), I_PurchasingDocumentItem.PurchasingDocumentItem) as FormattedRFQItem,
@UI.lineItem.position: 20
_RFQEnhancedWeb.RequestForQuotationName,
_RFQEnhancedWeb.BindingPeriodValidityEndDate,
@EndUserText.label: 'Created By'
@Semantics: {
text: true
}
_SupplierQuotationDocument._CreatedByUser.UserDescription,
//_SupplierWeb.CreatedByUser.UserDescription.
//_RFQEnhancedWeb._CreatedByUser.UserDescription,
//_RFQEnhancedWeb.FullName,
@EndUserText.quickInfo:'document date(created on)'
@Consumption.filter.selectionType: #INTERVAL
_RFQEnhancedWeb.CreationDate,
@Consumption.filter.selectionType: #INTERVAL
@EndUserText.label: 'Delivery Date'
I_SupplierQuotationItemEnh.ScheduleLineDeliveryDate,
@Consumption.filter.selectionType: #INTERVAL
_RFQEnhancedWeb.RFQPublishingDate,
@EndUserText.label: 'Purchase Requisition'
@Consumption.semanticObject: 'PurchaseRequisition'
I_PurchasingDocumentItem.PurchaseRequisition,
@EndUserText.label: 'Purchase Requisition Item'
@Consumption.semanticObject: 'PurchaseRequisitionItem'
case when I_PurchasingDocumentItem.PurchaseRequisitionItem = '00000'
then ' '
else I_PurchasingDocumentItem.PurchaseRequisitionItem
end as PurchaseRequisitionItem,
@EndUserText.label: 'Quotation Created On'
@Consumption.filter.hidden: true
_SupplierQuotation.CreationDate as SupplierCreationDate,
_SupplierQuotationDocument.QuotationSubmissionDate,
@UI.lineItem.position: 30
//@ObjectModel: { text.element: [ 'MaterialName' ] }
@Consumption.semanticObject: 'Material'
@ObjectModel.foreignKey.association: '_Material'
I_PurchasingDocumentItem.Material,
@UI.lineItem.position: 40
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
cast( _PurgDocScheduleLine.ScheduleLineOrderQuantity as vdm_requested_quantity preserving type ) as ScheduleLineOrderQuantity,
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
@EndUserText.label: 'Quotation Quantity'
ScheduleLineOrderQuantity as PlannedQuantity,
@UI.hidden: true
@EndUserText.label: 'Order Unit'
@Semantics.unitOfMeasure: true
@ObjectModel: { foreignKey.association: '_OrderQuantityUnit' }
I_PurchasingDocumentItem.OrderQuantityUnit,
@UI.lineItem.position: 50
@Semantics.amount.currencyCode: 'DocumentCurrency'
cast(I_SupplierQuotationItemEnh.NetAmount as vdm_supplier_submit_quot_value) as NetAmount,
@UI.hidden: true
I_SupplierQuotationItemEnh.DocumentCurrency,
@UI.lineItem.position: 60
@Semantics.amount.currencyCode: 'DocumentCurrency'
cast(cast(I_SupplierQuotationItemEnh.AwardedQuantity * I_SupplierQuotationItemEnh.NetPriceAmount as abap.curr( 18, 2 )) as vdm_supplier_award_quot_value) as PriceQuotation,
// @Consumption.semanticObject: 'Plant'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 1 }
@UI.lineItem.position: 70
//@ObjectModel: { text.element: [ 'PlantName' ] }
@ObjectModel.foreignKey.association: '_Plant'
I_PurchasingDocumentItem.Plant,
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 1 }
@UI.lineItem.position: 80
// @ObjectModel: { text.element: [ 'SupplierName' ] }
@Consumption.semanticObject: 'Supplier'
@ObjectModel.foreignKey.association: '_Supplier'
_SupplierQuotationDocument.Supplier,
@UI.lineItem.position: 90
_RFQEnhancedWeb._RFQLifecycleStatus._Text[1: Language = $session.system_language].RFQLifecycleStatusName,
@UI.lineItem.position: 100
@UI.lineItem.criticality: 'DueDateCriticality'
@UI.lineItem.criticalityRepresentation: #WITHOUT_ICON
@EndUserText.label: 'Quotation Deadline'
_RFQEnhancedWeb.QuotationLatestSubmissionDate,
@UI.hidden: true
case
when _RFQEnhancedWeb.QuotationLatestSubmissionDate < $session.system_date
then 1
else 0
end as DueDateCriticality,
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
AwardedQuantity,
@UI.hidden: true
_RFQEnhancedWeb.IsEndOfPurposeBlocked, //needed for DCL
@EndUserText.label: 'Requirement Tracking Number'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 1 }
I_PurchasingDocumentItem.RequirementTracking,
// @Consumption.semanticObject: 'MaterialGroup'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 1 }
//@ObjectModel: { text.element: [ 'MaterialGroupName' ] }
@ObjectModel.foreignKey.association: '_MaterialGroup'
I_PurchasingDocumentItem.MaterialGroup,
I_PurchasingDocumentItem.PurchasingDocumentItemText as PurchasingText,
// @Consumption.semanticObject: 'PurchasingOrganization'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 1 }
//@ObjectModel: { text.element: [ 'PurchasingOrganizationName' ] }
@ObjectModel.foreignKey.association: '_PurchasingOrgValueHelp'
_RFQEnhancedWeb.PurchasingOrganization,
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 1 }
//@ObjectModel: { text.element: [ 'PurchasingGroupName' ] }
@ObjectModel.foreignKey.association: '_PurchasingGroupValueHelp'
_RFQEnhancedWeb.PurchasingGroup,
@ObjectModel.foreignKey.association: '_CompanyCodeValueHelp'
_RFQEnhancedWeb.CompanyCode,
@ObjectModel.foreignKey.association: '_StorageLocation'
I_PurchasingDocumentItem.StorageLocation,
@ObjectModel: { text.element: [ 'PurgCatName' ] }
//@ObjectModel.foreignKey.association: '_PurchasingCategory'
_PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory,
@UI.hidden: true
@EndUserText: {
label: 'Purchasing Category Name'
}
_PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName,
//@ObjectModel: { text.element: [ 'PurchasingDocumentTypeName' ] }
// @EndUserText.label: 'Quotation Type'
@EndUserText.label: 'Purchasing Document Type'
@ObjectModel.foreignKey.association: '_RFQType'
_RFQEnhancedWeb.PurchasingDocumentType,
@EndUserText.label: 'Purchasing Document Category'
_RFQEnhancedWeb.PurchasingDocumentCategory,
//_RFQEnhancedWeb._PurchasingDocumentType.PurchasingDocumentCategory,
@EndUserText.label: 'Item Category'
@ObjectModel.foreignKey.association: '_PurgDocumentItemCategory'
I_PurchasingDocumentItem._PurgDocumentItemCategory._Text[1: Language = $session.system_language].PurgDocExternalItemCategory,
@EndUserText.label: 'Account Assignment Category'
//@ObjectModel: { text.element: [ 'AcctAssignmentCategoryName' ] }
// @ObjectModel.foreignKey.association: '_AccountAssignmentCategory'
// I_PurchasingDocumentItem.AccountAssignmentCategory,
cast( '' as knttp ) as AccountAssignmentCategory,
_PurchasingDocument.PurchasingDocumentOrderDate,
// _PurchasingDocumentItem.NetPriceAmount,
@EndUserText.label: 'Supplier Block Status'
cast(case when _SupplierQuotationDocument._Supplier.PurchasingIsBlocked = 'X'
then _ProcmtBlockedSupplierTxt.SupplierName
else ''
end as vdm_purblockforsupplier) as PurchasingIsBlockedForSupplier,
_Material,
_MaterialGroup,
_RFQEnhancedWeb,
// _PurchasingDocumentItem,
_PurchasingCategoryMatlGroup,
// _ProcmtBlockedSupplier,
// _PurchasingDocument,
// _SupplierQuotationDocument,
_PurgDocScheduleLine,
// _SupplierWeb,
// //_PurchasingDocItem
_PurchasingOrgValueHelp,
_PurchasingGroupValueHelp,
_CompanyCodeValueHelp,
_RFQType,
_Plant,
_Supplier,
_PurgDocumentItemCategory,
_StorageLocation,
// _AccountAssignmentCategory,
_ProcmtBlockedSupplierTxt,
//_PurchasingCategory
_OrderQuantityUnit
}
where
_RFQEnhancedWeb.RFQLifecycleStatus != '03'
and _RFQEnhancedWeb.RFQLifecycleStatus != '05'
and I_PurchasingDocumentItem.PurchasingDocumentCategory = 'R'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PROCMTBLOCKEDSUPPLIERTXT",
"I_PURCHASINGCATEGORY",
"I_PURCHASINGCATEGORYMATLGROUP",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM",
"I_PURGDOCSCHEDULELINE",
"I_PURGDOCUMENTITEMCATEGORY",
"I_PURGDOCUMENTITEMCATEGORYTEXT",
"I_REQUESTFORQUOTATIONENHANCED",
"I_RFQLIFECYCLESTATUS",
"I_RFQLIFECYCLESTATUSTEXT",
"I_SUPPLIER",
"I_SUPPLIERQUOTATION",
"I_SUPPLIERQUOTATIONITEMENH",
"I_USER"
],
"ASSOCIATED":
[
"C_MM_COMPANYCODEVALUEHELP",
"C_PURCHASINGGROUPVALUEHELP",
"C_PURCHASINGORGVALUEHELP",
"I_MATERIAL",
"I_MATERIALGROUP",
"I_PLANT",
"I_PROCMTBLOCKEDSUPPLIERTXT",
"I_PURCHASINGCATEGORYMATLGROUP",
"I_PURCHASINGDOCUMENT",
"I_PURGDOCSCHEDULELINE",
"I_PURGDOCUMENTITEMCATEGORY",
"I_REQUESTFORQUOTATIONENHANCED",
"I_REQUESTFORQUOTATIONTYPE",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_SUPPLIERQUOTATION",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/