@AbapCatalog.sqlViewName: 'CCFINRPOHEADER'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'CFin Rpld Purchase Order'
@VDM.viewType: #CONSUMPTION
@Metadata.allowExtensions: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel: {
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #L
},
semanticKey: ['SenderLogicalSystem', 'CFinReplicatedPurchaseOrder'],
representativeKey:'CFinReplicatedPurchaseOrder'
}
@UI.headerInfo: {
typeName: 'Accounting View of Purchase Order',
title: {
value: 'CFinReplicatedPurchaseOrder'
},
description: {
value: 'PurchasingDocumentTypeName'
}
}
@Consumption.valueHelpDefault: { fetchValues: #AUTOMATICALLY_WHEN_DISPLAYED }
@UI.selectionVariant: [{
qualifier: 'PODOC',
text: 'Purchase Orders'
}]
define view C_CFinRpldPurchaseOrder
as select from I_CFinRpldPurchasingDocument
association [1..*] to C_CFinRpldPurchaseOrderItem as _CFinRpldPurchaseOrderItem on _CFinRpldPurchaseOrderItem.SenderLogicalSystem = $projection.SenderLogicalSystem
and _CFinRpldPurchaseOrderItem.CFinReplicatedPurchaseOrder = $projection.CFinReplicatedPurchaseOrder
association [1..*] to C_CFinRpldPurchaseOrderDetails as _CFinRpldPurchaseOrderDetails on _CFinRpldPurchaseOrderDetails.SenderLogicalSystem = $projection.SenderLogicalSystem
and _CFinRpldPurchaseOrderDetails.CFinReplicatedPurchaseOrder = $projection.CFinReplicatedPurchaseOrder
association [0..*] to C_CFinRpldPurOrdAcctAssgmt as _CFinRpldPurOrdAcctAssgmt on _CFinRpldPurOrdAcctAssgmt.SenderLogicalSystem = $projection.SenderLogicalSystem
and _CFinRpldPurOrdAcctAssgmt.CFinReplicatedPurchaseOrder = $projection.CFinReplicatedPurchaseOrder
association [0..1] to C_CFinPurchaseOrderTypeVH as _CFinPurchaseOrderTypeVH on _CFinPurchaseOrderTypeVH.PurchaseOrderType = $projection.PurchasingDocumentType
-------------------------------------------------------------------------------------------
-- Text Associations --
-------------------------------------------------------------------------------------------
association [0..1] to I_CountryText as _CountryText on _CountryText.Country = $projection.TaxReturnCountry
and _CountryText.Language = $session.system_language
association [1..1] to E_CFinRpldPurchasingDocument as _Extension on $projection.CFinReplicatedPurchaseOrder = _Extension.CFinRpldPurchasingDocument
and $projection.SenderLogicalSystem = _Extension.SourceSystemLogicalSystem
{
@UI.facet: [
{ id: 'HeaderInfo',
position: 10,
purpose: #HEADER,
type: #DATAPOINT_REFERENCE,
targetQualifier: 'PurchasingDocumentOrderDate' },
{ id: 'HedaderInfo2',
purpose: #HEADER,
type: #FIELDGROUP_REFERENCE,
position: 20,
targetQualifier: 'HeaderInfo2' },
{ id: 'HedaderInfo3',
purpose: #HEADER,
type: #FIELDGROUP_REFERENCE,
position: 30,
targetQualifier: 'HeaderInfo3' },
{ id: 'HedaderInfo4',
purpose: #HEADER,
type: #FIELDGROUP_REFERENCE,
position: 40,
targetQualifier: 'HeaderInfo4' },
{ id: 'HedaderInfo5',
purpose: #HEADER,
type: #FIELDGROUP_REFERENCE,
position: 50,
targetQualifier: 'HeaderInfo5' },
{ id: 'HedaderInfo6',
purpose: #HEADER,
type: #FIELDGROUP_REFERENCE,
position: 60,
targetQualifier: 'HeaderInfo6' },
{ label: 'General Information',
id: 'GeneralInfo',
purpose: #STANDARD,
type: #COLLECTION,
position: 10 },
{ id: 'BasicData',
purpose: #STANDARD,
parentId: 'GeneralInfo',
type: #IDENTIFICATION_REFERENCE,
position: 20 },
{ id: 'AdminData',
purpose: #STANDARD,
parentId: 'GeneralInfo',
type: #FIELDGROUP_REFERENCE,
position: 30,
targetQualifier: 'AdminData' },
{ label: 'Items',
id: 'POItem',
purpose: #STANDARD,
type: #LINEITEM_REFERENCE,
position: 20,
targetElement: '_CFinRpldPurchaseOrderItem' } ]
@UI: { lineItem: [ { position: 20, importance: #HIGH } ] ,
selectionField: [ { position: 10 } ],
fieldGroup: [ { qualifier: 'HeaderInfo2', position: 10 } ],
textArrangement: #TEXT_LAST }
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_LogicalSystem', element: 'LogicalSystem' } } ]
@EndUserText: { label: 'Logical System (Source)',
quickInfo: '' }
@ObjectModel.text.element: 'LogicalSystemName'
key SenderLogicalSystem,
@UI: { lineItem: [ { position: 10, importance: #HIGH } ],
selectionField: [ { position: 20 } ] }
@EndUserText: { label: 'Purchase Order',
quickInfo: 'Purchase Order Number' }
key cast( CFinRpldPurchasingDocument as fins_cfin_av_rpld_purord preserving type ) as CFinReplicatedPurchaseOrder,
@UI: { lineItem: [ { position: 30, importance: #HIGH } ],
selectionField: [ { position: 30 } ] ,
dataPoint: { targetValueElement: 'PurchasingDocumentOrderDate' },
fieldGroup: [{ qualifier: 'HeaderInfo', position: 10 } ] }
@Consumption.filter : { selectionType : #INTERVAL, multipleSelections : false }
@EndUserText: { label: 'Purchase Order Date',
quickInfo: '' }
PurchasingDocumentOrderDate,
@UI: { lineItem: [ { position: 40, importance: #HIGH } ],
selectionField: [ { position: 40 } ],
textArrangement: #TEXT_LAST }
@Consumption.valueHelpDefinition:
[{ entity: { name: 'C_CFinPurchaseOrderTypeVH',
element: 'PurchaseOrderType' } }]
@EndUserText: { label: 'Purchase Order Type',
quickInfo: '' }
@ObjectModel: { foreignKey.association: '_CFinPurchaseOrderTypeVH',
text.element: 'PurchasingDocumentTypeName' }
PurchasingDocumentType,
@UI: { lineItem: [ { position: 70, importance: #HIGH } ],
selectionField: [ { position: 50 } ],
fieldGroup: [{ qualifier: 'HeaderInfo5', position: 20 }] }
@Consumption.filter : { selectionType : #INTERVAL, multipleSelections : false }
CreationDate,
@UI: { lineItem: [ { position: 80, importance: #HIGH } ],
selectionField: [ { position: 60 } ],
fieldGroup: [{ qualifier: 'HeaderInfo6', position: 10 }] }
CreatedByUser,
@UI: { lineItem: [ { position: 50, importance: #HIGH } ],
fieldGroup: [ { qualifier: 'HeaderInfo2', position: 30 } ],
textArrangement: #TEXT_LAST }
@Consumption.valueHelpDefinition:
[{ entity: { name: 'I_CompanyCode',
element: 'CompanyCode' } }]
@Consumption.semanticObject: 'CompanyCode'
@ObjectModel.text: { control: #ASSOCIATED_TEXT_UI_HIDDEN,
association: '_CompanyCode' }
CompanyCode,
@UI.fieldGroup: [{ qualifier: 'HeaderInfo3', position: 10 }]
@EndUserText: { label: 'Validity Start',
quickInfo: 'Start of Validity Period' }
ValidityStartDate,
@UI.fieldGroup: [{ qualifier: 'HeaderInfo3', position: 20 }]
@EndUserText: { label: 'Validity End',
quickInfo: 'End of Validity Period' }
ValidityEndDate,
@UI.fieldGroup: [{ qualifier: 'HeaderInfo4', position: 10 }]
@EndUserText.label: 'Purchase Order Version Number'
PurchasingDocumentVersion,
@UI.fieldGroup: [{ qualifier: 'HeaderInfo4', position: 20 }]
@EndUserText.label: 'Business Purpose Completed'
IsEndOfPurposeBlocked,
@UI.fieldGroup: [{ qualifier: 'HeaderInfo5', position: 10 }]
@EndUserText.label: 'Subject to Release'
ReleaseIsNotCompleted,
@UI: { identification: [{ position: 10 }],
textArrangement: #TEXT_LAST }
@Consumption: { valueHelpDefinition: [
{ entity: { name: 'I_PurchasingOrganization', element: 'PurchasingOrganization' } } ],
semanticObject: 'PurchasingOrganization' }
@EndUserText.label: 'Purchasing Organization'
@ObjectModel.text: { control: #ASSOCIATED_TEXT_UI_HIDDEN,
association: '_PurchasingOrganization' }
PurchasingOrganization,
@UI: { identification: [{ position: 20 }],
textArrangement: #TEXT_LAST }
@ObjectModel.text: { control: #ASSOCIATED_TEXT_UI_HIDDEN,
association: '_PurchasingGroup' }
PurchasingGroup,
@UI.identification: [{ position: 30 }]
DocumentCurrency,
@UI.identification: [{ position: 40 }]
ExchangeRate,
@UI: { identification: [{ position: 50 }],
textArrangement: #TEXT_LAST }
@EndUserText.label: 'Reporting Country/Region'
@ObjectModel.text: { control: #ASSOCIATED_TEXT_UI_HIDDEN,
association: '_CountryText' }
TaxReturnCountry,
@UI: { identification: [{ position: 60 }],
textArrangement: #TEXT_LAST }
@ObjectModel.text: { control: #ASSOCIATED_TEXT_UI_HIDDEN,
association: '_SupplyingPlant' }
SupplyingPlant,
@UI: { lineItem: [ { position: 60, importance: #HIGH } ],
fieldGroup: [ { qualifier:'AdminData', position: 10, importance: #HIGH } ],
textArrangement: #TEXT_LAST }
@Consumption.semanticObject: 'Supplier'
@ObjectModel.text: { control: #ASSOCIATED_TEXT_UI_HIDDEN,
association: '_Supplier' }
Supplier,
@UI: { fieldGroup: [ { qualifier:'AdminData', position: 20, importance: #HIGH } ],
textArrangement: #TEXT_LAST }
@ObjectModel.text: { control: #ASSOCIATED_TEXT_UI_HIDDEN,
association: '_InvoicingParty' }
InvoicingParty,
@UI: { fieldGroup: [ { qualifier:'AdminData', position: 30, importance: #HIGH } ],
textArrangement: #TEXT_LAST }
@EndUserText.label: 'Purchase Order Not Complete'
PurchasingCompletenessStatus,
@UI.fieldGroup: [ { qualifier:'AdminData', position: 40, importance: #HIGH } ]
@EndUserText.label: 'Deletion Indicator'
PurchasingDocumentDeletionCode,
@UI.fieldGroup: [ { qualifier:'AdminData', position: 50, importance: #HIGH } ]
@EndUserText.label: 'Purchase Order Aged'
PurchasingDocumentIsAged,
@UI.hidden: true
@Consumption.filter.hidden: true
_PurchasingDocumentType._Text[1: Language = $session.system_language].PurchasingDocumentTypeName as PurchasingDocumentTypeName,
@UI.hidden: true
@Consumption.filter.hidden: true
_LogicalSystem._Text[1: Language = $session.system_language].LogicalSystemName as LogicalSystemName,
/* Associations */
_CFinRpldPurchaseOrderItem,
_CFinRpldPurchaseOrderDetails,
_CFinRpldPurOrdAcctAssgmt,
_CFinPurchaseOrderTypeVH,
_CompanyCode,
_PurchasingGroup,
_DocumentCurrency,
_Supplier,
_PurchasingOrganization,
_InvoicingParty,
_CountryText,
_SupplyingPlant,
_LogicalSystem
}
where
PurchasingDocumentCategory = 'F'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CFINRPLDPURCHASINGDOCUMENT",
"I_LOGICALSYSTEM",
"I_LOGICALSYSTEMTEXT",
"I_PURCHASINGDOCUMENTTYPE",
"I_PURCHASINGDOCUMENTTYPETEXT"
],
"ASSOCIATED":
[
"C_CFINPURCHASEORDERTYPEVH",
"C_CFINRPLDPURCHASEORDERDETAILS",
"C_CFINRPLDPURCHASEORDERITEM",
"C_CFINRPLDPURORDACCTASSGMT",
"E_CFINRPLDPURCHASINGDOCUMENT",
"I_COMPANYCODE",
"I_COUNTRYTEXT",
"I_CURRENCY",
"I_LOGICALSYSTEM",
"I_PLANT",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_SUPPLIER"
],
"BASE":
[
"I_CFINRPLDPURCHASINGDOCUMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/