@AccessControl.authorizationCheck: #MANDATORY
@Metadata.allowExtensions: true
@VDM: {
viewType: #CONSUMPTION
}
@ObjectModel.usageType:{ serviceQuality: #C,
sizeCategory: #XL,
dataClass: #TRANSACTIONAL }
@Search.searchable: true
@AccessControl.privilegedAssociations: ['_CreatedBy']
@EndUserText.label: 'ML Documents for Price Changes'
define root view entity C_MaterialLedgerDocument
provider contract transactional_query
as projection on P_MaterialLedgerDoc
association [0..*] to C_MatlLdgrDocToAcctgDocument as _AccountingDocument on $projection.ReferenceDocumentType = _AccountingDocument.ReferenceDocumentType
and $projection.OriginalReferenceDocument = _AccountingDocument.OriginalReferenceDocument
and $projection.PriceChangeDocument <> _AccountingDocument.AccountingDocument
and $projection.CompanyCode = _AccountingDocument.CompanyCode
and $projection.FiscalYear = _AccountingDocument.FiscalYear
{
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
key PriceChangeDocument,
@Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.9 }
key MaterialLedgerDocumentYear,
@ObjectModel: { text.element: ['MatlLedgerTransactionTypeName'] }
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
MaterialLedgerTransactionType,
@Semantics.text: true
_MatlLdgrTransactionType._Text[1: Language = $session.system_language].MatlLedgerTransactionTypeName as MatlLedgerTransactionTypeName,
@ObjectModel: { text.element: ['LedgerGroupName'] }
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
LedgerGroup,
@Semantics.text: true
_LedgerGroup._Text[1: Language = $session.system_language].LedgerGroupName as LedgerGroupName,
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
ReferenceDocumentType,
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
ReferenceDocument,
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
ReferenceDocumentContext,
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
ReferenceDocumentLogicalSystem,
IsReversalDocument,
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.95 }
cast(DocumentDate as bldat preserving type ) as DocumentDate,
cast(CreationDateTime as fml_mpchd_creationdatetime preserving type ) as CreationDateTime,
@ObjectModel.foreignKey.association: '_CreatedBy'
@ObjectModel: { text.element: ['CreatedByUserName'] }
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
CreatedByUser,
@Semantics.nullValueIndicatorFor: 'CreatedByUser'
ConditionRateValueIsNull,
@Semantics.text: true
_CreatedBy.FullName as CreatedByUserName,
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
ExecutedTransaction,
@ObjectModel: { text.element: ['BusinessTransactionTypeName'] }
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
cast(BusinessTransactionType as glvor preserving type) as BusinessTransactionType,
@Semantics.text: true
_BusinessTransactionType._Text[1: Language = $session.system_language].BusinessTransactionTypeName as BusinessTransactionTypeName,
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
LogicalSystem,
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
DocumentHeaderText,
@ObjectModel: { text.element: ['MatlPrChgAcctDetnDiffntnRsnTxt'] }
@Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
cast(MatlPrChgAcctDetnDiffntnRsn as fml_mpchd_revaluation_reason preserving type) as MatlPrChgAcctDetnDiffntnRsn,
@Semantics.text: true
_Reason._Text[1: Language = $session.system_language].MatlPrChgAcctDetnDiffntnRsnTxt as MatlPrChgAcctDetnDiffntnRsnTxt,
cast(PostingDate as fis_budat preserving type) as PostingDate,
@ObjectModel: { text.element: ['CompanyCodeName'] }
cast(CompanyCode as fis_bukrs preserving type) as CompanyCode,
@Semantics.text: true
cast(CompanyCodeName as fis_butxt preserving type) as CompanyCodeName,
cast(OriginalReferenceDocument as fac_awkey preserving type) as OriginalReferenceDocument,
cast(FiscalYear as fins_gjahr preserving type) as FiscalYear,
cast(FiscalPeriod as fins_fiscalperiod preserving type) as FiscalPeriod,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM',
text.element: ['PlantName'] }
virtual Plant : werks_d,
@ObjectModel: { virtualElement: true}
@Semantics.text: true
virtual PlantName : werks_name,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM',
text.element: ['MaterialName']}
virtual Material : matnr,
@ObjectModel: { virtualElement: true}
@Semantics.text: true
virtual MaterialName : maktx,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM',
text.element: ['LedgerName'] }
virtual Ledger : fins_ledger,
@ObjectModel: { virtualElement: true}
@Semantics.text: true
virtual LedgerName : fins_ledgername,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM',
text.element: ['LegalCurrencyRoleName'] }
virtual LegalCurrencyRole : fml_legal_curtype,
@ObjectModel: { virtualElement: true}
@Semantics.text: true
virtual LegalCurrencyRoleName : fins_legalcurrencytypename,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM',
text.element: ['AcctgValnVwSubviewCombinedName']}
virtual AcctgValnVwSubviewCombinedName : fml_umip_valuviewname,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM' }
virtual SalesDocument : vbeln,
@ObjectModel: { virtualElement: true}
@Semantics.text: true
virtual SalesDocumentItemText : arktx,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM' }
@ObjectModel.text.element: [ 'SalesDocumentItemText' ]
virtual SalesDocumentItem : posnr,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM',
text.element: ['SupplierName'] }
virtual InventorySpecialStockSupplier : lifnr,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM' }
virtual InvtryValnSpecialStockType : sobkz,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM',
text.element: ['WBSDescription'] }
virtual WBSElementExternalID : ps_posid_edit,
@ObjectModel: { virtualElement: true,
filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM' }
virtual ValuationType : fml_mpchd_valuation_type,
@Semantics.text: true
virtual SupplierName : md_supplier_name,
@Semantics.text: true
virtual WBSDescription : ps_s4_post1,
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_FML_MPCHD_VISIBILITY_CALC'
@UI.hidden: true
virtual UICT_RelatedDocumentIsHidden : abap_boolean,
/* Associations */
_AccountingDocument,
_CreatedBy,
_Item : redirected to composition child C_MaterialLedgerDocumentItem
}