A_CustomerReturn
Returns Order Header
A_CustomerReturn is a Composite CDS View that provides data about "Returns Order Header" in SAP S/4HANA. It reads from 1 data source (I_CustomerReturnEnhanced) and exposes 64 fields with key field CustomerReturn. It has 7 associations to related views. Part of development package ODATA_SD_RETURN_V2.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CustomerReturnEnhanced | CustomerReturn | from |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | A_CustomerReturnItem | _Item | _Item.CustomerReturn = $projection.CustomerReturn |
| [0..*] | A_CustomerReturnPartner | _Partner | _Partner.CustomerReturn = $projection.CustomerReturn |
| [0..*] | A_CustomerReturnPrcgElmnt | _PricingElement | _PricingElement.CustomerReturn = $projection.CustomerReturn |
| [0..*] | A_CustomerReturnText | _Text | _Text.CustomerReturn = $projection.CustomerReturn |
| [0..*] | A_CustomerReturnRelatedObject | _RelatedObject | _RelatedObject.CustomerReturn = $projection.CustomerReturn |
| [0..1] | A_CustomerReturnOverviewStatus | _CustomerReturnOverviewStatus | $projection.RetsMgmtProcess = _CustomerReturnOverviewStatus.RetsMgmtProcess |
| [0..1] | E_SalesDocumentBasic | _Extension | $projection.CustomerReturn = _Extension.SalesDocument |
Annotations (15)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Returns Order Header | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| AbapCatalog.sqlViewName | ACUSTOMERRETURN | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.representativeKey | CustomerReturn | view | |
| ObjectModel.createEnabled | true | view | |
| ObjectModel.updateEnabled | true | view | |
| ObjectModel.deleteEnabled | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (64)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CustomerReturn | CustomerReturn | ||
| CustomerReturnType | CustomerReturnType | |||
| SalesOrganization | SalesOrganization | |||
| DistributionChannel | DistributionChannel | |||
| OrganizationDivision | OrganizationDivision | |||
| SalesGroup | SalesGroup | |||
| SalesOffice | SalesOffice | |||
| SalesDistrict | SalesDistrict | |||
| SoldToParty | SoldToParty | |||
| CreationDate | CreationDate | |||
| CreatedByUser | CreatedByUser | |||
| LastChangeDate | LastChangeDate | |||
| SenderBusinessSystemName | SenderBusinessSystemName | |||
| PurchaseOrderByCustomer | PurchaseOrderByCustomer | |||
| CustomerPurchaseOrderType | CustomerPurchaseOrderType | |||
| CustPurOrdTypeByShipToParty | CustPurOrdTypeByShipToParty | |||
| CustomerPurchaseOrderDate | CustomerPurchaseOrderDate | |||
| PurchaseOrderByShipToParty | PurchaseOrderByShipToParty | |||
| CorrespncExternalReference | CorrespncExternalReference | |||
| CorrespncExtRefByShipToParty | CorrespncExtRefByShipToParty | |||
| CustomerReturnDate | CustomerReturnDate | |||
| TotalNetAmount | TotalNetAmount | |||
| TransactionCurrency | TransactionCurrency | |||
| SDDocumentReason | SDDocumentReason | |||
| PricingDate | PricingDate | |||
| RequestedDeliveryDate | RequestedDeliveryDate | |||
| ShippingType | ShippingType | |||
| HeaderBillingBlockReason | HeaderBillingBlockReason | |||
| DeliveryBlockReason | DeliveryBlockReason | |||
| IncotermsClassification | IncotermsClassification | |||
| IncotermsTransferLocation | IncotermsTransferLocation | |||
| IncotermsLocation1 | IncotermsLocation1 | |||
| IncotermsLocation2 | IncotermsLocation2 | |||
| IncotermsVersion | IncotermsVersion | |||
| CustomerPaymentTerms | CustomerPaymentTerms | |||
| PaymentMethod | PaymentMethod | |||
| CustomerTaxClassification1 | CustomerTaxClassification1 | |||
| CustomerTaxClassification2 | CustomerTaxClassification2 | |||
| CustomerTaxClassification3 | CustomerTaxClassification3 | |||
| CustomerTaxClassification4 | CustomerTaxClassification4 | |||
| CustomerTaxClassification5 | CustomerTaxClassification5 | |||
| CustomerTaxClassification6 | CustomerTaxClassification6 | |||
| CustomerTaxClassification7 | CustomerTaxClassification7 | |||
| CustomerTaxClassification8 | CustomerTaxClassification8 | |||
| CustomerTaxClassification9 | CustomerTaxClassification9 | |||
| RetsMgmtProcess | RetsMgmtProcess | |||
| ReferenceSDDocument | ReferenceSDDocument | |||
| ReferenceSDDocumentCategory | ReferenceSDDocumentCategory | |||
| AccountingDocExternalReference | AccountingDocExternalReference | |||
| AssignmentReference | AssignmentReference | |||
| CustomerReturnApprovalReason | CustomerReturnApprovalReason | |||
| SalesDocApprovalStatus | SalesDocApprovalStatus | |||
| RetsMgmtLogProcgStatus | ||||
| RetsMgmtCompnProcgStatus | ||||
| RetsMgmtProcessingStatus | ||||
| OverallSDProcessStatus | OverallSDProcessStatus | |||
| TotalCreditCheckStatus | TotalCreditCheckStatus | |||
| OverallSDDocumentRejectionSts | OverallSDDocumentRejectionSts | |||
| _Item | _Item | |||
| _Partner | _Partner | |||
| _PricingElement | _PricingElement | |||
| _Text | _Text | |||
| _RelatedObject | _RelatedObject | |||
| _CustomerReturnOverviewStatus | _CustomerReturnOverviewStatus |
@ClientHandling.algorithm:#SESSION_VARIABLE
@EndUserText.label: 'Returns Order Header'
@VDM: {
viewType: #COMPOSITE,
lifecycle.contract.type: #PUBLIC_REMOTE_API
}
@AbapCatalog: {
sqlViewName: 'ACUSTOMERRETURN',
compiler.compareFilter: true
}
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
representativeKey: 'CustomerReturn',
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #XL
}
}
@Metadata.ignorePropagatedAnnotations: true
define view A_CustomerReturn
as select from I_CustomerReturnEnhanced as CustomerReturn
association [0..*] to A_CustomerReturnItem as _Item on _Item.CustomerReturn = $projection.CustomerReturn
association [0..*] to A_CustomerReturnPartner as _Partner on _Partner.CustomerReturn = $projection.CustomerReturn
association [0..*] to A_CustomerReturnPrcgElmnt as _PricingElement on _PricingElement.CustomerReturn = $projection.CustomerReturn
association [0..*] to A_CustomerReturnText as _Text on _Text.CustomerReturn = $projection.CustomerReturn
association [0..*] to A_CustomerReturnRelatedObject as _RelatedObject on _RelatedObject.CustomerReturn = $projection.CustomerReturn
association [0..1] to A_CustomerReturnOverviewStatus as _CustomerReturnOverviewStatus on $projection.RetsMgmtProcess = _CustomerReturnOverviewStatus.RetsMgmtProcess
//Extensibility
association [0..1] to E_SalesDocumentBasic as _Extension on $projection.CustomerReturn = _Extension.SalesDocument
{
key CustomerReturn,
CustomerReturnType,
SalesOrganization,
DistributionChannel,
OrganizationDivision,
SalesGroup,
SalesOffice,
SalesDistrict,
SoldToParty,
@ObjectModel.readOnly: true
CreationDate,
@ObjectModel.readOnly: true
CreatedByUser,
@ObjectModel.readOnly: true
LastChangeDate,
@ObjectModel.readOnly:true
SenderBusinessSystemName,
@ObjectModel.readOnly: true
case tstmp_is_valid(LastChangeDateTime)
when 0 then cast( dats_tims_to_tstmp( CreationDate, CreationTime, 'UTC', $session.client, 'NULL' ) as timestampl )
else LastChangeDateTime
end as LastChangeDateTime,
PurchaseOrderByCustomer,
@ObjectModel.sapObjectNodeTypeReference: 'PurchaseOrderTypeByCustomer'
CustomerPurchaseOrderType,
CustPurOrdTypeByShipToParty,
CustomerPurchaseOrderDate,
PurchaseOrderByShipToParty,
CorrespncExternalReference,
CorrespncExtRefByShipToParty,
CustomerReturnDate,
@ObjectModel.readOnly: true
@Semantics.amount.currencyCode: 'TransactionCurrency'
TotalNetAmount,
@Semantics.currencyCode: true
@ObjectModel.sapObjectNodeTypeReference: 'Currency'
TransactionCurrency,
@ObjectModel.sapObjectNodeTypeReference: 'SalesDocumentReason'
SDDocumentReason,
PricingDate,
RequestedDeliveryDate,
ShippingType,
@ObjectModel.sapObjectNodeTypeReference: 'BillingBlockReason'
HeaderBillingBlockReason,
DeliveryBlockReason,
@ObjectModel.sapObjectNodeTypeReference: 'IncotermsClassification'
IncotermsClassification,
IncotermsTransferLocation,
IncotermsLocation1,
IncotermsLocation2,
@ObjectModel.sapObjectNodeTypeReference: 'IncotermsVersion'
IncotermsVersion,
CustomerPaymentTerms,
PaymentMethod,
//Tax Classfication
CustomerTaxClassification1,
CustomerTaxClassification2,
CustomerTaxClassification3,
CustomerTaxClassification4,
CustomerTaxClassification5,
CustomerTaxClassification6,
CustomerTaxClassification7,
CustomerTaxClassification8,
CustomerTaxClassification9,
@ObjectModel.readOnly: true
RetsMgmtProcess,
ReferenceSDDocument,
@ObjectModel.readOnly: true
ReferenceSDDocumentCategory,
AccountingDocExternalReference,
AssignmentReference,
CustomerReturnApprovalReason,
@ObjectModel.sapObjectNodeTypeReference: 'SalesDocApprovalStatus'
SalesDocApprovalStatus,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CUSTOMER_RETURN_OPG_VE'
@ObjectModel.filter.transformedBy: 'ABAP:CL_CUSTOMER_RETURN_SADL_FILTER'
@ObjectModel.sort.transformedBy: 'ABAP:CL_CUSTOMER_RETURN_SADL_FILTER'
cast('' as return_log_procg_status) as RetsMgmtLogProcgStatus,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CUSTOMER_RETURN_OPG_VE'
@ObjectModel.filter.transformedBy: 'ABAP:CL_CUSTOMER_RETURN_SADL_FILTER'
@ObjectModel.sort.transformedBy: 'ABAP:CL_CUSTOMER_RETURN_SADL_FILTER'
cast('' as msr_fin_status) as RetsMgmtCompnProcgStatus,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CUSTOMER_RETURN_OPG_VE'
@ObjectModel.filter.transformedBy: 'ABAP:CL_CUSTOMER_RETURN_SADL_FILTER'
@ObjectModel.sort.transformedBy: 'ABAP:CL_CUSTOMER_RETURN_SADL_FILTER'
cast('' as msr_proc_status) as RetsMgmtProcessingStatus,
@ObjectModel.readOnly: true
@ObjectModel.sapObjectNodeTypeReference: 'OverallSDProcessStatus'
OverallSDProcessStatus,
@ObjectModel.readOnly: true
@ObjectModel.sapObjectNodeTypeReference: 'TotalCreditCheckStatus'
TotalCreditCheckStatus,
@ObjectModel.readOnly: true
@ObjectModel.sapObjectNodeTypeReference: 'OverallSDDocumentRejectionSts'
OverallSDDocumentRejectionSts,
// Expose own associations
_Item,
_Partner,
_PricingElement,
_Text,
_RelatedObject,
// @Consumption.filter.hidden: true
_CustomerReturnOverviewStatus
}
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