R_BillOfMaterialTP

DDL: R_BILLOFMATERIALTP Type: view_entity TRANSACTIONAL

Bill of Material Header

R_BillOfMaterialTP is a Transactional CDS View that provides data about "Bill of Material Header" in SAP S/4HANA. It reads from 1 data source (I_MaterialBOM) and exposes 47 fields with key fields BillOfMaterial, BillOfMaterialCategory, BillOfMaterialVariant, BillOfMaterialVersion, EngineeringChangeDocument. It has 5 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaterialBOM bom_header from

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_ProductDescription _ProductDescription $projection.Material = _ProductDescription.Product and _ProductDescription.Language = $session.system_language
[0..1] I_PlantStdVH _Plants $projection.Plant = _Plants.Plant
[0..1] I_BillOfMaterialUsage _BillOfMaterialUsage $projection.BillOfMaterialVariantUsage = _BillOfMaterialUsage.BillOfMaterialVariantUsage ----Extension
[1..1] E_BillOfMaterialTP _BillOfMaterialExtension $projection.BillOfMaterial = _BillOfMaterialExtension.BillOfMaterial and $projection.BillOfMaterialCategory = _BillOfMaterialExtension.BillOfMaterialCategory and $projection.BillOfMaterialVariant = _BillOfMaterialExtension.BillOfMaterialVariant and $projection.BOMHeaderInternalChangeCount = _BillOfMaterialExtension.BOMHeaderInternalChangeCount and $projection.BillOfMaterialVersion = _BillOfMaterialExtension.BillOfMaterialVersion
[0..*] R_BillOfMaterialItemTP _BillOfMaterialItem

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Bill of Material Header view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
VDM.viewType #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.sapObjectNodeType.name BillOfMaterial view

Fields (47)

KeyFieldSource TableSource FieldDescription
KEY BillOfMaterial
KEY BillOfMaterialCategory I_MaterialBOM BillOfMaterialCategory
KEY BillOfMaterialVariant I_MaterialBOM BillOfMaterialVariant
KEY BillOfMaterialVersion I_MaterialBOM BillOfMaterialVersion
KEY EngineeringChangeDocument I_MaterialBOM EngineeringChangeDocument
KEY Material I_MaterialBOM Material
KEY Plant I_MaterialBOM Plant
BillOfMaterialHeaderUUID I_MaterialBOM BillOfMaterialHeaderUUID
BillOfMaterialVariantUsage I_MaterialBOM BillOfMaterialVariantUsage
EngineeringChangeDocForEdit I_MaterialBOM EngineeringChangeDocument
IsMultipleBOMAlt I_MaterialBOM IsMultipleBOMAlt
BOMHeaderInternalChangeCount I_MaterialBOM BOMHeaderInternalChangeCount
BOMUsagePriority I_MaterialBOM BOMUsagePriority
BillOfMaterialAuthsnGrp I_MaterialBOM BillOfMaterialAuthsnGrp
BOMVersionStatus I_MaterialBOM BOMVersionStatus
IsVersionBillOfMaterial I_MaterialBOM IsVersionBillOfMaterial
IsLatestBOMVersion I_MaterialBOM IsLatestBOMVersion
IsConfiguredMaterial I_MaterialBOM IsConfiguredMaterial
BOMTechnicalType
BOMGroup I_MaterialBOM BOMGroup
BOMHeaderText I_MaterialBOM BOMHeaderText
BOMAlternativeText I_MaterialBOM BOMAlternativeText
BillOfMaterialStatus I_MaterialBOM BillOfMaterialStatus
HeaderValidityStartDate I_MaterialBOM HeaderValidityStartDate
HeaderValidityEndDate I_MaterialBOM HeaderValidityEndDate
ChgToEngineeringChgDocument I_MaterialBOM ChgToEngineeringChgDocument
IsMarkedForDeletion I_MaterialBOM IsMarkedForDeletion
IsALE I_MaterialBOM IsALE
MatFromLotSizeQuantity I_MaterialBOM MatFromLotSizeQuantity
MaterialToLotSizeQuantity I_MaterialBOM MaterialToLotSizeQuantity
BOMHeaderBaseUnit I_MaterialBOM BOMHeaderBaseUnit
BOMHeaderQuantityInBaseUnit I_MaterialBOM BOMHeaderQuantityInBaseUnit
RecordCreationDate I_MaterialBOM RecordCreationDate
LastChangeDate I_MaterialBOM LastChangeDate
CreatedByUser I_MaterialBOM CreatedByUser
LastChangedByUser I_MaterialBOM LastChangedByUser
BOMIsToBeDeleted I_MaterialBOM BOMIsToBeDeleted
DocumentIsCreatedByCAD I_MaterialBOM DocumentIsCreatedByCAD
LaboratoryOrDesignOffice I_MaterialBOM LaboratoryOrDesignOffice
BOMAssetNtwkHndovrIsRelevant I_MaterialBOM BOMAssetNtwkHndovrIsRelevant
ProductDescription _ProductDescription ProductDescription
PlantName _Plant PlantName
SelectedBillOfMaterialVersion
BillOfMaterialHdrDetailsText
_BillOfMaterialItem _BillOfMaterialItem
_UnitOfMeasure _UnitOfMeasure
_BillOfMaterialUsage _BillOfMaterialUsage
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Bill of Material Header'
@VDM: {
  lifecycle.contract.type: #SAP_INTERNAL_API,
  viewType: #TRANSACTIONAL
}
@ObjectModel.usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@ObjectModel.sapObjectNodeType.name : 'BillOfMaterial'
//@AbapCatalog.preserveKey: true

define root view entity R_BillOfMaterialTP
  as select from I_MaterialBOM as bom_header
  composition [0..*] of R_BillOfMaterialItemTP as _BillOfMaterialItem
  association [0..1] to I_ProductDescription        as _ProductDescription on  $projection.Material         = _ProductDescription.Product
                                                                           and _ProductDescription.Language = $session.system_language
  association [0..1] to I_PlantStdVH                as _Plants             on  $projection.Plant = _Plants.Plant
  association [0..1] to I_BillOfMaterialUsage as _BillOfMaterialUsage on $projection.BillOfMaterialVariantUsage = _BillOfMaterialUsage.BillOfMaterialVariantUsage
  
  ----Extension Association
  association [1..1] to E_BillOfMaterialTP           as _BillOfMaterialExtension    on  $projection.BillOfMaterial               = _BillOfMaterialExtension.BillOfMaterial
                                                                                    and $projection.BillOfMaterialCategory       = _BillOfMaterialExtension.BillOfMaterialCategory
                                                                                    and $projection.BillOfMaterialVariant        = _BillOfMaterialExtension.BillOfMaterialVariant
                                                                                    and $projection.BOMHeaderInternalChangeCount = _BillOfMaterialExtension.BOMHeaderInternalChangeCount
                                                                                    and $projection.BillOfMaterialVersion        = _BillOfMaterialExtension.BillOfMaterialVersion
{
  key cast( bom_header.BillOfMaterial as cs_stlnr preserving type )                                      as BillOfMaterial,
  key bom_header.BillOfMaterialCategory                              as BillOfMaterialCategory,
  key bom_header.BillOfMaterialVariant                               as BillOfMaterialVariant,
  key bom_header.BillOfMaterialVersion                               as BillOfMaterialVersion,
  key bom_header.EngineeringChangeDocument                           as EngineeringChangeDocument,
  key bom_header.Material                                            as Material,
  key bom_header.Plant                                               as Plant,
      bom_header.BillOfMaterialHeaderUUID                            as BillOfMaterialHeaderUUID,
      bom_header.BillOfMaterialVariantUsage                          as BillOfMaterialVariantUsage,
      @ObjectModel.editableFieldFor: 'EngineeringChangeDocument'
      bom_header.EngineeringChangeDocument                           as EngineeringChangeDocForEdit,
      bom_header.IsMultipleBOMAlt                                    as IsMultipleBOMAlt,
      bom_header.BOMHeaderInternalChangeCount                        as BOMHeaderInternalChangeCount,
      bom_header.BOMUsagePriority                                    as BOMUsagePriority,
      bom_header.BillOfMaterialAuthsnGrp                             as BillOfMaterialAuthsnGrp,
      bom_header.BOMVersionStatus                                    as BOMVersionStatus,
      bom_header.IsVersionBillOfMaterial                             as IsVersionBillOfMaterial,
      bom_header.IsLatestBOMVersion                                  as IsLatestBOMVersion,
      bom_header.IsConfiguredMaterial                                as IsConfiguredMaterial,
      cast ( bom_header.BOMTechnicalType as tetyp_d preserving type) as BOMTechnicalType,
      bom_header.BOMGroup                                            as BOMGroup,
      bom_header.BOMHeaderText                                       as BOMHeaderText,
      bom_header.BOMAlternativeText                                  as BOMAlternativeText,
      bom_header.BillOfMaterialStatus                                as BillOfMaterialStatus,
      bom_header.HeaderValidityStartDate                             as HeaderValidityStartDate,
      bom_header.HeaderValidityEndDate                               as HeaderValidityEndDate,
      bom_header.ChgToEngineeringChgDocument                         as ChgToEngineeringChgDocument,
      bom_header.IsMarkedForDeletion                                 as IsMarkedForDeletion,
      bom_header.IsALE                                               as IsALE,
      @Semantics.quantity.unitOfMeasure: 'BOMHeaderBaseUnit'
      bom_header.MatFromLotSizeQuantity                              as MatFromLotSizeQuantity,
      @Semantics.quantity.unitOfMeasure: 'BOMHeaderBaseUnit'
      bom_header.MaterialToLotSizeQuantity                           as MaterialToLotSizeQuantity,
      @ObjectModel.foreignKey.association: '_UnitOfMeasure'
//      @Semantics.unitOfMeasure: true

      bom_header.BOMHeaderBaseUnit                                   as BOMHeaderBaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BOMHeaderBaseUnit'
      bom_header.BOMHeaderQuantityInBaseUnit                         as BOMHeaderQuantityInBaseUnit,
      bom_header.RecordCreationDate                                  as RecordCreationDate,
      bom_header.LastChangeDate                                      as LastChangeDate,
      bom_header.CreatedByUser                                       as CreatedByUser,
      bom_header.LastChangedByUser                                   as LastChangedByUser,
      bom_header.BOMIsToBeDeleted                                    as BOMIsToBeDeleted,
      bom_header.DocumentIsCreatedByCAD                              as DocumentIsCreatedByCAD,
      bom_header.LaboratoryOrDesignOffice,
      bom_header.BOMAssetNtwkHndovrIsRelevant,
      case
        when bom_header.LastChangeDateTime = fltp_to_dec( 0.0 as timestampl )
        then fltp_to_dec( 19720401000000.0 as timestampl )
        else bom_header.LastChangeDateTime
      end                                                            as LastChangeDateTime,
      _ProductDescription.ProductDescription                         as ProductDescription,
      _Plant.PlantName                                               as PlantName,
      //Version BOM

      cast(' ' as abap.char( 4 ) )                                   as SelectedBillOfMaterialVersion,
      cast(' '  as abap.char( 255 ) )                                as BillOfMaterialHdrDetailsText,
      // @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]

      _BillOfMaterialItem,
      _UnitOfMeasure,
      _BillOfMaterialUsage

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIALBOM",
"I_PLANT",
"I_PRODUCTDESCRIPTION"
],
"ASSOCIATED":
[
"I_BILLOFMATERIALUSAGE",
"I_UNITOFMEASURE",
"R_BILLOFMATERIALITEMTP"
],
"BASE":
[
"I_MATERIALBOM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/