P_SupAssgmtPreview
P_SupAssgmtPreview is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (arun_preview) and exposes 28 fields.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| arun_preview | arun_preview | from |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #BASIC | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.private | true | view | |
| AbapCatalog.sqlViewName | PSUPASSGMTPREV | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view |
Fields (28)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| ARunID | arunid | |||
| Plant | plant | |||
| Material | material | |||
| RequirementType | req_ind | |||
| SupplyAssignmentStatus | arun_status | |||
| AssignedSupplyType | stock_source | |||
| char12endasSupplyNumber | ||||
| char5endasSupplyItem | ||||
| char4endasSupplyScheduleLine | ||||
| Batch | batch | |||
| StorageLocation | storage_location | |||
| AssignedQuantityInBaseUnit | alloc_qty | |||
| PreviewFixedAssignedQtyInBsUnt | ||||
| PreviewReservedAssgdQtyInBsUnt | ||||
| PreviewOnHoldAssgdQtyInBsUnt | ||||
| PreviewRdyForReleaseQtyInBsUnt | ||||
| BaseUnitOfMeasure | material_baseunit | |||
| RequestedDate | requested_date | |||
| ProductAvailabilityDate | material_avail_date | |||
| SupplyDeliveryDate | ||||
| NumberOfDays | ||||
| SupplyAssignmentRunMode | arun_mode | |||
| CreationDateTime | creation_time | |||
| LastChangeByUser | changed_by | |||
| MRPMaterialAvailabilityDate | mat_avail_date_mrp | |||
| RequirementSegment | req_segment | |||
| StockSegment | stk_segment | |||
| PRODALLOCATIONUUID |
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
viewType: #BASIC
}
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
@VDM.private: true
@AbapCatalog: {
sqlViewName: 'PSUPASSGMTPREV',
compiler.compareFilter: true
}
@ObjectModel: {
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #B,
sizeCategory: #XXL
}
}
define view P_SupAssgmtPreview
as select from arun_preview
{
arunid as ARunID,
plant as Plant,
material as Material,
req_ind as RequirementType,
arun_status as SupplyAssignmentStatus,
case req_ind
when 'VC' then salesdoc_num
when 'VI' then salesdoc_num
when 'VG' then salesdoc_num
when 'U1' then purchdoc_num
when 'BB' then reserv_num
when 'AR' then reserv_num
else LPAD('',10,'0')
end as RequirementDocumentNumber,
case req_ind
when 'VC' then salesdoc_item
when 'VI' then salesdoc_item
when 'VG' then salesdoc_item
when 'U1' then LPAD(purchdoc_item,6,'0')
when 'BB' then LPAD(reserv_item,6,'0')
when 'AR' then LPAD(reserv_item,6,'0')
else LPAD('',6,'0')
end as RequirementDocumentItem,
case req_ind
when 'VC' then 'Sales Orders'
when 'VI' then 'Free of Charge'
when 'VG' then 'Contracts'
when 'U1' then 'Stock Transport Orders'
when 'BB' then 'Subcon. PO components'
when 'AR' then 'Reservations'
when 'PL' then 'Product Allocation'
else ''
end as AssignedDemandTypeName,
stock_source as AssignedSupplyType,
case stock_source
when 'B' then cast(purchord_num as abap.char(12))
when 'F' then cast(prodord_num as abap.char(12))
when 'L' then cast(purchord_num as abap.char(12))
when 'P' then cast(plnum as abap.char(12))
when 'A' then cast(purchord_num as abap.char(12))
else cast('' as abap.char(12))
end as SupplyNumber,
case stock_source
when 'B' then cast(purchord_item as abap.char(5))
when 'F' then cast(prodord_item as abap.char(5))
when 'A' then cast(purchord_item as abap.char(5))
when 'L' then cast(purchord_item as abap.char(5))
else cast('' as abap.char(5))
end as SupplyItem,
case stock_source
when 'B' then cast(purchord_sch as abap.char(4))
when 'L' then cast(confirmation_no as abap.char(4))
else cast('' as abap.char(4))
end as SupplyScheduleLine,
case stock_source
when 'B' then 'Purchase Orders'
when 'C' then 'Batch Stock'
when 'F' then 'Production Orders'
when 'L' then 'Shipping Notifications'
when 'S' then 'Non-Batch Stock'
when 'A' then 'Purchase Requisitions'
when 'P' then 'Planned Orders'
end as AssignedSupplyTypeName,
batch as Batch,
storage_location as StorageLocation,
alloc_qty as AssignedQuantityInBaseUnit,
case when arun_status = 'F' then alloc_qty else 0 end as PreviewFixedAssignedQtyInBsUnt,
case when arun_status = 'R' then alloc_qty else 0 end as PreviewReservedAssgdQtyInBsUnt,
case when arun_status = 'H' then alloc_qty else 0 end as PreviewOnHoldAssgdQtyInBsUnt,
case when arun_status = 'O' then alloc_qty else 0 end as PreviewRdyForReleaseQtyInBsUnt,
material_baseunit as BaseUnitOfMeasure,
requested_date as RequestedDate,
material_avail_date as ProductAvailabilityDate,
case when stock_source = 'S' or stock_source = 'C' then cast( $session.system_date as abap.dats ) else delivery_date_po end as SupplyDeliveryDate,
case when stock_source = 'S' or stock_source = 'C' then 0 else DATS_DAYS_BETWEEN( material_avail_date, delivery_date_po ) end as NumberOfDays,
arun_mode as SupplyAssignmentRunMode,
creation_time as CreationDateTime,
changed_by as LastChangeByUser,
mat_avail_date_mrp as MRPMaterialAvailabilityDate,
req_segment as RequirementSegment,
stk_segment as StockSegment,
cast('' as abap.char(255)) as PRODALLOCATIONUUID
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ARUN_PREVIEW"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA