I_SUPDMNDALLDOCPURORDCOMPBSC

CDS View

Basic View for Sub Contracting Purchase Order Components

I_SUPDMNDALLDOCPURORDCOMPBSC is a CDS View in S/4HANA. Basic View for Sub Contracting Purchase Order Components. It contains 28 fields. 7 CDS views read from this table.

CDS Views using this table (7)

ViewTypeJoinVDMDescription
I_SupDmndAllDocDemand view union_all COMPOSITE View for Demand of All Documents
I_SupDmndAllDocPurOrdComp view from COMPOSITE View for Sub Contracting Purchase Order Components
I_SupDmndAllDocPurOrdComp1C view inner COMPOSITE Cube View for Sub Contracting PO Components Assignments
I_SupDmndAllDocPurOrdCompC view from COMPOSITE Cube View for Sub Contracting Purchase Order Components
I_SupDmndOvwDemand view union_all COMPOSITE SDO Demand Basic View
P_ARunDmndMntrSubcontrgDeliver view from CONSUMPTION P view for subcontracting delivery
P_SupDmndMntrOvwDemand view union_all COMPOSITE

Fields (28)

KeyField CDS FieldsUsed in Views
KEY ProductAvailabilityDate ProductAvailabilityDate 3
KEY RequestedDate RequestedDate 3
KEY RequirementDocumentItem RequirementDocumentItem 3
KEY RequirementDocumentNumber RequirementDocumentNumber 3
KEY RequirementType RequirementType 3
BaseUnit BaseUnit 3
CompanyCode CompanyCode 1
ConfirmedRqmtQtyInBaseUnit ConfirmedRqmtQtyInBaseUnit 1
CrossPlantConfigurableProduct CrossPlantConfigurableProduct 3
Customer Customer 1
DeliveredQuantityInBaseUnit DeliveredQuantityInBaseUnit 1
Division Division 1
IsInternalBatchManaged IsInternalBatchManaged 1
Material Material 3
MaterialGroup MaterialGroup 3
OrderType OrderType 1
Plant Plant 3
ProdAvailabilityCheckGroup ProdAvailabilityCheckGroup 1
PurchasingDocument PurchasingDocument 1
RequestedDeliveryDate RequestedDeliveryDate 2
RequestedRqmtQtyInBaseUnit RequestedRqmtQtyInBaseUnit 1
RequirementSegment RequirementSegment 1
ReservationItem ReservationItem 1
SalesOrder SalesOrder 1
SalesOrderItem SalesOrderItem 1
SegmentationStrategy SegmentationStrategy 1
SegmentationStrategyScope SegmentationStrategyScope 1
StorageLocation StorageLocation 3
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
  viewType: #BASIC,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
  authorizationCheck: #NOT_REQUIRED,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@AbapCatalog: {
  sqlViewName: 'ISUPDMNDADCMP1B',
  compiler.compareFilter: true
 }
@ObjectModel: {
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #X,
     sizeCategory:   #XXL
   }
}
@EndUserText.label: 'Basic View for Sub Contracting Purchase Order Components'
define view I_SupDmndAllDocPurOrdCompBsc
  as select from resb as resb
  association [1..1] to I_SupDmndMaterialPlant   as _SupDmndMaterialPlant on  resb.matnr = _SupDmndMaterialPlant.Material
                                                                          and resb.werks = _SupDmndMaterialPlant.Plant
                                                                          and not(
    _SupDmndMaterialPlant.IsInternalBatchManaged                                         = ''
    and _SupDmndMaterialPlant.MaterialIsBatchManaged                                     = 'X'
  )
  association [1..1] to I_PurchaseOrderItem      as _PurchaseOrderItem    on  resb.ebeln = _PurchaseOrderItem.PurchaseOrder
                                                                          and resb.ebelp = _PurchaseOrderItem.PurchaseOrderItem
  association [1..1] to I_Supplier               as _Supplier             on  resb.lifnr = _Supplier.Supplier
  association [0..1] to P_SupDmndAllDocDelivComp as _SupDmndAllDocDel     on  resb.rsnum = _SupDmndAllDocDel.Reservation
                                                                          and resb.rspos = _SupDmndAllDocDel.ReservationItem

{
  resb.rsnum                                         as RequirementDocumentNumber,
  lpad(resb.rspos,6,'0')                             as RequirementDocumentItem,
  //  'BB'                                              as RequirementType,

  //  resb.rsart                                        as RecordType,

  resb.rspos                                         as ReservationItem,
  resb.bdart                                         as RequirementType,
  resb.bdter                                         as RequestedDate,
  resb.bdter                                         as ProductAvailabilityDate,
  resb.bdter                                         as RequestedDeliveryDate,
  resb.bdmng                                         as RequestedRqmtQtyInBaseUnit, //OrderedQuantity

  resb.bdmng                                         as ConfirmedRqmtQtyInBaseUnit,
  coalesce( _SupDmndAllDocDel.DeliveredQuantity, 0 ) as DeliveredQuantityInBaseUnit,
  resb.enmng                                         as WithdrawnQuantity, //RequestedRqmtQtyInBaseUnit

  resb.bdmng - resb.enmng                            as OpenQuantity,
  resb.meins                                         as BaseUnit,
  resb.matnr                                         as Material,
  _SupDmndMaterialPlant.MaterialGroup,
  resb.werks                                         as Plant,
  resb.bdart                                         as OrderType,
  _SupDmndMaterialPlant.CrossPlantConfigurableProduct,
  _SupDmndMaterialPlant.MaterialType,
  resb.sgt_rcat                                      as RequirementSegment,
  resb.lgort                                         as StorageLocation,
  _PurchaseOrderItem.Customer                        as Customer,
  _PurchaseOrderItem.CompanyCode                     as CompanyCode,
  resb.kdauf                                         as SalesOrder,
  resb.kdpos                                         as SalesOrderItem,
  resb.ebeln                                         as PurchasingDocument,
  resb.ebelp                                         as PurchasingDocumentItem,
  resb.lifnr                                         as Supplier,
  resb.charg                                         as Batch,
  _SupDmndMaterialPlant.SegmentationStrategy,
  _SupDmndMaterialPlant.SegmentationStrategyScope,
  _SupDmndMaterialPlant.ProdAvailabilityCheckGroup,
  _SupDmndMaterialPlant.LoadingGroup,
  _SupDmndMaterialPlant.Division                     as Division,
  cast( '1' as arun_bskz )                           as SupAssgmtSource,
  _Supplier,

  cast('' as vsbed)                                  as ShippingCondition,
  _SupDmndMaterialPlant.IsInternalBatchManaged
}
where
        resb.xloek =  '' -- deleted item should not be selected
  and   resb.kzkup =  '' -- coproduct should not be selected
  and   resb.kzear =  '' -- final issue for this reservation
  and(
        resb.ebeln <> ''
    and resb.ebelp <> '00000'
  ) -- SubContracting Purchase Order
  //  and   not(

  //      resb.bdart     =  'BB'

  //      and resb.bdmng <= resb.enmng

  //    )

  and   resb.bdart =  'BB'
  and   resb.bdmng >= resb.enmng
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEORDERITEM",
"I_SUPDMNDMATERIALPLANT",
"P_SUPDMNDALLDOCDELIVCOMP",
"RESB"
],
"ASSOCIATED":
[
"I_PURCHASEORDERITEM",
"I_SUPDMNDMATERIALPLANT",
"I_SUPPLIER",
"P_SUPDMNDALLDOCDELIVCOMP"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/