Atpc_Cds_Resb
CDS View on RESB Table for ATP
Atpc_Cds_Resb is a CDS View that provides data about "CDS View on RESB Table for ATP" in SAP S/4HANA. It reads from 1 data source (resb) and exposes 30 fields. Part of development package ATP_PAC.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| resb | resb | from |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ATPC_RESB | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| EndUserText.label | CDS View on RESB Table for ATP | view |
Fields (30)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| mandt | mandt | |||
| delnr | rsnum | |||
| delps | rspos | |||
| rsart | rsart | |||
| caseshkzgwhenSthen1else2endassort1 | ||||
| matnr | matnr | |||
| werks | werks | |||
| lgort | lgort | |||
| charg | charg | |||
| sgt_rcat | sgt_rcat | |||
| sgt_scat | sgt_scat | |||
| casewhensobkzKthenelsesobkzendassobkz | ||||
| kdauf | kdauf | |||
| kdpos | kdpos | |||
| pspel | pspel | |||
| lifnr | lifnr | |||
| atpdate | bdter | |||
| shkzg | shkzg | |||
| bdmng | bdmng | |||
| enmng | enmng | |||
| vmeng | vmeng | |||
| baugr | baugr | |||
| del12 | aufnr | |||
| bdart | bdart | |||
| xwaok | xwaok | |||
| umwrk | umwrk | |||
| umlgo | umlgo | |||
| umsok | umsok | |||
| crm_item_id | crm_item_id | |||
| autyp | aufk | autyp |
@AbapCatalog.sqlViewName: 'ATPC_RESB'
@ObjectModel.usageType: {
serviceQuality: #X,
sizeCategory: #XXL,
dataClass: #MIXED
}
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'CDS View on RESB Table for ATP'
define view Atpc_Cds_Resb
as select from resb
association[0..1] to aufk on resb.aufnr = aufk.aufnr
{
mandt as mandt,
// key the single select
rsnum as delnr,
rspos as delps,
cast( case rsart when '1' then '1'
else '0' end
as atp_subitem ) as subitem, // for PP discontinuation rsart can be 1, for all other scenarios it should be space
rsart as rsart,
case when bdart = 'AR' and xwaok = 'X' then 'WR'
else bdart end as atpcat, // remove after select in read_own_data has been changed to read only with delnr delps
case shkzg when 'S' then '1'
else '2' end as sort1, // remove if not used
case bdart when 'AR' then '04'
when 'BB' then '08'
when 'MR' then '04'
when 'SB' then '07'
when 'UR' then '08' end as sort2, // remove if not used
// key for mass select
matnr as matnr,
werks as werks,
lgort as lgort,
charg as charg,
sgt_rcat as sgt_rcat,
sgt_scat as sgt_scat,
// sobkz
case when sobkz = 'K' then ''
else sobkz
end as sobkz,
// sskey
case when sobkz = 'E' then kdauf
when sobkz = 'Q' then pspel
when sobkz = 'O' then lifnr
else ''
end as sskey,
case when sobkz = 'E' then kdpos
else ''
end as sskey_ext,
kdauf as kdauf,
kdpos as kdpos,
pspel as pspel,
lifnr as lifnr,
// ATP Data
bdter as atpdate,
shkzg as shkzg,
bdmng as bdmng,
enmng as enmng,
vmeng as vmeng,
// Display
baugr as baugr,
aufnr as del12,
// for check against customizing / masterdata
bdart as bdart,
xwaok as xwaok,
umwrk as umwrk,
umlgo as umlgo,
umsok as umsok,
crm_item_id as crm_item_id,
aufk.autyp as autyp,
// for check with Quantity Distribution
// Latest Requirement date-
// SBTER(Latest Requirement date) to be populated only in below cases,
// -- if BDTER(Requirements date) not equal SBTER(Latest Requirements date)
// -- VERTI(Distribution key) is not initial
case when ( bdter <> sbter ) and verti is not initial
then sbter
else cast( '00000000' as sbter )
end as sbter,
//Distribution Key
// VERI(Distribution key) to be populated only in below cases,
// -- if BDTER(Requirements date) not equal SBTER(Latest Requirements date)
case when ( bdter <> sbter ) then verti
else ''
end as verti
}
where
resb.xloek = ''
and resb.kzear = ''
and
resb.bdmng > resb.enmng
and resb.dumps = ''
and resb.no_disp = ''
and
resb.txtps = ''
and resb.schgt = ''
and resb.dbskz = ''
and(
resb.vorab is null
or resb.vorab = ''
);
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