A_Opportunity
Opportunity
A_Opportunity is a Composite CDS View that provides data about "Opportunity" in SAP S/4HANA. It reads from 1 data source (I_PresalesDocumentEnhcd) and exposes 32 fields with key field Opportunity. It has 9 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PresalesDocumentEnhcd | Opportunity | from |
Associations (9)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | A_OpportunityItem | _Item | $projection.Opportunity = _Item.Opportunity |
| [0..*] | A_OpportunityPersonResp | _PersonResponsible | $projection.Opportunity = _PersonResponsible.Opportunity |
| [0..*] | A_OpportunitySalesRep | _SalesRepresentative | $projection.Opportunity = _SalesRepresentative.Opportunity |
| [1] | I_PresalesDocumentPredecessor | _ReferenceLead | $projection.OpportunityUUID = _ReferenceLead.PresalesDocumentUUID and _ReferenceLead.PresalesDocPrdcssrBusObjType = 'BUS2000108' |
| [0..*] | A_OpportunityFUPServiceOrder | _ServiceOrder | $projection.Opportunity = _ServiceOrder.Opportunity |
| [0..*] | A_OpportunityFUPSalesOrder | _SalesOrder | $projection.Opportunity = _SalesOrder.Opportunity |
| [0..*] | A_OpportunityFUPSalesQuotation | _SalesQuotation | $projection.Opportunity = _SalesQuotation.Opportunity |
| [0..*] | A_OpportunityText | _Text | $projection.Opportunity = _Text.Opportunity |
| [0..1] | E_PresalesDocument | _Extension | _Extension.BusinessObjectType = 'BUS2000111' and $projection.Opportunity = _Extension.PresalesDocument |
Annotations (15)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Opportunity | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| AbapCatalog.sqlViewName | AOPPTY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.representativeKey | Opportunity | view | |
| ObjectModel.createEnabled | true | view | |
| ObjectModel.updateEnabled | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (32)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Opportunity | PresalesDocument | ||
| OpportunityProcessType | PresalesDocumentProcessType | |||
| OpportunityDescription | PresalesDocumentDescription | |||
| OpportunityUUID | PresalesDocumentUUID | |||
| OpportunityOrigin | PresalesDocumentOrigin | |||
| OpportunityPriority | PresalesDocumentPriority | |||
| OpportunityGroup | PresalesDocumentGroup | |||
| OpportunityStatus | OpportunityStatus | |||
| OpportunityStartDate | OpportunityStartDate | |||
| OpportunityEndDate | OpportunityEndDate | |||
| ChanceOfSuccessPercent | ChanceOfSuccessPercent | |||
| CurrentSalesStage | CurrentSalesStage | |||
| PostingDate | PostingDate | Posting Date for GR | ||
| DistributionChannel | DistributionChannel | RefDistCh-Cust/Mat. | ||
| Division | Division | Internal Division ID | ||
| SalesOrganizationOrgUnitID | SalesOrganizationOrgUnitID | |||
| SalesOfficeOrgUnitID | SalesOfficeOrgUnitID | |||
| SalesGroupOrgUnitID | SalesGroupOrgUnitID | |||
| ResponsibleSalesOrganization | ResponsibleSalesOrganization | |||
| ServiceOrganization | ServiceOrganization | |||
| ContactPerson | ContactPerson | Contact Person Key | ||
| Prospect | Prospect | |||
| PayerParty | PayerParty | Payer | ||
| Competitor | Competitor | Competitor | ||
| ReferenceLead | ||||
| _Item | _Item | |||
| _PersonResponsible | _PersonResponsible | |||
| _SalesRepresentative | _SalesRepresentative | |||
| _ServiceOrder | _ServiceOrder | |||
| _SalesOrder | _SalesOrder | |||
| _SalesQuotation | _SalesQuotation | |||
| _Text | _Text |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view A_Opportunity.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
CREATE VIEW A_Opportunity AS
SELECT
PresalesDocument AS Opportunity,
PresalesDocumentProcessType AS OpportunityProcessType,
PresalesDocumentDescription AS OpportunityDescription,
PresalesDocumentUUID AS OpportunityUUID,
PresalesDocumentOrigin AS OpportunityOrigin,
PresalesDocumentPriority AS OpportunityPriority,
PresalesDocumentGroup AS OpportunityGroup,
OpportunityStatus,
OpportunityStartDate,
OpportunityEndDate,
ChanceOfSuccessPercent,
CurrentSalesStage,
PostingDate,
DistributionChannel,
Division,
SalesOrganizationOrgUnitID,
SalesOfficeOrgUnitID,
SalesGroupOrgUnitID,
ResponsibleSalesOrganization,
ServiceOrganization,
ContactPerson,
Prospect,
PayerParty,
Competitor,
_ReferenceLead._PresalesDoc.PresalesDocument AS ReferenceLead
FROM I_PresalesDocumentEnhcd AS Opportunity
LEFT OUTER JOIN A_OpportunityItem AS _Item ON Opportunity = _Item.Opportunity -- association [0..*]
LEFT OUTER JOIN A_OpportunityPersonResp AS _PersonResponsible ON Opportunity = _PersonResponsible.Opportunity -- association [0..*]
LEFT OUTER JOIN A_OpportunitySalesRep AS _SalesRepresentative ON Opportunity = _SalesRepresentative.Opportunity -- association [0..*]
LEFT OUTER JOIN I_PresalesDocumentPredecessor AS _ReferenceLead ON OpportunityUUID = _ReferenceLead.PresalesDocumentUUID AND _ReferenceLead.PresalesDocPrdcssrBusObjType = 'BUS2000108' -- association [1]
LEFT OUTER JOIN A_OpportunityFUPServiceOrder AS _ServiceOrder ON Opportunity = _ServiceOrder.Opportunity -- association [0..*]
LEFT OUTER JOIN A_OpportunityFUPSalesOrder AS _SalesOrder ON Opportunity = _SalesOrder.Opportunity -- association [0..*]
LEFT OUTER JOIN A_OpportunityFUPSalesQuotation AS _SalesQuotation ON Opportunity = _SalesQuotation.Opportunity -- association [0..*]
LEFT OUTER JOIN A_OpportunityText AS _Text ON Opportunity = _Text.Opportunity -- association [0..*]
LEFT OUTER JOIN E_PresalesDocument AS _Extension ON _Extension.BusinessObjectType = 'BUS2000111' AND Opportunity = _Extension.PresalesDocument -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA