@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@AbapCatalog.sqlViewName: 'CPURORDITEMENH'
@EndUserText.label: 'Purchase Order Item'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #M
@ObjectModel.usageType.dataClass: #MIXED
@UI.headerInfo:{
typeName: 'Purchase Order Item',
typeNamePlural: 'Purchase Order Items',
title.value: 'PurchaseOrderItem'
//description.value: 'PurchaseOrderItemCategory'
}
@ObjectModel: {
semanticKey: ['PurchaseOrder', 'PurchaseOrderItem'],
representativeKey: 'PurchaseOrderItem'
}
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ObjectModel.text.control: #ASSOCIATED_TEXT_UI_HIDDEN
@Metadata.allowExtensions: true
define view C_PurOrdItemEnh
as select from I_PurchaseorderItemEnhanced
association [0..1] to I_MaterialGroupText as _MaterialGroupText on $projection.MaterialGroup = _MaterialGroupText.MaterialGroup
and _MaterialGroupText.Language = $session.system_language
association [0..1] to I_MaterialText as _MaterialText on $projection.Material = _MaterialText.Material
and _MaterialText.Language = $session.system_language
association [0..1] to I_ProductTypeCodeText as _ProductTypeCodeText on _ProductTypeCodeText.ProductTypeCode = $projection.ProductType
and _ProductTypeCodeText.Language = $session.system_language
association [0..1] to E_PurchasingDocumentItem as _ItemExtension on _ItemExtension.PurchasingDocument = $projection.PurchaseOrder
and _ItemExtension.PurchasingDocumentItem = $projection.PurchaseOrderItem
association [1..1] to I_PurgDocumentItemCategoryText as _PurchaseOrderItemCategoryText on _PurchaseOrderItemCategoryText.Language = $session.system_language
and _PurchaseOrderItemCategoryText.PurchasingDocumentItemCategory = PurchaseOrderItemCategory
association [0..1] to I_AcctAssignmentCategoryText as _AcctAssignmentCategoryText on _AcctAssignmentCategoryText.AccountAssignmentCategory = $projection.AccountAssignmentCategory
and _AcctAssignmentCategoryText.Language = $session.system_language
association [0..1] to C_MM_PlantValueHelp as _PlantValHelp on _PlantValHelp.Plant = $projection.Plant
and _PlantValHelp.PurchasingOrganization = $projection.PurchasingOrganization
association [1..*] to I_PurchaseOrderScheduleLine as _PurOrdScheduleLine on _PurOrdScheduleLine.PurchaseOrder = $projection.PurchaseOrder
and _PurOrdScheduleLine.PurchaseOrderItem = $projection.PurchaseOrderItem
association [1..*] to C_POScheduleLineFactSheet as _POScheduleLineFactSheet on _POScheduleLineFactSheet.PurchaseOrder = $projection.PurchaseOrder
and _POScheduleLineFactSheet.PurchaseOrderItem = $projection.PurchaseOrderItem
association [1..*] to C_POAccountAssignmentFactSheet as _POAccountAssignmentFactSheet on _POAccountAssignmentFactSheet.PurchaseOrder = $projection.PurchaseOrder
and _POAccountAssignmentFactSheet.PurchaseOrderItem = $projection.PurchaseOrderItem
----Extension Association
association [1..1] to E_PurchasingDocumentItem as _PurchaseOrderItemExtension on $projection.PurchaseOrder = _PurchaseOrderItemExtension.PurchasingDocument
and $projection.PurchaseOrderItem = _PurchaseOrderItemExtension.PurchasingDocumentItem
association [1..1] to C_PODeliveryAddressFactSheet as _PODeliveryAddressFactSheet on $projection.PurchaseOrder = _PODeliveryAddressFactSheet.PurchaseOrder
and $projection.PurchaseOrderItem = _PODeliveryAddressFactSheet.PurchaseOrderItem
association [0..1] to C_MM_TaxCodeValueHelp as _TaxCodeVH on _TaxCodeVH.TaxCode = $projection.TaxCode
and _TaxCodeVH.TaxCalculationProcedure = $projection.TaxCalculationProcedure
{
@UI.facet: [
{ label:'General Information',
id:'GeneralInformation',
isSummary: true,
type: #COLLECTION,
position: 10
},
{
label: 'Basic Data',
id: 'BasicData',
parentId: 'GeneralInformation',
type: #IDENTIFICATION_REFERENCE,
position: 10
},{
label: 'Delivery & Invoice',
id: 'DeliveryInvoiceID',
parentId: 'GeneralInformation',
type: #FIELDGROUP_REFERENCE,
position: 20,
targetQualifier: 'DeliveryInvoice'
},{
label: 'Item Details',
id: 'ItemDetailsID',
parentId: 'GeneralInformation',
type: #FIELDGROUP_REFERENCE,
position: 30,
targetQualifier: 'ItemDetails'
},
{
label: 'Account Assignment',
id: 'AccountAssignmentID',
type: #LINEITEM_REFERENCE,
position: 20,
targetElement: '_POAccountAssignmentFactSheet'
},{
label: 'Schedule Lines',
id: 'ScheduleLinesID',
type: #LINEITEM_REFERENCE,
position: 30,
targetElement: '_POScheduleLineFactSheet'
}
]
// Key
@UI.hidden: false
@ObjectModel.foreignKey.association: '_PurchaseOrderEnhanced'
@UI.identification: [{
position: 10,
importance: #HIGH }]
@Consumption.semanticObject: 'PurchaseOrder'
key PurchaseOrder,
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 10,
importance: #HIGH }, {
position: 10,
importance: #HIGH
}]
@Consumption.semanticObject: 'PurchaseOrderItem'
key cast (PurchaseOrderItem as ebelp preserving type) as PurchaseOrderItem,
// Category
@ObjectModel.text.association: '_PurchaseOrderItemCategoryText'
@UI.textArrangement: #TEXT_ONLY
PurchaseOrderItemCategory,
// Material Data
@UI.hidden: true
Material,
// Material Data
@ObjectModel.text.association: '_MaterialText'
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 50,
importance: #HIGH }, {
position: 50,
importance: #HIGH
}]
@Consumption.semanticObject: 'Material'
@UI.identification: [{
position: 20,
importance: #HIGH }]
ManufacturerMaterial,
@ObjectModel.text.association: '_MaterialGroupText'
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 40,
importance: #HIGH }, {
position: 40,
importance: #HIGH
}]
@UI.fieldGroup:[{qualifier: 'ItemDetails', position: 10}]
MaterialGroup,
@ObjectModel.foreignKey.association: '_Plant'
@ObjectModel.text.association: '_PlantValHelp'
@UI.fieldGroup:[{qualifier: 'ItemDetails', position: 30}]
Plant,
@ObjectModel.text.association: '_AcctAssignmentCategoryText'
@UI.fieldGroup:[{qualifier: 'ItemDetails', position: 40}]
cast (I_PurchaseorderItemEnhanced.AccountAssignmentCategory as knttp_ll preserving type) as AccountAssignmentCategory,
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 30,
importance: #HIGH }, {
position: 30,
importance: #HIGH
}]
@UI.identification: [{
position: 30,
importance: #HIGH }]
PurchaseOrderItemText,
@UI.identification: [{
position: 40,
importance: #HIGH }]
PurchaseRequisition,
@UI.identification: [{
position: 50,
importance: #HIGH }]
PurchaseRequisitionItem,
@ObjectModel.text.association: '_ProductTypeCodeText'
@UI.textArrangement: #TEXT_ONLY
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 20,
importance: #HIGH }, {
position: 20,
importance: #HIGH
}]
@UI.fieldGroup:[{qualifier: 'ItemDetails', position: 20}]
ProductType,
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 60,
importance: #HIGH } , {
position: 60,
importance: #HIGH }]
@Semantics.businessDate.at: true
@UI.fieldGroup:[{qualifier: 'DeliveryInvoice', position: 10}]
FirstDeliveryDate,
@Semantics.quantity.unitOfMeasure: 'PurchaseOrderQuantityUnit'
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 70,
importance: #HIGH }, {
position: 70,
importance: #HIGH }]
@UI.fieldGroup:[{qualifier: 'DeliveryInvoice', position: 20}]
OrderQuantity,
@Semantics.unitOfMeasure:true
PurchaseOrderQuantityUnit,
@Semantics.currencyCode:true
DocumentCurrency,
@Semantics.unitOfMeasure:true
PurchaseOrderPriceUnit,
@Semantics.amount.currencyCode: 'DocumentCurrency'
@DefaultAggregation: #NONE
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 80,
importance: #HIGH },{
position: 80,
importance: #HIGH }]
@UI.fieldGroup:[{qualifier: 'DeliveryInvoice', position: 30}]
NetPriceAmount,
@Semantics.unitOfMeasure:true
@UI.hidden:true
@Consumption.hidden:true
OrderPriceUnit,
@Semantics.quantity.unitOfMeasure: 'PurchaseOrderPriceUnit'
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 90,
importance: #HIGH },{
position: 90,
importance: #HIGH
}]
@UI.fieldGroup:[{qualifier: 'DeliveryInvoice', position: 40}]
PurchaseOrderNetPriceQuantity,
@Semantics.amount.currencyCode: 'DocumentCurrency'
@DefaultAggregation: #NONE
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 100,
importance: #HIGH }, {
position: 100,
importance: #HIGH }]
@UI.fieldGroup:[{qualifier: 'DeliveryInvoice', position: 50}]
NetAmount,
@UI.hidden: true
PurchasingDocumentDeletionCode,
//--[ GENERATED:012:GFBfhyK17kY4ofIXD8GUQG
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_BusinessPartnerVH',
element: 'BusinessPartner' }
}]
// ]--GENERATED
@ObjectModel.foreignKey.association: '_ServicePerformer'
@UI.lineItem: [{
qualifier: 'PurchItem',
position: 110,
importance: #HIGH }, {
position: 110,
importance: #HIGH
}]
@UI.fieldGroup:[{qualifier: 'DeliveryInvoice', position: 60}]
ServicePerformer,
@EndUserText.label: 'Start of Performance Period'
@UI.fieldGroup:[{qualifier: 'DeliveryInvoice', position: 70}]
PerformancePeriodStartDate,
@EndUserText.label: 'End of Performance Period'
@UI.fieldGroup:[{qualifier: 'DeliveryInvoice', position: 80}]
PerformancePeriodEndDate,
@UI: { lineItem: [{
qualifier: 'PurchItem',
position: 900,
importance: #HIGH} , {
position: 900,
importance: #HIGH
}]
}
@EndUserText.label: 'Status'
@UI.identification: [{
position: 15,
importance: #HIGH }]
_PurchaseOrderItemCalcFields._PurchaseOrderItemStatus._PurchasingDocumentStatus._Text[1: Language = $session.system_language].PurchasingDocumentStatusName as PurchaseOrderItemStatus,
@Consumption.hidden: true
PurchaseOrderType,
@Consumption.hidden: true
PurchasingOrganization,
@Consumption.hidden: true
PurchasingGroup,
----------------------------------------------------------------------------------------
-- FieldGroup: Delivery --
----------------------------------------------------------------------------------------
@UI.fieldGroup: [ { position: 30, qualifier: 'DeliveryGroup' } ]
cast (I_PurchaseorderItemEnhanced.OverdelivTolrtdLmtRatioInPct as uebto_ll preserving type) as OverdelivTolrtdLmtRatioInPct,
@UI.fieldGroup: [ { position: 40, qualifier: 'DeliveryGroup' } ]
cast (I_PurchaseorderItemEnhanced.UnderdelivTolrtdLmtRatioInPct as untto_ll preserving type) as UnderdelivTolrtdLmtRatioInPct,
@UI.fieldGroup: [ { position: 50, qualifier: 'DeliveryGroup' } ]
@EndUserText.label: 'Unlimited Overdelivery Allowed'
cast (I_PurchaseorderItemEnhanced.UnlimitedOverdeliveryIsAllowed as uebtk preserving type) as UnlimitedOverdeliveryIsAllowed,
@UI.fieldGroup: [ { position: 60, qualifier: 'DeliveryGroup' } ]
@EndUserText.label: 'Acceptance at Origin'
I_PurchaseorderItemEnhanced.IsToBeAcceptedAtOrigin,
@UI.fieldGroup: [ { position: 70, qualifier: 'DeliveryGroup' } ]
@Consumption.valueHelpDefinition: [{ entity: { name : 'C_MM_StorLocValueHelp', element : 'StorageLocation' }, additionalBinding: [{ element: 'Plant', localElement: 'Plant' }] }]
I_PurchaseorderItemEnhanced.StorageLocation,
@UI.fieldGroup: [ { position: 80, qualifier: 'DeliveryGroup' } ]
@Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurOrdIntrastatSrvcCodeVH', element : 'IntrastatServiceCode' }, additionalBinding: [{ element: 'Country', localElement: 'Country' }] }]
cast (I_PurchaseorderItemEnhanced.IntrastatServiceCode as mm_isvco_ll preserving type) as IntrastatServiceCode,
@UI.fieldGroup: [ { position: 90, qualifier: 'DeliveryGroup' } ]
@Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurOrdIntrastatCmmdtyCodeVH', element : 'CommodityCode' } }]
I_PurchaseorderItemEnhanced.CommodityCode,
@UI.fieldGroup: [ { position: 90, qualifier: 'DeliveryGroup' } ]
@Consumption.valueHelpDefinition: [{ entity: { name : 'I_ShippingInstructionText', element : 'ShippingInstruction' } }]
ShippingInstruction,
----------------------------------------------------------------------------------------
-- FieldGroup: Incoterms --
----------------------------------------------------------------------------------------
@UI.fieldGroup: [ { groupLabel: 'Incoterms', position: 10, qualifier: 'Incoterms1' } ]
I_PurchaseorderItemEnhanced._PurchaseOrderEnhanced.IncotermsVersion,
@UI.fieldGroup: [ { position: 20, qualifier: 'Incoterms1' } ]
@Consumption.valueHelpDefinition: [{ entity: { name : 'C_MM_IncotermValueHelp', element : 'IncotermsClassification' }}]
I_PurchaseorderItemEnhanced.IncotermsClassification,
@UI.fieldGroup: [ { position: 30, qualifier: 'Incoterms2'} ]
I_PurchaseorderItemEnhanced.IncotermsLocation1,
@UI.fieldGroup: [ { position: 40, qualifier: 'Incoterms2'} ]
I_PurchaseorderItemEnhanced.IncotermsLocation2,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_PurchasingInfoRecordStdVH',
element: 'PurchasingInfoRecord' }
}]
@UI.fieldGroup: [ { groupLabel: 'Source of Supply', position: 10, qualifier: 'SourceOfSupplyGroup' } ]
cast (I_PurchaseorderItemEnhanced.PurchasingInfoRecord as infnr_ll preserving type) as PurchasingInfoRecord,
@UI.fieldGroup: [ { position: 20, qualifier: 'SourceOfSupplyGroup' } ]
@Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurchaseContractValHelp', element : 'PurchaseContract' } }]
cast (I_PurchaseorderItemEnhanced._PurchaseContract.PurchaseContract as konnr_ll preserving type) as PurchaseContract,
@UI: {
fieldGroup: [{ groupLabel: 'SourceOfSupply', position: 10, qualifier: 'SourceOfSupplyGroup' }],
lineItem: [ {position: 50, importance: #HIGH, qualifier: 'LimitItem'} ]
}
@Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurchaseContractValHelp', element : 'PurchaseContract' } }]
I_PurchaseorderItemEnhanced.PurContractForOverallLimit,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_PurchaseContractItemStdVH',
element: 'PurchaseContractItem' },
additionalBinding: [{ localElement: 'PurchaseContract',
element: 'PurchaseContract' }]
}]
@UI.fieldGroup: [ { position: 30, qualifier: 'SourceOfSupplyGroup' } ]
cast (I_PurchaseorderItemEnhanced._PurchaseContractItem.PurchaseContractItem as ktpnr_ll preserving type) as PurchaseContractItem,
@UI.fieldGroup: [ { position: 40, qualifier: 'SourceOfSupplyGroup' } ]
@EndUserText.label: ' '
I_PurchaseorderItemEnhanced.InfoRecordIsToBeUpdated,
@Consumption.valueHelpDefinition: [{ entity: { name : 'C_MM_TaxCodeValueHelp', element : 'TaxCode' } }]
@UI.fieldGroup: [ { groupLabel: 'Tax', position: 10, qualifier: 'TaxGroup' } ]
@ObjectModel.text.association: '_TaxCodeVH'
TaxCode,
@UI.fieldGroup: [ { position: 20, qualifier: 'TaxGroup' } ]
@UI.hidden: true
I_PurchaseorderItemEnhanced.TaxJurisdiction,
@ObjectModel: { readOnly: true }
@UI.hidden: true
_Plant._OrganizationAddress._Country.TaxCalculationProcedure as TaxCalculationProcedure,
SupplierConfirmationControlKey,
PurgDocOrderAcknNumber,
IsOrderAcknRqd,
ItemIsRejectedBySupplier,
_PurchaseOrderEnhanced,
@Consumption.hidden:true
_PurchaseOrderItemCategoryText,
@Consumption.hidden:true
_MaterialGroupText,
@Consumption.hidden:true
_MaterialText,
@Consumption.hidden:true
_Plant,
@Consumption.hidden:true
_ProductTypeCodeText,
_ServicePerformer,
@Consumption.hidden:true
_AcctAssignmentCategoryText,
_PlantValHelp,
_PurOrdScheduleLine,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_POScheduleLineFactSheet,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_POAccountAssignmentFactSheet,
_PODeliveryAddressFactSheet,
_TaxCodeVH
}
where
I_PurchaseorderItemEnhanced.PurchaseOrderItemCategory != 'A'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COUNTRY",
"I_ORGANIZATIONADDRESS",
"I_PLANT",
"I_PURCHASECONTRACT",
"I_PURCHASECONTRACTITEM",
"I_PURCHASEORDERENHANCED",
"I_PURCHASEORDERITEMCALCFIELDS",
"I_PURCHASEORDERITEMENHANCED",
"I_PURCHASEORDERITEMSTATUS",
"I_PURCHASINGDOCUMENTSTATUS",
"I_PURCHASINGDOCUMENTSTATUSTEXT"
],
"ASSOCIATED":
[
"C_MM_PLANTVALUEHELP",
"C_MM_TAXCODEVALUEHELP",
"C_POACCOUNTASSIGNMENTFACTSHEET",
"C_PODELIVERYADDRESSFACTSHEET",
"C_POSCHEDULELINEFACTSHEET",
"E_PURCHASINGDOCUMENTITEM",
"I_ACCTASSIGNMENTCATEGORYTEXT",
"I_BUSINESSPARTNER",
"I_MATERIALGROUPTEXT",
"I_MATERIALTEXT",
"I_PLANT",
"I_PRODUCTTYPECODETEXT",
"I_PURCHASEORDERENHANCED",
"I_PURCHASEORDERSCHEDULELINE",
"I_PURGDOCUMENTITEMCATEGORYTEXT"
],
"BASE":
[
"I_PURCHASEORDERITEMENHANCED"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/