@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations: ['_DeliveryAddress']
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@EndUserText.label: 'Purchase Order Item Transactional View'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #MASTER}
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@VDM.viewType: #TRANSACTIONAL
define view entity R_PurchaseOrderItemTP
as select from R_PurchaseOrderItem
association to parent R_PurchaseOrderTP as _PurchaseOrder on $projection.PurchaseOrder = _PurchaseOrder.PurchaseOrder
composition [1..1] of R_PurOrdItemDeliveryAddressTP as _DeliveryAddress
composition [1..*] of R_PurchaseOrderInvoicingPlanTP as _PurchaseOrderInvoicingPlan
composition [1..*] of R_PurchaseOrderItemNoteTP as _PurchaseOrderItemNote
composition [1..*] of R_PurOrdAccountAssignmentTP as _PurOrdAccountAssignment
composition [1..*] of R_PurOrderItemPricingElementTP as _PurOrdPricingElement
composition [1..*] of R_PurchaseOrderScheduleLineTP as _PurchaseOrderScheduleLineTP
----Extension Association
association [1..1] to E_PurchasingDocumentItem as _PurchaseOrderItemExtension on $projection.PurchaseOrder = _PurchaseOrderItemExtension.PurchasingDocument
and $projection.PurchaseOrderItem = _PurchaseOrderItemExtension.PurchasingDocumentItem
// Additional Fields: Batch and Free of Charge
association [1..1] to P_PurchaseOrderItemAddFields as _PurchaseOrderItemAddFields on $projection.PurchaseOrder = _PurchaseOrderItemAddFields.PurchaseOrder
and $projection.PurchaseOrderItem = _PurchaseOrderItemAddFields.PurchaseOrderItem
{
//Key
key PurchaseOrder,
key PurchaseOrderItem,
// PurchaseOrderItemUniqueID,
PurchaseOrderCategory,
DocumentCurrency,
PurchasingDocumentDeletionCode,
//Product
MaterialGroup,
Material,
MaterialType,
SupplierMaterialNumber,
SupplierSubrange,
ManufacturerPartNmbr,
Manufacturer,
ManufacturerMaterial,
PurchaseOrderItemText,
ProductType as ProductTypeCode,
CompanyCode,
Plant,
ManualDeliveryAddressID,
ReferenceDeliveryAddressID,
Customer,
Subcontractor,
SupplierIsSubcontractor,
CrossPlantConfigurableProduct,
ArticleCategory,
PlndOrderReplnmtElmntType,
ProductPurchasePointsQtyUnit,
@Semantics.quantity.unitOfMeasure: 'ProductPurchasePointsQtyUnit'
// @DefaultAggregation: #NONE
ProductPurchasePointsQty,
StorageLocation,
PurchaseOrderQuantityUnit,
OrderItemQtyToBaseQtyNmrtr,
OrderItemQtyToBaseQtyDnmntr,
@Semantics.quantity.unitOfMeasure: 'OrderPriceUnit'
// @DefaultAggregation: #NONE
NetPriceQuantity,
IsCompletelyDelivered,
IsFinallyInvoiced,
GoodsReceiptIsExpected,
InvoiceIsExpected,
IsOrderAcknRqd,
InvoiceIsGoodsReceiptBased,
PurchaseContract,
PurchaseContractItem,
PurchaseRequisition,
PurchaseRequisitionItem,
RequirementTracking,
// RequestForQuotation,
// RequestForQuotationItem,
SupplierQuotation,
SupplierQuotationItem,
EvaldRcptSettlmtIsAllowed,
UnlimitedOverdeliveryIsAllowed,
OverdelivTolrtdLmtRatioInPct,
UnderdelivTolrtdLmtRatioInPct,
RequisitionerName,
PlannedDeliveryDurationInDays,
GoodsReceiptDurationInDays,
PartialDeliveryIsAllowed,
ConsumptionPosting,
ServicePerformer,
ServicePackage,
BaseUnit,
PurchaseOrderItemCategory,
ProfitCenter,
OrderPriceUnit,
ItemVolumeUnit,
ItemWeightUnit,
MultipleAcctAssgmtDistribution,
PartialInvoiceDistribution,
PricingDateControl,
IsStatisticalItem,
PurchasingParentItem,
GoodsReceiptLatestCreationDate,
IsReturnsItem,
PurchasingOrderReason,
IncotermsClassification,
IncotermsTransferLocation,
IncotermsLocation1,
IncotermsLocation2,
PriorSupplier,
InvoicingPlan,
InternationalArticleNumber,
IntrastatServiceCode,
CommodityCode,
MaterialFreightGroup,
DiscountInKindEligibility,
PurgItemIsBlockedForDelivery,
//ConfirmationControl,
SupplierConfirmationControlKey,
PurgDocOrderAcknNumber,
PriceIsToBePrinted,
AccountAssignmentCategory,
PurchasingInfoRecord,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
NetAmount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
GrossAmount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
EffectiveAmount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
Subtotal1Amount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
Subtotal2Amount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
Subtotal3Amount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
Subtotal4Amount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
Subtotal5Amount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
Subtotal6Amount,
// TargetQuantity,
@Semantics.quantity.unitOfMeasure: 'PurchaseOrderQuantityUnit'
// @DefaultAggregation: #NONE
OrderQuantity,
@Semantics.amount.currencyCode: 'DocumentCurrency'
// @DefaultAggregation: #NONE
NetPriceAmount,
// OutlineAgreementTargetAmount,
@Semantics.quantity.unitOfMeasure: 'ItemVolumeUnit'
// @DefaultAggregation: #NONE
ItemVolume,
@Semantics.quantity.unitOfMeasure: 'ItemWeightUnit'
// @DefaultAggregation: #NONE
@Consumption.hidden: true
ItemGrossWeight,
@Semantics.quantity.unitOfMeasure: 'ItemWeightUnit'
ItemNetWeight,
OrderPriceUnitToOrderUnitNmrtr,
OrdPriceUnitToOrderUnitDnmntr,
GoodsReceiptIsNonValuated,
TaxCode,
TaxJurisdiction,
// TaxCodeValidFromDate,
TaxCountry,
TaxDeterminationDate,
ShippingInstruction,
@Semantics.amount.currencyCode: 'DocumentCurrency'
NonDeductibleInputTaxAmount,
StockType,
ValuationType,
ValuationCategory,
ItemIsRejectedBySupplier,
PurgDocPriceDate,
PurchasingInfoRecordUpdateCode,
// @Semantics.quantity.unitOfMeasure: 'PurchaseOrderQuantityUnit'
// PurgDocReleaseOrderQuantity,
InventorySpecialStockType,
DeliveryDocumentType,
IssuingStorageLocation,
AllocationTable,
AllocationTableItem,
RetailPromotion,
// Additional Fields for hierarchy implementation
PurgConfigurableItemNumber,
PurgDocAggrgdSubitemCategory,
PurgDocSubitemCategory,
PurgExternalSortNumber,
//PurgExternalHierarchyCategory,
// Additional Fields add with CFD
_PurchaseOrderItemAddFields.Batch,
_PurchaseOrderItemAddFields.PurchasingItemIsFreeOfCharge,
// Down Payment
DownPaymentType,
DownPaymentPercentageOfTotAmt,
@Semantics.amount.currencyCode: 'DocumentCurrency'
DownPaymentAmount,
DownPaymentDueDate,
// S/4 Limit
@Semantics.amount.currencyCode: 'DocumentCurrency'
ExpectedOverallLimitAmount,
@Semantics.amount.currencyCode: 'DocumentCurrency'
OverallLimitAmount,
PurContractForOverallLimit,
// fields from product compliance
PurgProdCmplncSupplierStatus,
PurgProductMarketabilityStatus,
PurgSafetyDataSheetStatus,
PurgProdCmplncDngrsGoodsStatus,
RequirementSegment,
// Public Sector account assignment fields
Fund,
BudgetPeriod,
FundsCenter,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'CommitmentItemShortID'
CommitmentItem,
CommitmentItemShortID,
FunctionalArea,
GrantID,
EarmarkedFundsDocument,
EarmarkedFundsDocumentItem,
//EarmarkedFunds,
// EarmarkedFundsItem,
CostCenter,
GLAccount,
cast( WBSElementInternalID as ps_s4_pspnr preserving type ) as WBSElementInternalID,
// Brazil Extension
BR_MaterialOrigin,
BR_MaterialUsage,
BR_CFOPCategory,
BR_NCM,
ConsumptionTaxCtrlCode,
BR_IsProducedInHouse,
// Additional Fields from Fashion Management
//X_RFM_I_PurchaseOrderItem
// Seasons
ProductSeasonYear,
ProductSeason,
ProductCollection,
ProductTheme,
SeasonCompletenessStatus,
// CommittedQuantity,
// PSST
ShippingGroupRule,
ShippingGroupNumber,
// Characteristics
ProductCharacteristic1,
ProductCharacteristic2,
ProductCharacteristic3,
// PODiversion
DiversionStatus,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'RefDocNmbrForTrcblyInPO'
ReferenceDocumentNumber,
RefDocNmbrForTrcblyInPO,
ReferenceDocumentItem,
PurchaseOrderReferenceType,
//ReferenceDocumentScheduleLine,
@Semantics.booleanIndicator: true
ItemHasValueAddedService,
ValAddedSrvcParentItmNumber,
// X_RFM_I_PurchaseOrderItemSeg
// Segmentation
StockSegment,
/* Compositions */
_PurchaseOrderItemNote,
_PurOrdAccountAssignment,
_PurOrdPricingElement,
_PurchaseOrderScheduleLineTP,
/* Associations */
_PurchaseOrder,
_PurchaseOrderHistory,
_DocumentCurrency,
_PurchaseOrderItemCalcFields,
_CompanyCode,
_Plant,
_StorageLocation,
_Material,
_ManufacturerMaterial,
_MaterialGroup,
_OrderPriceUnit,
_ReferenceDeliveryAddress,
_PurgDocumentCategory,
_PurgDocumentItemCategory,
_IncotermsClassification,
_PriorSupplier,
_ConsumptionPosting,
//I_PurchasingDocumentItem._ScheduleLine,
_PurchaseRequisitionItem,
_PurchasingInfoRecord,
//I_PurchasingDocumentItem._Manufacturer,
_Customer,
_Subcontractor,
_ConfigurableProduct,
_PurchaseRequisition,
_PurchaseContract,
_PurchaseContractItem,
_ServicePerformer,
_OrderQuantityUnit,
_ProductType,
_AllocationTable,
_AllocationTableItem,
_RetailPromotion,
_DeliveryAddress,
_PurchaseOrderInvoicingPlan,
//Associations for Brazilian specific fields
_BR_MaterialOrigin,
_BR_MaterialUsage,
_BR_CFOPCategory,
_BR_NCM
//TODO:
// The new fields that do not exist in R_PurchasingDocumentItem
// and should be added to R_PurchasingDocumentItem,
// R_PurchaseOrderItem and R_PurchaseOrderItemTP
// Names for some of these fields already proposed in A_PurchaseOrderItem
// and left there as commented out.
// Fields that were not proposed before in A_PurchaseOrderItem
// are marked with '*'
//List of new fields:
//MaterialExternal, * //BAPIMEPOITEM-MATERIAL_EXTERNAL (mara.matnr_external)
//MaterialGuid, * //BAPIMEPOITEM-MATERIAL_GUID
//MaterialVersion, * //BAPIMEPOITEM-MATERIAL_VERSION
//ManufacturerMaterialExternal, * //BAPIMEPOITEM-EMATERIAL_EXTERNAL (mara.matnr_external)
//ManufacturerMaterialGuid, * //BAPIMEPOITEM-EMATERIAL_GUID
//ManufacturerMaterialVersion, * //BAPIMEPOITEM-EMATERIAL_VERSION
//ConditionGroup *, or MaterialConditionGroup ? //BAPIMEPOITEM-COND_GROUP (ekpo.ekkol)
//NoCashDiscount *, or IsCashDiscountGranted ? //BAPIMEPOITEM-NO_DISCT (ekpo.sktof)
//IsFreeItem, //BAPIMEPOITEM-FREE_ITEM/MEPOITEM-UMSON,Add to underlying views
//Batch, //BAPIMEPOITEM-BATCH/MEPOITEM-CHARG
//SupplierBatch, * //BAPIMEPOITEM-VENDRBATCH/MEPOITEM-LICHA
//PricingType, * //BAPIMEPOITEM-CALCTYPE/MEPOITEM-CALCTYPE
//IsRelevantToAllocationTable, * //BAPIMEPOITEM-AT_RELEV (ekpo.aurel)
//RevisionLevel, * //BAPIMEPOITEM-REV_LEV (ekpo.revlv)
//SettlementGroup1, * //BAPIMEPOITEM-BON_GRP1 (ekpo.bonus)
//PurgRebateSettlementGrp2 //BAPIMEPOITEM-BON_GRP2 (ekpo.ebon2)
//PurgRebateSettlementGrp3 //BAPIMEPOITEM-BON_GRP3 (ekpo.ebon3)
//IsItemForSubsequentSettlement, //BAPIMEPOITEM-SETT_ITEM (ekpo.ebonf)
//InternalObjectNumber, * //BAPIMEPOITEM-INT_OBJ_NO (ekpo.cuobj) //Add to underlying views
//SrvBasedInvoiceVerification, * //BAPIMEPOITEM-SRV_BASED_IV (ekpo-lebre) //Add to underlying views
//NoRounding, * //BAPIMEPOITEM-NO_ROUNDING
//PriceAdoption, * //BAPIMEPOITEM-PO_PRICE
//InflationIndex, * //BAPIMEPOITEM-INF_INDEX (ekpo.j_1andxp)
//InflationIndexDate, * //BAPIMEPOITEM-UNTIL_DATE (ekpo.j_1aidatep)
//SourceStockType, * //BAPIMEPOITEM-SRC_STOCK_TYPE (ekpo.spe_insmk_src)
//RejectionReasonQuotAndSalesOrd, //BAPIMEPOITEM-REASON_REJ (ekpo.spe_abgru)
//CRMSalesOrder, * //BAPIMEPOITEM-CRM_SALES_ORDER_NO (ekpo.spe_crm_so)
//CRMSalesOrderItem, * //BAPIMEPOITEM-CRM_SALES_ORDER_ITEM_NO (ekpo.spe_crm_so_item)
//RequirementUrgency, //BAPIMEPOITEM-PRIO_URGENCY (ekpo.prio_urg)
//OverallMaterialReqnsPriority, //BAPIMEPOITEM-PRIO_REQUIREMENT (ekpo.prio_req)
//GoodsReceiptReasonCode, * //BAPIMEPOITEM-REASON_CODE (ekpo.reason_code)
//FundLong, //BAPIMEPOITEM-FUND_LONG Long Fund (Obsolete) not need in CDS?
//ItemNumberLength, //BAPIMEPOITEM-LONG_ITEM_NUMBER (ekpo.exlin)
//ExternalSorting, //BAPIMEPOITEM-EXTERNAL_SORT_NUMBER (ekpo.exsnr)
//ExternalHierarchyCategory, //BAPIMEPOITEM-EXTERNAL_HIERARCHY_TYPE (ekpo.ehtyp)
//RetentionInPercent, * //BAPIMEPOITEM-RETENTION_PERCENTAGE (ekpo.retpc)
//ExternalDocument, //BAPIMEPOITEM-EXT_RFX_NUMBER (ekpo.ext_rfx_number)
//ExternalDocumentItem, //BAPIMEPOITEM-EXT_RFX_ITEM (ekpo.ext_rfx_item)
//LogicalSystem, //BAPIMEPOITEM-EXT_RFX_SYSTEM (ekpo.ext_rfx_system)
//CentralContract, * //BAPIMEPOITEM-SRM_CONTRACT_ID (ekpo.srm_contract_id)
//CentralContractItem, * //BAPIMEPOITEM-SRM_CONTRACT_ITM (ekpo.srm_contract_itm)
//BlockingReasonID, //BAPIMEPOITEM-BLOCK_REASON_ID (ekpo.blk_reason_id)
//BlockingReasonText, //BAPIMEPOITEM-BLOCK_REASON_TEXT (ekpo.blk_reason_txt)
//BillingRelevanceCRM, * //BAPIMEPOITEM-SPE_CRM_FKREL (ekpo.spe_crm_fkrel)
//DeliveryDateQuantityIsFixed, //BAPIMEPOITEM-DATE_QTY_FIXED (ekpo.fixmg)
//GIBasedGoodsReceipt, * //BAPIMEPOITEM-GI_BASED_GR (ekpo.wabwe)
//ShippingType, * //BAPIMEPOITEM-SHIPTYPE (ekpo.vsart)
//GoodsHandoverLocation, //BAPIMEPOITEM-HANDOVERLOC (ekpo.handoverloc)
//TaxCodeAutomaticallyDetermined, * //BAPIMEPOITEM-TC_AUT_DET (ekpo.tc_aut_det)
//ManualTaxCodeReason, *//BAPIMEPOITEM-MANUAL_TC_REASON (ekpo.manual_tc_reason)
//TaxIncentiveType, *//BAPIMEPOITEM-FISCAL_INCENTIVE (ekpo.fiscal_incentive)
//IncentiveID, *//BAPIMEPOITEM-FISCAL_INCENTIVE_ID (ekpo.fiscal_incentive_id)
//TaxSubjSubstituicaoTributaria, * //BAPIMEPOITEM-TAX_SUBJECT_ST (ekpo.tax_subject_st)
//OriginJurisdictionCode, * //BAPIMEPOITEM-SF_TXJCD (ekpo.sf_txjcd)
//PerformancePeriodStartDate, //BAPIMEPOITEM-STARTDATE
//PerformancePeriodEndDate, //BAPIMEPOITEM-ENDDATE
//ExternalReferenceID, * //BAPIMEPOITEM-EXT_REF (ekpo.externalreferenceid)
//Are below fields needed, or ProductSeason and ProductSeasonYear used instead?
//Season, * //BAPIMEPOITEM-SEASON (ekpo.saiso)
//SeasonYear, * or MaterialSeasonYear ? //BAPIMEPOITEM-SEASONYR (ekpo.saisj)
//The SAP and ISO Unit fields
//Need to create new data elements for *SAPUnit fields
// (for *ISOUnit fields, perhaps, existing data elements are OK?)
// new annotations are required
//PurchaseOrderQuantitySAPUnit, *
//PurchaseOrderQuantityISOUnit, *
//OrderPriceSAPUnit, *
//OrderPriceISOUnit, *
//ItemWeightSAPUnit, *
//ItemWeightISOUnit, *
//ItemVolumeSAPUnit, *
//ItemVolumeISOUnit, *
//ProductPurchasePointsQtySAPUnit, *
//ProductPurchasePointsQtyISOUnit, *
//---------------------------------------------
//TODO:
//Theses fields exist in R_PurchasingDocumentItem
// and should be added to R_PurchaseOrderItem and R_PurchaseOrderItemTP:
// OutwardDeliveryIsComplete,
// NoDaysReminder1,
// NoDaysReminder2,
// NoDaysReminder3
//PurchasingPriceIsEstimated, //Add in R_PurchaseOrderItem
//IsToBeAcceptedAtOrigin, //Add in R_PurchaseOrderItem
//QualityMgmtCtrlKey,
//MinRemainingShelfLife,
//ShelfLifeExpirationDatePeriod,
//ThirdPtyOrdProcgExtReference,
//ThirdPtyOrdProcgExtRefItem
}
where
PurchasingDocumentDeletionCode = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_PURCHASEORDERITEMADDFIELDS",
"R_PURCHASEORDERITEM"
],
"ASSOCIATED":
[
"I_ADDRESS",
"I_ALLOCATIONTABLE",
"I_ALLOCATIONTABLEITEM",
"I_BR_CFOPCATEGORY",
"I_BR_MATERIALORIGIN",
"I_BR_MATERIALUSAGE",
"I_BR_NCM",
"I_BUSINESSPARTNER",
"I_COMPANYCODE",
"I_CONSUMPTIONPOSTING",
"I_CURRENCY",
"I_CUSTOMER",
"I_INCOTERMSCLASSIFICATION",
"I_MATERIAL",
"I_MATERIALGROUP",
"I_PLANT",
"I_PRODUCTTYPECODE",
"I_PURCHASECONTRACT",
"I_PURCHASECONTRACTITEM",
"I_PURCHASEORDERHISTORYBASIC",
"I_PURCHASEORDERITEMCALCFIELDS",
"I_PURCHASEREQUISITION",
"I_PURCHASEREQUISITIONITEM",
"I_PURCHASINGDOCUMENTCATEGORY",
"I_PURCHASINGINFORECORDAPI01",
"I_PURGDOCUMENTITEMCATEGORY",
"I_RETAILPROMOTION",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_UNITOFMEASURE",
"R_PURCHASEORDERINVOICINGPLANTP",
"R_PURCHASEORDERITEMNOTETP",
"R_PURCHASEORDERSCHEDULELINETP",
"R_PURCHASEORDERTP",
"R_PURORDACCOUNTASSIGNMENTTP",
"R_PURORDERITEMPRICINGELEMENTTP",
"R_PURORDITEMDELIVERYADDRESSTP"
],
"BASE":
[
"R_PURCHASEORDERITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/