P_CustReturnSubsqntProcg
P_CustReturnSubsqntProcg is a Composite CDS View in SAP S/4HANA.
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | PCRTSBSQPRCG | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (2)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CustomerReturn | ReturnItem | CustomerReturn | |
| KEY | CustomerReturnItem | ReturnItem | CustomerReturnItem |
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PCRTSBSQPRCG'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_CustReturnSubsqntProcg
as select distinct from I_CustomerReturnItemEnhanced as ReturnItem
left outer to many join I_AdvncdRetsMgmtProcExecuted as CustRetSubsqntDoc on ReturnItem.RetsMgmtProcess = CustRetSubsqntDoc.RetsMgmtProcess
and ReturnItem.CustomerReturnItem = CustRetSubsqntDoc.RetsMgmtProcessItem
//and CustRetSubsqntDoc.RetsMgmtProcItmQtySplit = '000'
and ( CustRetSubsqntDoc.ReturnsDocumentType = '02' //Returns Purchase Order
or CustRetSubsqntDoc.ReturnsDocumentType = '03' //Inbound Delivery for rSTO
or CustRetSubsqntDoc.ReturnsDocumentType = '05' //Inspection/Logistical Follow-up
or CustRetSubsqntDoc.ReturnsDocumentType = '06' //Outbound Delivery
or CustRetSubsqntDoc.ReturnsDocumentType = '09' //Credit Memo Request
or CustRetSubsqntDoc.ReturnsDocumentType = '10' //Credit Memo
or CustRetSubsqntDoc.ReturnsDocumentType = '11' //Inbound Delivery for Return Order
or CustRetSubsqntDoc.ReturnsDocumentType = '12' //Cross-Company Credit Memo
or CustRetSubsqntDoc.ReturnsDocumentType = '13' //Subsequent Delivery Free of Charge
or CustRetSubsqntDoc.ReturnsDocumentType = '14' //Replacement Purchase Order
or CustRetSubsqntDoc.ReturnsDocumentType = '15' //Inbound Delivery from Supplier
or CustRetSubsqntDoc.ReturnsDocumentType = '22' //Pro Forma Invoice
or CustRetSubsqntDoc.ReturnsDocumentType = '23' //Inbound Delivery for Late GR
)
{
key ReturnItem.CustomerReturn,
key ReturnItem.CustomerReturnItem,
case when CustRetSubsqntDoc.ReturnsDocument is not initial
//when return item generated follow-up documents
then 'C' // Released
else
case when ReturnItem.CustRetItmFollowUpActivity = '0008'
and ReturnItem.RetsMgmtProcessingBlock is initial
then 'C' // Released
else 'A' // Not Release
end
end as CustRetReleaseStatus
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADVNCDRETSMGMTPROCEXECUTED",
"I_CUSTOMERRETURNITEMENHANCED"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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