0% found this document useful (0 votes)
5 views2 pages

04ConsumptionCDSViewsSourceCode-2

The document defines two consumption views in an SAP system: 'ZCSALESHDR1' for sales headers and 'ZCSALESITM1' for sales items. Both views allow for create, update, and delete operations and include associations to link sales items to their respective headers. Key fields such as document date, net value, and item value are included, with currency semantics specified for relevant amounts.

Uploaded by

Deb Dutta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

04ConsumptionCDSViewsSourceCode-2

The document defines two consumption views in an SAP system: 'ZCSALESHDR1' for sales headers and 'ZCSALESITM1' for sales items. Both views allow for create, update, and delete operations and include associations to link sales items to their respective headers. Key fields such as document date, net value, and item value are included, with currency semantics specified for relevant amounts.

Uploaded by

Deb Dutta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Consumption CDS Views

@AbapCatalog.sqlViewName: 'ZCSALESHDR1'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Header consumption view'

@VDM.viewType: #CONSUMPTION
@ObjectModel.createEnabled: true
@ObjectModel.updateEnabled: true
@ObjectModel.deleteEnabled: true
@ObjectModel.compositionRoot: true
@ObjectModel.transactionalProcessingDelegated: true

define view zc_sales_hdr1 as select from zi_saleshdrtp


association [1..*] to zc_sales_itm1 as _salesitm on
$projection.sd_key = _salesitm.parentkey
{

key sd_key,
doc_date,
name,
catg,
order_type,
order_reason,
@Semantics.amount.currencyCode: 'currency'
net_value,
currency,

@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_salesitm
}
@AbapCatalog.sqlViewName: 'ZCSALESITM1'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'consumption view for sales item'

@VDM.viewType: #CONSUMPTION
@ObjectModel.createEnabled: true
@ObjectModel.updateEnabled: true
@ObjectModel.deleteEnabled: true
@ObjectModel.transactionalProcessingDelegated: true

define view zc_sales_itm1 as select from zi_salesitemtp


association [1..1] to zc_sales_hdr1 as _saleshdr on
$projection.parentkey = _saleshdr.sd_key
{
key itm_key,
parentkey,
mat_num,
mat_grp,
itm_type,
@Semantics.amount.currencyCode: 'currency'
item_value,
currency,
@ObjectModel.association.type:
[#TO_COMPOSITION_ROOT,#TO_COMPOSITION_PARENT]
_saleshdr
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy