@AbapCatalog: { sqlViewName: 'IWLFSMDOCITSPGEL',
compiler.compareFilter: true,
preserveKey: true
}
@EndUserText: {
label: 'Settlmt Mgmt Doc Itm Suplr Prcg Element'
}
@VDM: {
viewType: #BASIC ,
lifecycle.contract.type: #SAP_INTERNAL_API
}
@ClientHandling: {
type: #INHERITED,
algorithm: #SESSION_VARIABLE
}
@AccessControl: {
authorizationCheck: #MANDATORY,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
@Analytics: {
internalName: #LOCAL
}
@ObjectModel: {
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #B,
sizeCategory: #XXL
}
}
@Metadata: {
ignorePropagatedAnnotations: true
}
/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ] } */
define view I_SetlMgmtDocItmSuplrPrcgElmnt
as select from I_PricingElement as PricingElement
inner join I_SettlmtMgmtDoc as SetlMgmtDoc on PricingElement.PricingDocument = SetlMgmtDoc.SupplierPricingDocument
and PricingElement.PricingDocumentItem != '000000'
association [1..1] to I_SettlmtMgmtDoc as _SettlmtMgmtDoc on $projection.SettlmtMgmtDoc = _SettlmtMgmtDoc.SettlmtMgmtDoc
association [1..1] to I_SettlmtMgmtDocItem as _SettlmtMgmtDocItem on $projection.SettlmtMgmtDoc = _SettlmtMgmtDocItem.SettlmtMgmtDoc
and $projection.SettlmtMgmtDocItem = _SettlmtMgmtDocItem.SettlmtMgmtDocItem
{
@ObjectModel.foreignKey.association: '_SettlmtMgmtDoc'
@Consumption: {
valueHelpDefinition: [{ entity: { name: 'I_SettlmtMgmtDocStdVH', element: 'SettlmtMgmtDoc' } }]
}
key SetlMgmtDoc.SettlmtMgmtDoc,
@ObjectModel.foreignKey.association: '_SettlmtMgmtDocItem'
@Consumption: {
valueHelpDefinition: [{ entity: { name: 'I_SettlmtMgmtDocItemStdVH', element: 'SettlmtMgmtDocItem' } }]
}
key cast( PricingElement.PricingDocumentItem as wposnr_lf preserving type) as SettlmtMgmtDocItem,
key PricingElement.PricingProcedureStep,
key cast( PricingElement.PricingProcedureCounter as wlf_vfprc_cond_count preserving type ) as PricingProcedureCounter, // decision from pricing colleagues: keep wrong name, do not rename to PricingElementCounter
@ObjectModel.foreignKey.association: '_ConditionApplication'
PricingElement.ConditionApplication,
@ObjectModel.foreignKey.association: '_PricingConditionType'
PricingElement.ConditionType,
@VDM.lifecycle:{ status: #DEPRECATED, successor: 'PriceConditionDeterminationDte'}
PricingElement.PricingDateTime,
PricingElement.PriceConditionDeterminationDte,
@ObjectModel.foreignKey.association: '_ConditionCalculationType'
PricingElement.ConditionCalculationType,
@VDM.lifecycle:{ status: #DEPRECATED, successor: 'ConditionBaseAmount'}
PricingElement.ConditionBaseValue,
@VDM.lifecycle:{ status: #DEPRECATED, successor: 'ConditionRateAmount'}
PricingElement.ConditionRateValue,
@ObjectModel.foreignKey.association: '_ConditionCurrency'
PricingElement.ConditionCurrency,
// @DefaultAggregation:#NONE
@Semantics.quantity.unitOfMeasure: 'ConditionQuantityUnit'
case when PricingElement.ConditionQuantityUnit is initial
then 0
else PricingElement.ConditionQuantity
end as ConditionQuantity, //avoid conversion error in OData
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_ConditionQuantityUnit'
PricingElement.ConditionQuantityUnit,
@ObjectModel.foreignKey.association: '_ConditionCategory'
PricingElement.ConditionCategory,
PricingElement.ConditionIsForStatistics,
PricingElement.PricingScaleType,
PricingElement.IsRelevantForAccrual,
@Semantics.booleanIndicator: true
PricingElement.CndnIsRelevantForInvoiceList,
@ObjectModel.foreignKey.association: '_ConditionOrigin'
PricingElement.ConditionOrigin,
@Semantics.booleanIndicator: true
PricingElement.IsGroupCondition,
PricingElement.ConditionRecord,
PricingElement.ConditionSequentialNumber,
PricingElement.TaxCode,
PricingElement.WithholdingTaxCode,
// @DefaultAggregation:#NONE
@Semantics.amount.currencyCode: 'TransactionCurrency'
PricingElement.CndnRoundingOffDiffAmount,
// @DefaultAggregation:#NONE
@Semantics.amount.currencyCode: 'TransactionCurrency'
PricingElement.ConditionAmount,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_Currency'
PricingElement.TransactionCurrency,
@ObjectModel.foreignKey.association: '_ConditionControl'
PricingElement.ConditionControl,
@ObjectModel.foreignKey.association: '_ConditionInactiveReason'
PricingElement.ConditionInactiveReason,
@ObjectModel.foreignKey.association: '_ConditionClass'
PricingElement.ConditionClass,
cast( PricingElement.PrcgProcedureCounterForHeader as wlf_vfprc_cond_count_head preserving type ) as PrcgProcedureCounterForHeader,
cast( PricingElement.FactorForConditionBasisValue as wlf_kfaktor preserving type ) as FactorForConditionBasisValue,
@ObjectModel.foreignKey.association: '_StructureCondition'
PricingElement.StructureCondition,
cast( PricingElement.PeriodFactorForCndnBasisValue as wlf_kfaktor1 preserving type ) as PeriodFactorForCndnBasisValue,
@ObjectModel.foreignKey.association: '_PricingScaleBasis'
PricingElement.PricingScaleBasis,
@VDM.lifecycle:{ status: #DEPRECATED, successor: 'ConditionScaleBaseAmount'}
PricingElement.ConditionScaleBasisValue,
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_ScaleUnitOfMeasure'
PricingElement.ConditionScaleBasisUnit,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_ScaleCurrency'
PricingElement.ConditionScaleBasisCurrency,
PricingElement.CndnIsRelevantForIntcoBilling,
PricingElement.ConditionIsManuallyChanged,
PricingElement.ConditionIsForConfiguration,
PricingElement.VariantCondition,
SetlMgmtDoc.SettlmtMgmtDocCat,
SetlMgmtDoc.SettlmtPartnerCat,
SetlMgmtDoc.SettlmtBusProcCat,
@Semantics.amount.currencyCode: 'ConditionCurrency'
@OData.v2.amount.noDecimalShift: true
PricingElement.ConditionRateAmount,
@Semantics.amount.currencyCode: 'TransactionCurrency'
@OData.v2.amount.noDecimalShift: true
PricingElement.ConditionBaseAmount,
@Semantics.quantity.unitOfMeasure: 'ConditionQuantityUnit'
case when PricingElement.ConditionQuantityUnit is initial
then 0
else PricingElement.ConditionBaseQuantity
end as ConditionBaseQuantity, //avoid conversion error in OData
@Semantics.quantity.unitOfMeasure: 'ConditionRateRatioUnit'
PricingElement.ConditionRateRatio,
@Semantics.unitOfMeasure: true
PricingElement.ConditionRateRatioUnit,
@Semantics.amount.currencyCode: 'ConditionScaleBasisCurrency'
@OData.v2.amount.noDecimalShift: true
PricingElement.ConditionScaleBaseAmount,
@Semantics.quantity.unitOfMeasure: 'ConditionScaleBasisUnit'
PricingElement.ConditionScaleBaseQuantity,
//Association
@ObjectModel.association.type: [#TO_COMPOSITION_ROOT]
_SettlmtMgmtDoc,
@ObjectModel.association.type: [#TO_COMPOSITION_PARENT]
_SettlmtMgmtDocItem,
PricingElement._ConditionApplication,
PricingElement._PricingConditionType,
PricingElement._ConditionCalculationType,
PricingElement._ConditionCurrency,
PricingElement._Currency,
PricingElement._ConditionQuantityUnit,
PricingElement._ConditionCategory,
PricingElement._ConditionOrigin,
PricingElement._ConditionControl,
PricingElement._ConditionInactiveReason,
PricingElement._ConditionClass,
PricingElement._PricingScaleBasis,
PricingElement._ScaleUnitOfMeasure,
PricingElement._ScaleCurrency,
PricingElement._VariantCondition,
PricingElement._StructureCondition
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PRICINGELEMENT",
"I_SETTLMTMGMTDOC"
],
"ASSOCIATED":
[
"I_CONDITIONAPPLICATION",
"I_CONDITIONCALCULATIONTYPE",
"I_CONDITIONCATEGORY",
"I_CONDITIONCLASS",
"I_CONDITIONCONTROL",
"I_CONDITIONINACTIVEREASON",
"I_CONDITIONORIGIN",
"I_CURRENCY",
"I_PRICINGCONDITIONTYPE",
"I_PRICINGSCALEBASIS",
"I_SETTLMTMGMTDOC",
"I_SETTLMTMGMTDOCITEM",
"I_STRUCTURECONDITION",
"I_UNITOFMEASURE",
"I_VARIANTCONDITION"
],
"BASE":
[
"I_PRICINGELEMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/