I_PROCORDMGMTOPCOMPBASIC
Process Order Operation Comp Basic
I_PROCORDMGMTOPCOMPBASIC is a CDS View in S/4HANA. Process Order Operation Comp Basic. It contains 94 fields. 3 CDS views read from this table.
CDS Views using this table (3)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_ProcOrdMgmtAllProductsAggr | view | from | COMPOSITE | |
| P_ProcOrdMgmtOpCompWithSts | view | from | COMPOSITE | |
| P_ProcOrdMgmtOpCompWithSts2 | view | from | COMPOSITE |
Fields (94)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | RecordType | RecordType | 2 |
| KEY | Reservation | Reservation | 2 |
| KEY | ReservationItem | ReservationItem | 2 |
| AccountAssignmentCategory | AccountAssignmentCategory | 2 | |
| BaseUnit | BaseUnit | 2 | |
| Batch | Batch | 2 | |
| BatchSplitType | BatchSplitType | 2 | |
| BillOfMaterialCategory | BillOfMaterialCategory | 2 | |
| BillOfMaterialInternalID | BillOfMaterialInternalID | 2 | |
| BillOfMaterialItemNumber | BillOfMaterialItemNumber | 2 | |
| BillOfMaterialVariant | BillOfMaterialVariant | 2 | |
| BOMExplosionDateID | BOMExplosionDateID | 2 | |
| BOMItem | BillOfMaterialItemNodeNumber | 2 | |
| BOMItemCategory | BillOfMaterialItemCategory | 2 | |
| BOMItemDescription | BOMItemDescription | 2 | |
| BusinessArea | BusinessArea | 2 | |
| ChangeNumber | ChangeNumber | 2 | |
| CompanyCode | CompanyCode | 2 | |
| ComponentScrapInPercent | ComponentScrapInPercent | 2 | |
| ConfirmedAvailableQuantity | ConfirmedAvailableQuantity | 2 | |
| ConsumptionPosting | ConsumptionPosting | 2 | |
| DebitCreditCode | DebitCreditCode | 2 | |
| DeliveryDurationInDays | DeliveryDurationInDays | 2 | |
| EffectivityParameterVariant | EffectivityParameterVariant | 2 | |
| EntryUnit | EntryUnit | 2 | |
| FormulaKey | FormulaKey | 2 | |
| FunctionalArea | FunctionalArea | 2 | |
| GLAccount | GLAccount | 2 | |
| GoodsMovementEntryQty | GoodsMovementEntryQty | 2 | |
| GoodsMovementIsAllowed | GoodsMovementIsAllowed | 2 | |
| GoodsMovementType | GoodsMovementType | 2 | |
| GoodsRecipientName | GoodsRecipientName | 2 | |
| InventorySpecialStockType | InventorySpecialStockType | 2 | |
| InventorySpecialStockValnType | InventorySpecialStockValnType | 2 | |
| IsBulkMaterialComponent | IsBulkMaterialComponent | 2 | |
| IsNetScrap | IsNetScrap | 2 | |
| LeadingReservationItem | LeadingReservationItem | 2 | |
| LeadTimeOffset | LeadTimeOffset | 2 | |
| LongTextExists | LongTextExists | 2 | |
| LongTextLanguageCode | LongTextLanguageCode | 2 | |
| ManufacturingOrder | ManufacturingOrder | 2 | |
| ManufacturingOrderCategory | ManufacturingOrderCategory | 2 | |
| ManufacturingOrderOperation | ManufacturingOrderOperation | 1 | |
| ManufacturingOrderSequence | ManufacturingOrderSequence | 2 | |
| ManufacturingOrderType | ManufacturingOrderType | 2 | |
| Material | Material | 2 | |
| MaterialCompIsAlternativeItem | MaterialCompIsAlternativeItem | 2 | |
| MaterialCompIsCostRelevant | MaterialCompIsCostRelevant | 2 | |
| MaterialCompIsIntraMaterial | MaterialCompIsIntraMaterial | 2 | |
| MaterialCompIsVariableSized | MaterialCompIsVariableSized | 2 | |
| MaterialComponentIsClassified | MaterialComponentIsClassified | 2 | |
| MaterialComponentIsMissing | MaterialComponentIsMissing | 2 | |
| MaterialComponentIsPhantomItem | MaterialComponentIsPhantomItem | 2 | |
| MaterialCompOriginalQuantity | MaterialCompOriginalQuantity | 2 | |
| MaterialGroup | MaterialGroup | 2 | |
| MatlCompDiscontinuationType | MatlCompDiscontinuationType | 2 | |
| MatlCompIsConfigurable | MatlCompIsConfigurable | 2 | |
| MatlCompIsMarkedForBackflush | MatlCompIsMarkedForBackflush | 2 | |
| MatlCompIsMarkedForDeletion | MatlCompIsMarkedForDeletion | 2 | |
| MatlCompIsTextItem | MatlCompIsTextItem | 2 | |
| MatlCompRequirementDate | MatlCompRequirementDate | 2 | |
| MatlCompRequirementTime | MatlCompRequirementTime | 2 | |
| OperationLeadTimeOffset | OperationLeadTimeOffset | 2 | |
| OperationLeadTimeOffsetUnit | OperationLeadTimeOffsetUnit | 2 | |
| OperationScrapInPercent | OperationScrapInPercent | 2 | |
| OrderIntBillOfOperationsItem | OrderIntBillOfOperationsItem | 1 | |
| OrderInternalBillOfOperations | OrderInternalBillOfOperations | 1 | |
| OrderLevelValue | OrderLevelValue | 2 | |
| OrderPathValue | OrderPathValue | 2 | |
| Plant | Plant | 2 | |
| ProductConfiguration | ProductConfiguration | 2 | |
| ProductionPlant | ProductionPlant | 2 | |
| ProductionSupervisor | ProductionSupervisor | 2 | |
| PurchasingGroup | PurchasingGroup | 2 | |
| PurchasingInfoRecord | PurchasingInfoRecord | 2 | |
| QuantityIsFixed | QuantityIsFixed | 2 | |
| RequirementSegment | RequirementSegment | 2 | |
| RequirementType | RequirementType | 2 | |
| ReservationIsFinallyIssued | ReservationIsFinallyIssued | 2 | |
| ReservationItemCreationCode | ReservationItemCreationCode | 2 | |
| SalesOrder | SalesOrder | 2 | |
| SalesOrderItem | SalesOrderItem | 2 | |
| StockSegment | StockSegment | 2 | |
| StorageBin | StorageBin | 2 | |
| StorageLocation | StorageLocation | 2 | |
| StorageType | StorageType | 2 | |
| SupplyArea | SupplyArea | 2 | |
| UnloadingPointName | UnloadingPointName | 2 | |
| UsageProbabilityPercent | UsageProbabilityPercent | 2 | |
| VariableSizeComponentQuantity | VariableSizeComponentQuantity | 2 | |
| VariableSizeComponentUnit | VariableSizeComponentUnit | 2 | |
| Warehouse | Warehouse | 2 | |
| WBSElementInternalID | WBSElementInternalID | 2 | |
| WithdrawnQuantity | WithdrawnQuantity | 2 |
@AbapCatalog.sqlViewName: 'IPOROPCOMPBSC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Process Order Operation Comp Basic'
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@AccessControl.privilegedAssociations: ['_AssemblyMRPController', '_ProductionSupervisor', '_LongText']
@ClientHandling.algorithm: #SESSION_VARIABLE
@ClientHandling.type: #CLIENT_DEPENDENT
@ObjectModel.representativeKey: 'ReservationItem'
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.viewType: #BASIC
define view I_ProcOrdMgmtOpCompBasic
as select from P_ProcOrdOpReservationItem as resb
association [1..1] to I_ReservationDocumentHeader as _Reservation on $projection.Reservation = _Reservation.Reservation
association [1..1] to I_ReservationDocumentItem as _ReservationItem on $projection.Reservation = _ReservationItem.Reservation
and $projection.ReservationItem = _ReservationItem.ReservationItem
and $projection.RecordType = _ReservationItem.RecordType
association [0..1] to I_ReservationDocRecordType as _ReservationDocRecordType on $projection.RecordType = _ReservationDocRecordType.RecordType
association [1..1] to I_ManufacturingOrder as _ManufacturingOrder on $projection.ManufacturingOrder = _ManufacturingOrder.ManufacturingOrder
association [1..1] to I_MfgOrderSequence as _MfgOrderSequence on $projection.ManufacturingOrder = _MfgOrderSequence.ManufacturingOrder
and $projection.ManufacturingOrderSequence = _MfgOrderSequence.ManufacturingOrderSequence
association [0..1] to I_SequenceCategory as _MfgOrderSequenceCategory on $projection.MfgOrderSequenceCategory = _MfgOrderSequenceCategory.SequenceCategory
association [1..1] to I_MfgOrderOperationBasic as _MfgOrderOperation on $projection.OrderInternalBillOfOperations = _MfgOrderOperation.OrderInternalBillOfOperations
and $projection.OrderIntBillOfOperationsItem = _MfgOrderOperation.OrderIntBillOfOperationsItem
association [1..1] to I_MfgOrderOperationBySemanKey as _MfgOrderOpBySemanticKey on $projection.ManufacturingOrder = _MfgOrderOpBySemanticKey.ManufacturingOrder
and $projection.ManufacturingOrderSequence = _MfgOrderOpBySemanticKey.ManufacturingOrderSequence
and $projection.ManufacturingOrderOperation = _MfgOrderOpBySemanticKey.ManufacturingOrderOperation
association [1..1] to I_MfgOrderCategory as _MfgOrderCategory on $projection.ManufacturingOrderCategory = _MfgOrderCategory.ManufacturingOrderCategory
association [1..1] to I_MfgOrderType as _MfgOrderType on $projection.ManufacturingOrderType = _MfgOrderType.ManufacturingOrderType
association [1..1] to I_Plant as _ProductionPlant on $projection.ProductionPlant = _ProductionPlant.Plant
association [1..1] to I_OrderInternalID as _OrderInternalID on $projection.OrderInternalBillOfOperations = _OrderInternalID.OrderInternalID
association [1..1] to I_MaterialRequirementType as _RequirementType on $projection.RequirementType = _RequirementType.RequirementType
association [1..1] to I_MaterialGroup as _MaterialGroup on $projection.MaterialGroup = _MaterialGroup.MaterialGroup
association [1..1] to I_Material as _Material on $projection.Material = _Material.Material
association [1..1] to I_Product as _Product on $projection.Material = _Product.Product
association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [1..1] to I_ProductPlantBasic as _ProductPlant2 on $projection.Material = _ProductPlant2.Product
and $projection.Plant = _ProductPlant2.Plant
association [1..1] to I_ProductSupplyPlanning as _ProductSupplyPlanning on $projection.Material = _ProductSupplyPlanning.Product
and $projection.Plant = _ProductSupplyPlanning.Plant
association [0..1] to I_ProductStorageLocationBasic as _ProductStorageLocation2 on $projection.Material = _ProductStorageLocation2.Product
and $projection.Plant = _ProductStorageLocation2.Plant
and $projection.StorageLocation = _ProductStorageLocation2.StorageLocation
association [1..*] to I_ProductUnitsOfMeasure as _ProductUnitsOfMeasure on $projection.Material = _ProductUnitsOfMeasure.Product
association [0..1] to I_MRPController as _AssemblyMRPController on $projection.Plant = _AssemblyMRPController.Plant
and $projection.AssemblyMRPController = _AssemblyMRPController.MRPController
association [0..1] to I_ProductionSupervisor as _ProductionSupervisor on $projection.Plant = _ProductionSupervisor.Plant
and $projection.ProductionSupervisor = _ProductionSupervisor.ProductionSupervisor
association [0..1] to I_SalesOrder as _SalesOrder on $projection.SalesOrder = _SalesOrder.SalesOrder
association [0..1] to I_SalesOrderItem as _SalesOrderItem on $projection.SalesOrder = _SalesOrderItem.SalesOrder
and $projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem
association [0..1] to I_WBSElementByInternalKey as _WBSElement on $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
association [0..1] to I_WBSElementBasicData as _WBSElementBasicData on $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
association [0..1] to I_ChangeMaster as _ChangeNumber on $projection.ChangeNumber = _ChangeNumber.ChangeNumber
association [0..1] to I_BOMExplosionDate as _BOMExplosion on $projection.BOMExplosionDateID = _BOMExplosion.BOMExplosionDateID
association [0..1] to I_BillOfMaterialItemBasic as _BillOfMaterialItem on $projection.BillOfMaterialCategory = _BillOfMaterialItem.BillOfMaterialCategory
and $projection.BillOfMaterial = _BillOfMaterialItem.BillOfMaterial
and $projection.BOMItem = _BillOfMaterialItem.BillOfMaterialItemNodeNumber
and $projection.BOMItemInternalChangeCount = _BillOfMaterialItem.BOMItemInternalChangeCount
association [0..1] to I_BillOfMaterialItemCategory as _BOMItemCategory on $projection.BOMItemCategory = _BOMItemCategory.BillOfMaterialItemCategory
association [0..1] to I_PurchasingInfoRecordApi01 as _PurchasingInfoRecord on $projection.PurchasingInfoRecord = _PurchasingInfoRecord.PurchasingInfoRecord
association [0..1] to I_PurchasingGroup as _PurchasingGroup on $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
association [0..1] to I_PurchaseOrderAPI01 as _PurchaseOrder on $projection.PurchaseOrder = _PurchaseOrder.PurchaseOrder
association [0..1] to I_PurchaseOrderItemAPI01 as _PurchaseOrderItem on $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder
and $projection.PurchaseOrderItem = _PurchaseOrderItem.PurchaseOrderItem
association [0..1] to I_Purchaserequisition as _PurchaseRequisition on $projection.PurchaseRequisition = _PurchaseRequisition.PurchaseRequisition
association [0..1] to I_PurchaseRequisitionItemAPI01 as _PurchaseRequisitionItem2 on $projection.PurchaseRequisition = _PurchaseRequisitionItem2.PurchaseRequisition
and $projection.PurchaseRequisitionItem = _PurchaseRequisitionItem2.PurchaseRequisitionItem
association [0..1] to I_Supplier as _Supplier on $projection.Supplier = _Supplier.Supplier
association [0..1] to I_SupplierCompanyByPlant as _SupplierCompanyByPlant on $projection.Plant = _SupplierCompanyByPlant.Plant
and $projection.Supplier = _SupplierCompanyByPlant.Supplier
association [0..1] to I_StorageLocation as _StorageLocation on $projection.Plant = _StorageLocation.Plant
and $projection.StorageLocation = _StorageLocation.StorageLocation
association [0..*] to I_Batch as _Batch on $projection.Material = _Batch.Material
and $projection.Batch = _Batch.Batch
association [1..1] to I_DebitCreditCode as _DebitCreditCode on $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode
association [1..1] to I_GoodsMovementType as _GoodsMovementType on $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType
association [0..1] to I_InventorySpecialStockType as _InventorySpecialStockType on $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
association [0..1] to I_ConsumptionPosting as _ConsumptionPosting on $projection.ConsumptionPosting = _ConsumptionPosting.ConsumptionPosting
association [0..1] to I_ProductionSupplyArea as _SupplyArea on $projection.Plant = _SupplyArea.Plant
and $projection.SupplyArea = _SupplyArea.ProductionSupplyArea
association [0..1] to I_Warehouse as _Warehouse on $projection.Warehouse = _Warehouse.Warehouse
association [0..1] to I_Product as _PhantomAssembly on $projection.Assembly = _PhantomAssembly.Product
association [0..1] to I_Product as _FollowUpMaterial on $projection.FollowUpMaterial = _FollowUpMaterial.Product
association [0..1] to I_MatlCompDiscontinuationType as _MatlCompDiscontinuationType on $projection.MatlCompDiscontinuationType = _MatlCompDiscontinuationType.MatlCompDiscontinuationType
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_BusinessArea as _BusinessArea on $projection.BusinessArea = _BusinessArea.BusinessArea
association [0..1] to I_GLAccount as _GLAccount on $projection.GLAccount = _GLAccount.GLAccount
and $projection.CompanyCode = _GLAccount.CompanyCode
association [0..1] to I_ControllingArea as _ControllingArea on $projection.ControllingArea = _ControllingArea.ControllingArea
association [0..1] to I_FunctionalArea as _FunctionalArea on $projection.FunctionalArea = _FunctionalArea.FunctionalArea
association [0..1] to I_AccountAssignmentCategory as _AccountAssignmentCategory on $projection.AccountAssignmentCategory = _AccountAssignmentCategory.AccountAssignmentCategory
association [0..1] to I_CommitmentItemShortID as _CommitmentItemShortID on $projection.CommitmentItemShortID = _CommitmentItemShortID.CommitmentItemShortID
association [0..1] to I_UnitOfMeasure as _OpLeadTimeOffsetUnit on $projection.OperationLeadTimeOffsetUnit = _OpLeadTimeOffsetUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _VariableSizeCompUnit on $projection.VariableSizeComponentUnit = _VariableSizeCompUnit.UnitOfMeasure
association [1..1] to I_UnitOfMeasure as _BaseUnit on $projection.BaseUnit = _BaseUnit.UnitOfMeasure
association [1..1] to I_UnitOfMeasure as _EntryUnit on $projection.EntryUnit = _EntryUnit.UnitOfMeasure
association [0..1] to I_Currency as _Currency on $projection.Currency = _Currency.Currency
association [0..1] to I_Language as _LongTextLanguage on $projection.LongTextLanguageCode = _LongTextLanguage.Language
association [0..1] to I_OrderComponentLongText as _LongText on $projection.Reservation = _LongText.Reservation
and $projection.ReservationItem = _LongText.ReservationItem
and $projection.RecordType = _LongText.RecordType
{
// Key
@ObjectModel.foreignKey.association: '_Reservation'
key resb.rsnum as Reservation,
@ObjectModel.text.element: 'BOMItemDescription'
key cast(resb.rspos as pph_rspos preserving type) as ReservationItem,
@ObjectModel.foreignKey.association: '_ReservationDocRecordType'
key cast(resb.rsart as pph_rsart preserving type) as RecordType,
//Material data
@ObjectModel.foreignKey.association: '_MaterialGroup'
resb.matkl as MaterialGroup,
@ObjectModel.foreignKey.association: '_Material'
resb.matnr as Material,
@ObjectModel.foreignKey.association: '_Plant'
resb.werks as Plant,
// Order and Operation data
@ObjectModel.foreignKey.association: '_MfgOrderCategory'
cast(resb.autyp as manufacturingordercategory preserving type) as ManufacturingOrderCategory,
@ObjectModel.foreignKey.association: '_MfgOrderType'
cast(resb.auart as manufacturingordertype preserving type) as ManufacturingOrderType,
@ObjectModel.foreignKey.association: '_ManufacturingOrder'
cast(resb.aufnr as manufacturingorder preserving type) as ManufacturingOrder,
@ObjectModel.foreignKey.association: '_MfgOrderSequence'
cast(( case resb.autyp
when '40' then ' ' // clear sequence for process orders
else ' '
end ) as manufacturingordersequence preserving type) as ManufacturingOrderSequence,
@ObjectModel.foreignKey.association: '_MfgOrderSequenceCategory'
cast(resb.flgat as folgenart preserving type) as MfgOrderSequenceCategory,
@ObjectModel.foreignKey.association: '_MfgOrderOpBySemanticKey'
cast(resb.vornr as text4 preserving type) as ManufacturingOrderOperation,
@ObjectModel.foreignKey.association: '_ProductionPlant'
cast(resb.pwerk as pwwrk preserving type) as ProductionPlant,
@ObjectModel.foreignKey.association: '_OrderInternalID'
cast(resb.aufpl as pph_aufpl preserving type) as OrderInternalBillOfOperations,
@ObjectModel.foreignKey.association: '_MfgOrderOperation'
cast(resb.aplzl as operationinternalid preserving type) as OrderIntBillOfOperationsItem,
@ObjectModel.foreignKey.association: '_AssemblyMRPController'
cast(resb.dispo as assymrpcontrl preserving type) as AssemblyMRPController,
@ObjectModel.foreignKey.association: '_ProductionSupervisor'
cast(resb.fevor as pph_fevor preserving type) as ProductionSupervisor,
// Date and Time
@Semantics.businessDate.at: true
cast(resb.bdter as pph_bdter preserving type) as MatlCompRequirementDate,
cast(resb.bdztp as pph_bdztp preserving type) as MatlCompRequirementTime,
cast(resb.sbter as pph_sbter preserving type) as LatestRequirementDate,
cast(resb.ftrmi as mfgorderactualreleasedate preserving type) as MfgOrderActualReleaseDate,
// Attributes
cast(resb.rssta as pph_rssta preserving type) as ReservationItemCreationCode,
resb.kzear as ReservationIsFinallyIssued,
cast(resb.xloek as pph_xloek preserving type) as MatlCompIsMarkedForDeletion,
resb.xfehl as MaterialComponentIsMissing,
resb.schgt as IsBulkMaterialComponent,
resb.rgekz as MatlCompIsMarkedForBackflush,
resb.txtps as MatlCompIsTextItem,
cast(resb.beikz as vdm_beikz preserving type) as MaterialProvisionType,
cast(resb.no_disp as vdm_no_disp preserving type) as MaterialPlanningRelevance,
resb.kfpos as MatlCompIsConfigurable,
resb.clakz as MaterialComponentIsClassified,
resb.inpos as MaterialCompIsIntraMaterial,
cast(case resb.dbskz
when 'E' then 'X' else ' ' end as clcor preserving type ) as MaterialIsDirectlyProduced,
cast(case resb.dbskz
when 'F' then 'X' else ' ' end as dirpr preserving type ) as MaterialIsDirectlyProcured,
// Long Text
@ObjectModel.foreignKey.association: '_LongTextLanguage'
resb.ltxsp as LongTextLanguageCode,
cast(case resb.ltxsp
when '' then ''
else 'X'
end as aufltext preserving type) as LongTextExists,
// Assignments
@ObjectModel.foreignKey.association: '_RequirementType'
cast(resb.bdart as pph_bdart preserving type) as RequirementType,
@ObjectModel.foreignKey.association: '_SalesOrder'
cast(resb.kdauf as co_kdauf preserving type) as SalesOrder,
@ObjectModel.foreignKey.association: '_SalesOrderItem'
cast(resb.kdpos as co_kdpos preserving type) as SalesOrderItem,
@ObjectModel.foreignKey.association: '_WBSElement'
cast(resb.pspel as ps_s4_pspnr preserving type) as WBSElementInternalID,
resb.cuobj as ProductConfiguration,
@ObjectModel.foreignKey.association: '_ChangeNumber'
resb.aennr as ChangeNumber,
resb.techs as EffectivityParameterVariant,
// resb.sortf as SortField,
// Assignments BOM
cast(resb.stlty as pph_stlty preserving type) as BillOfMaterialCategory,
// resb.stlnr as BillOfMaterialInternalID,
cast ( resb.stlnr as pph_stnum preserving type ) as BillOfMaterialInternalID,
resb.stlan as BillOfMaterialVariantUsage,
resb.stlal as BillOfMaterialVariant,
// resb.stlnr2 as BillOfMaterial,
cast ( resb.stlnr2 as pph_stnum preserving type ) as BillOfMaterial,
cast(resb.stlkn as pph_stlkn preserving type) as BOMItem,
resb.bom_versn as BillOfMaterialVersion,
resb.stpoz as BOMItemInternalChangeCount,
resb.stvkn as InheritedBOMItemNode,
cast(resb.postp as pph_postp preserving type) as BOMItemCategory,
@ObjectModel.text.element: 'BOMItemDescription'
cast ( resb.posnr as pph_sposn preserving type ) as BillOfMaterialItemNumber,
// resb.posnr as BillOfMaterialItemNumber,
@Semantics.text: true
resb.potx1 as BOMItemDescription,
@Semantics.text: true
resb.potx2 as BOMItemText2,
@ObjectModel.foreignKey.association: '_BOMExplosion'
cast(resb.sernr as pph_sernr preserving type) as BOMExplosionDateID,
// Assignments Purchasing
cast(resb.infnr as pph_infnr preserving type) as PurchasingInfoRecord,
@ObjectModel.foreignKey.association: '_PurchasingGroup'
cast(resb.ekgrp as pph_ekgrp preserving type) as PurchasingGroup,
-- @ObjectModel.foreignKey.association: '_PurchaseRequisition'
cast(resb.banfn as co_banfn preserving type) as PurchaseRequisition,
-- @ObjectModel.foreignKey.association: '_PurchaseRequisitionItem'
cast(resb.bnfpo as co_bnfpo preserving type) as PurchaseRequisitionItem,
-- @ObjectModel.foreignKey.association: '_PurchaseOrder'
cast(resb.ebeln as vdm_purchaseorder preserving type) as PurchaseOrder,
-- @ObjectModel.foreignKey.association: '_PurchaseOrderItem'
cast(resb.ebelp as vdm_purchaseorderitem preserving type) as PurchaseOrderItem,
@ObjectModel.foreignKey.association: '_Supplier'
resb.lifnr as Supplier,
cast(resb.lifzt as pph_lifzt preserving type) as DeliveryDurationInDays,
cast(resb.webaz as pph_webaz preserving type) as MaterialGoodsReceiptDuration,
-- Price
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'Currency'
cast(resb.gpreis as kblpreis preserving type) as ExternalProcessingPrice,
cast(resb.peinh as pph_peinh preserving type) as NumberOfOperationPriceUnits,
// Goods Movement data
resb.xwaok as GoodsMovementIsAllowed,
@ObjectModel.foreignKey.association: '_StorageLocation'
cast(resb.lgort as pph_lgort preserving type) as StorageLocation,
resb.charg as Batch,
resb.splkz as BatchSplitType,
@ObjectModel.foreignKey.association: '_DebitCreditCode'
cast(resb.shkzg as pph_shkzg preserving type) as DebitCreditCode,
@ObjectModel.foreignKey.association: '_GoodsMovementType'
resb.bwart as GoodsMovementType,
@ObjectModel.foreignKey.association: '_InventorySpecialStockType'
cast(resb.sobkz as inventoryspecialstocktype preserving type) as InventorySpecialStockType,
cast(resb.kzbws as pph_kzbws preserving type) as InventorySpecialStockValnType,
@ObjectModel.foreignKey.association: '_ConsumptionPosting'
cast(resb.kzvbr as pph_kzvbr preserving type) as ConsumptionPosting,
@ObjectModel.foreignKey.association: '_SupplyArea'
cast(resb.prvbe as pph_prvbe preserving type) as SupplyArea,
@Semantics.text: true
cast(resb.wempf as pph_wempf preserving type) as GoodsRecipientName,
@Semantics.text: true
resb.ablad as UnloadingPointName,
resb.sgt_scat as StockSegment,
resb.sgt_rcat as RequirementSegment,
// Assignments WM
@ObjectModel.foreignKey.association: '_Warehouse'
resb.lgnum as Warehouse,
resb.lgtyp as StorageType,
resb.lgpla as StorageBin,
// Assignments FI/CO
resb.sanka as MaterialCompIsCostRelevant,
@ObjectModel.foreignKey.association: '_BusinessArea'
resb.gsber as BusinessArea,
@ObjectModel.foreignKey.association: '_CompanyCode'
resb.bukrs as CompanyCode,
@ObjectModel.foreignKey.association: '_GLAccount'
resb.saknr as GLAccount,
@ObjectModel.foreignKey.association: '_FunctionalArea'
resb.fkber as FunctionalArea,
@ObjectModel.foreignKey.association: '_ControllingArea'
resb.kokrs as ControllingArea,
@ObjectModel.foreignKey.association: '_AccountAssignmentCategory'
cast(resb.knttp as pph_knttp preserving type) as AccountAssignmentCategory,
cast(resb.fipos as fmis_ci_internalname preserving type) as CommitmentItemShortID,
cast(resb.fistl as bbpfistl preserving type) as FundsCenter,
// Variable-size comp. data
resb.rohps as MaterialCompIsVariableSized,
// cast(resb.roanz as pph_roanz preserving type) as NumberOfVariableSizeComponents,
@Semantics.unitOfMeasure: true
cast(resb.rokme as pph_rokme preserving type) as VariableSizeComponentUnit,
@Semantics.quantity.unitOfMeasure: 'VariableSizeComponentUnit'
@DefaultAggregation: #SUM
cast(resb.romen as pph_romen preserving type) as VariableSizeComponentQuantity,
@Semantics.unitOfMeasure: true
resb.romei as VariableSizeDimensionUnit,
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
@DefaultAggregation: #MAX
resb.roms1 as VariableSizeDimension1,
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
@DefaultAggregation: #MAX
resb.roms2 as VariableSizeDimension2,
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
@DefaultAggregation: #MAX
resb.roms3 as VariableSizeDimension3,
resb.rform as FormulaKey,
// Alternative item data
resb.alpos as MaterialCompIsAlternativeItem,
cast(resb.alpgr as pph_alpgr preserving type) as AlternativeItemGroup,
cast(resb.alpst as pph_alpst preserving type) as AlternativeItemStrategy,
cast(resb.alprf as pph_alprf preserving type) as AlternativeItemPriority,
resb.ewahr as UsageProbabilityPercent,
// Phantom assembly
cast(resb.dumps as pph_dumps preserving type) as MaterialComponentIsPhantomItem,
resb.aufwg as OrderPathValue,
resb.aufst as OrderLevelValue,
@ObjectModel.foreignKey.association: '_PhantomAssembly'
resb.baugr as Assembly,
resb.bauwg as AssemblyOrderPathValue,
resb.baust as AssemblyOrderLevelValue,
// Discontinuation
cast(resb.nfeag as pph_nfeag preserving type) as DiscontinuationGroup,
@ObjectModel.foreignKey.association: '_MatlCompDiscontinuationType'
resb.kzaus as MatlCompDiscontinuationType,
cast(resb.nfpkz as pph_kznfp preserving type) as MatlCompIsFollowUpMaterial,
cast(resb.nfgrp as pph_nfgrp preserving type) as FollowUpGroup,
@ObjectModel.foreignKey.association: '_FollowUpMaterial'
cast(resb.nomat as pph_nomat preserving type) as FollowUpMaterial,
cast(resb.nafkz as pph_nafkz preserving type) as FollowUpMaterialIsNotActive,
// Lead-Time offset
cast(resb.nlfzt as pph_nlfzt preserving type) as LeadTimeOffset,
@Semantics.unitOfMeasure: true
cast(resb.nlfmv as pph_nlfmv preserving type) as OperationLeadTimeOffsetUnit,
cast(resb.nlfzv as pph_nlfzv preserving type) as OperationLeadTimeOffset,
// Quantities and UoM
resb.fmeng as QuantityIsFixed,
resb.netau as IsNetScrap,
resb.ausch as ComponentScrapInPercent,
resb.avoau as OperationScrapInPercent,
resb.umrez as MaterialQtyToBaseQtyNmrtr,
resb.umren as MaterialQtyToBaseQtyDnmntr,
@Semantics.unitOfMeasure: true
resb.meins as BaseUnit,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@DefaultAggregation: #SUM
resb.bdmng as RequiredQuantity,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@DefaultAggregation: #SUM
cast(resb.enmng as pph_enmng preserving type) as WithdrawnQuantity,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@DefaultAggregation: #SUM
cast(resb.vmeng as pph_vmeng preserving type) as ConfirmedAvailableQuantity,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@DefaultAggregation: #SUM
cast(resb.nomng as pph_nomng preserving type) as MaterialCompOriginalQuantity,
@Semantics.unitOfMeasure: true
resb.erfme as EntryUnit,
@Semantics.quantity.unitOfMeasure: 'EntryUnit'
@DefaultAggregation: #SUM
cast(resb.erfmg as pph_erfmg preserving type) as GoodsMovementEntryQty,
// Amount and Currency
@Semantics.currencyCode: true
resb.waers as Currency,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'Currency'
resb.enwrt as WithdrawnQuantityAmount,
// Fashion Manufacturing Fields
fsh_critical_comp as CriticalComponentType,
fsh_critical_level as CriticalComponentLevel,
resb.splrv as LeadingReservationItem,
_ManufacturingOrder.ObjectInternalID,
case when resb.kzkup <> '' then 'X'
end as IsCoProduct,
// Associations
_Reservation,
_ReservationItem,
_ReservationDocRecordType,
_ManufacturingOrder,
_MfgOrderCategory,
_MfgOrderType,
_MfgOrderOperation,
_MfgOrderOpBySemanticKey,
_MfgOrderSequence,
_MfgOrderSequenceCategory,
_OrderInternalID,
_ProductionPlant,
_AssemblyMRPController,
_ProductionSupervisor,
_RequirementType,
_MaterialGroup,
_Material,
_Product,
_ProductPlant2,
_ProductStorageLocation2,
_ProductSupplyPlanning,
_ProductUnitsOfMeasure,
_Plant,
_StorageLocation,
_Batch,
_DebitCreditCode,
_GoodsMovementType,
_InventorySpecialStockType,
_ConsumptionPosting,
_SupplyArea,
_Warehouse,
_FollowUpMaterial,
_MatlCompDiscontinuationType,
_PhantomAssembly,
_BOMExplosion,
_BillOfMaterialItem,
_BOMItemCategory,
_SalesOrder,
_SalesOrderItem,
_WBSElement,
_WBSElementBasicData,
_ChangeNumber,
_PurchasingGroup,
_PurchasingInfoRecord,
_PurchaseOrder,
_PurchaseOrderItem,
_PurchaseRequisition,
_PurchaseRequisitionItem2,
_Supplier,
@Consumption.hidden: true
_SupplierCompanyByPlant,
_CompanyCode,
_BusinessArea,
_GLAccount,
_ControllingArea,
_FunctionalArea,
_AccountAssignmentCategory,
_CommitmentItemShortID,
_OpLeadTimeOffsetUnit,
_VariableSizeCompUnit,
_BaseUnit,
_EntryUnit,
_Currency,
_LongTextLanguage,
_LongText
}
where
// resb.kzkup = '' //no co-products and
resb.postp <> 'D'; //no documents