@AbapCatalog.sqlViewName: 'CLGLDOCINTEGF'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@VDM.viewType: #CONSUMPTION
@EndUserText.label: 'Legal Document Integration Facet'
@ObjectModel: {
usageType.dataClass: #MIXED,
usageType.serviceQuality: #C,
usageType.sizeCategory: #XL }
@UI:{
headerInfo:{
typeName: 'Legal Document',
typeNamePlural: 'Legal Documents',
title.value: 'DocumentDescription',
description.value: 'LegalDocument'
}
}
@Search.searchable: true
@Metadata.ignorePropagatedAnnotations: true
define view C_LegalDocumentIntegFacet
as select from I_LegalTransaction as LegalTransaction
inner join I_LglCntntMIntegLinkdObj as LinkedObject on LinkedObject.LegalTransactionUUID = LegalTransaction.LegalTransactionUUID
and LinkedObject.LglCntntMLinkdObj <> ''
// Used left outer join as per the requirement that is to view the Legal Transactions that are not having the Legal Documents as well
left outer join I_LcmDocument as LegalDocument on LegalDocument.LegalTransactionUUID = LegalTransaction.LegalTransactionUUID
and LegalDocument.LglCntntMDocumentIsTopVersion = 'X'
and LegalDocument.LglCntntMDocIsToBeDeleted = ' '
association [0..*] to C_LegalTransactionDocStamp as _LegalTransactionDocStamp on $projection.LglCntntMDocumentUUID = _LegalTransactionDocStamp.LglCntntMDocumentUUID
// Added this association to check the Legal transaction' end of purpose blocked in DCL, where as Legal Document's end of purpose is exposed and handled directly
association [1..1] to I_LegalTransaction as _LegalTransaction on $projection.LegalTransactionUUID = _LegalTransaction.LegalTransactionUUID
//Extensions
association [1..1] to E_LegalTransaction as _LegalTransactionExtension on $projection.LegalTransactionUUID = _LegalTransactionExtension.LegalTransactionUUID
association [1..1] to E_LegalDocument as _LegalDocumentExtension on $projection.LglCntntMDocumentUUID = _LegalDocumentExtension.LglCntntMDocumentUUID
//Important Document
association [0..1] to C_LglCntntMDocImportantCat as _LglCntntMDocImportantCat on $projection.LglCntntMDocumentUUID = _LglCntntMDocImportantCat.LglCntntMDocumentUUID
{
@UI.hidden: true
key LegalTransactionLinkdObjUUID,
@UI.hidden: true
key LegalTransaction.LegalTransactionUUID,
@UI.hidden: true
key LegalDocument.LglCntntMDocumentUUID as LglCntntMDocumentUUID,
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
@UI: {
lineItem: [{ position: 10, importance: #HIGH, label: 'Document'}],
textArrangement: #TEXT_FIRST
}
@ObjectModel: {
readOnly: true,
text.element: 'DocumentDescription'
}
@EndUserText.label: 'Document'
@Consumption.semanticObject: 'LegalDocument'
LegalDocument.LglCntntMDocument as LegalDocument,
@UI.hidden: true
@VDM.lifecycle.status:#DEPRECATED
@VDM.lifecycle.successor: 'LegalDocumentVersion'
cast(LegalDocument.DocumentVersion as dokvr) as DocumentVersion,
@UI.hidden: true
LegalDocument.LegalDocumentVersion as LegalDocumentVersion, //new field for document version number(NUMC4)
@UI.hidden: true
@Semantics.text: true
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
LegalDocument.DocumentDescription as DocumentDescription,
@UI: {
lineItem: { position: 20, importance: #MEDIUM },
textArrangement: #TEXT_ONLY
}
@EndUserText.label: 'Governing Law'
@ObjectModel: { readOnly : true,
text.element: ['LglCntntMGovLawText']
}
@Semantics.text: true
LegalTransaction.LglCntntMGovLaw as LglCntntMGovLaw,
@UI.hidden: true
@Semantics.text: true
_LglCntntMGovLawText.LglCntntMGovLawText as LglCntntMGovLawText,
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
@Consumption.semanticObject: 'LegalTransaction'
@UI: {
lineItem: [{ position: 30, importance: #HIGH, label: 'Legal Transaction'}],
textArrangement: #TEXT_FIRST
}
@ObjectModel.text.element: [ 'LegalTransactionTitle' ]
@EndUserText.label: 'Legal Transaction'
LegalTransaction.LegalTransaction as LegalTransaction,
@UI.hidden: true
@Semantics.text: true
LegalTransaction.LegalTransactionTitle,
@UI.hidden: true
@ObjectModel.readOnly: true
LegalDocument.LglCntntMDocType as LglCntntMDocType,
@UI.hidden: true
@ObjectModel.readOnly: true
LegalDocument.LglCntntMDocumentLinkedObjKey as LglCntntMDocumentLinkedObjKey,
@UI: {
lineItem : [{ position: 40, importance: #HIGH , label: 'File Type' }]
}
@ObjectModel.readOnly: true
@Semantics.text: true
@EndUserText.label: 'File Type'
@Consumption.filter.hidden: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_FILE_TYPE_CALC_EXIT'
cast( '' as ltext ) as LglCntntMDocFileTypeVal,
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
@UI: {
lineItem : [{ position: 50, importance: #HIGH}],
textArrangement: #TEXT_ONLY
}
@ObjectModel: { readOnly: true,
text.association: '_ContentTypeText'
}
@EndUserText.label: 'Content Type'
LegalDocument.LglCntntMDocContentType as LglCntntMDocContentType,
@UI: {
lineItem : [{ position: 60, importance: #MEDIUM, label: 'Changed On' }]
}
@ObjectModel.readOnly: true
@Semantics.systemDate.lastChangedAt: true
@EndUserText.label: 'Changed On'
LegalDocument.LglCntntMChangedUTCDateTime as LglCntntMChangedUTCDateTime,
@UI: {
lineItem : [{ position: 70, importance: #HIGH}],
textArrangement: #TEXT_ONLY
}
@ObjectModel: {
readOnly: true,
text.element: ['LglCntntMDocumentStampName']
}
@EndUserText.label: 'Latest Stamp'
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_LATEST_STAMP_EXIT'
cast( '' as lcm_doc_stamp_name ) as LglCntntMDocumentStamp,
@ObjectModel.readOnly: true
@Semantics.text: true
@UI.hidden: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_LATEST_STAMP_EXIT'
cast( '' as ltext ) as LglCntntMDocumentStampName,
@UI: {
lineItem: [{ position: 80, criticality: 'LglCntntMDocStsCriticality',
criticalityRepresentation: #WITHOUT_ICON, importance: #HIGH, label: 'Status'}],
textArrangement: #TEXT_ONLY
}
@ObjectModel: {
readOnly: true,
text.association: '_DocStatusText'
}
LegalDocument.InternalDocumentStatus as InternalDocumentStatus,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_STS_CRITCALITY_EXIT'
@UI.hidden: true
0 as LglCntntMDocStsCriticality,
@UI: {
lineItem: [{ position: 90, criticality: 'LglCntntMDocAssemblyStsCritlty',
criticalityRepresentation: #WITHOUT_ICON, importance: #HIGH, label: 'Assembly Status' }],
textArrangement: #TEXT_ONLY
}
@ObjectModel: {
readOnly: true ,
text.element: ['LglCntntMDocAssemblyStatusText']
}
@feature: 'BF:LCM_CONTENTASSEMBLY'
LegalDocument.LglCntntMDocAssemblyStatus as LglCntntMDocAssemblyStatus,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_STS_CRITCALITY_EXIT'
@UI.hidden: true
0 as LglCntntMDocAssemblyStsCritlty,
@feature: 'BF:LCM_CONTENTASSEMBLY'
@ObjectModel.readOnly: true
@Semantics.text: true
@Consumption.filter.hidden: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_FETCH_VD_FIELDS'
@UI.hidden: true
cast ( '' as val_text ) as LglCntntMDocAssemblyStatusText,
@UI.textArrangement: #TEXT_ONLY
@UI.lineItem: [{ position: 100, importance: #HIGH }]
@ObjectModel.readOnly: true
@ObjectModel.text.element: ['LglCntntMDocRefreshStatusText'] // Calculated because NULL <> ''
@Semantics.text: true
@EndUserText.label: 'Content Refresh'
@feature: 'BF:LCM_CONTENTASSEMBLY'
LegalDocument.LglCntntMDocRefreshStatus,
@feature: 'BF:LCM_CONTENTASSEMBLY'
@ObjectModel.readOnly: true
@Consumption.filter.hidden: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_RFRSH_STS_TXT_EXIT'
@UI.hidden: true
cast ( '' as val_text ) as LglCntntMDocRefreshStatusText,
@UI: {
lineItem: [{ position: 110, importance: #MEDIUM, label: 'Important', exclude: true }],
textArrangement: #TEXT_ONLY
}
//Document Important feature is not shipped yet. Remove @UI.hidden: true when releasing this feature
//No other changes is required to activate this feature apart from removing @UI.hidden: true
// @UI.hidden: true
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.text.element: ['LglCntntMDocImportantTxt']
@ObjectModel.filter.transformedBy: 'CL_LCM_DOC_IS_IMPORT_CALC_EXIT'
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_IS_IMPORT_CALC_EXIT'
@ObjectModel.sort.transformedBy: 'CL_LCM_DOC_IS_IMPORT_CALC_EXIT'
@EndUserText.label: 'Important'
@Consumption: {
valueHelpDefinition : [{ entity: { name : 'C_LglCntntMDocImportantVH', element : 'LglCntntMDocImportant' } }]
}
cast( '' as lcm_doc_important ) as LglCntntMDocImportant,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'CL_LCM_DOC_IS_IMPORT_CALC_EXIT'
@UI.hidden: true
cast ( '' as val_text ) as LglCntntMDocImportantTxt,
@UI.hidden: true
LegalDocument.LglCntntMTmplUUID as LglCntntMTmplUUID,
@UI.hidden: true
LegalDocument.LglCntntMVirtualDocVersKey as LglCntntMVirtualDocVersKey,
@UI.hidden: true
LglCntntMLinkdObj as LglCntntMLinkdObj,
@UI.hidden: true
LglCntntMIntegrationLink as LglCntntMIntegrationLink,
//Fields required for Authorization
@UI.hidden: true
@ObjectModel.readOnly: true
LegalDocument.LglCntntMDocAccessLvl as LglCntntMDocAccessLvl,
@UI.hidden: true
@ObjectModel.readOnly: true
@Semantics.booleanIndicator: true
LegalDocument.IsEndOfPurposeBlocked as IsEndOfPurposeBlocked,
@UI.hidden: true
@ObjectModel.readOnly: true
LegalTransaction.LglCntntMProfile as LglCntntMProfile,
@UI.hidden: true
@ObjectModel.readOnly: true
LegalTransaction.LglTransAccessLvl as LglTransAccessLvl,
@UI.hidden: true
@ObjectModel.readOnly: true
LegalTransaction.LglCntntMMainOrgCoCode as LglCntntMMainOrgCoCode,
@UI.hidden: true
@ObjectModel.readOnly: true
LegalTransaction.LglCntntMMainOrgSalesOrg as LglCntntMMainOrgSalesOrg,
@UI.hidden: true
@ObjectModel.readOnly: true
LegalTransaction.LglCntntMMainOrgPurOrg as LglCntntMMainOrgPurOrg,
@UI.hidden: true
@ObjectModel.readOnly: true
@Consumption.filter.hidden: true
LegalDocument._ContentTypeText as _ContentTypeText,
@UI.hidden: true
@ObjectModel.readOnly: true
@Consumption.filter.hidden: true
LegalDocument._DocStatusText as _DocStatusText,
@UI.hidden: true
@ObjectModel.readOnly: true
@Consumption.filter.hidden: true
_LegalTransactionDocStamp,
@UI.hidden: true
@ObjectModel.readOnly: true
@Consumption.filter.hidden: true
_LegalTransaction,
@UI.hidden: true
@ObjectModel.readOnly: true
@Consumption.filter.hidden: true
_LglCntntMDocImportantCat
}