P_ARProcessFlowServiceContract
Service Contract Attributes
P_ARProcessFlowServiceContract is a Composite CDS View that provides data about "Service Contract Attributes" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocument) and exposes 40 fields with key field ServiceDocument. It has 4 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_ServiceDocument | I_ServiceDocument | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_ServiceDocument | _ServiceDocument | $projection.ServiceDocument = _ServiceDocument.ServiceDocument and $projection.ServiceObjectType = _ServiceDocument.ServiceObjectType |
| [0..*] | I_ServiceDocumentItem | _Item | $projection.ServiceDocument = _Item.ServiceDocument and $projection.ServiceObjectType = _Item.ServiceObjectType |
| [1..1] | I_UserContactCard | _UserContactCard | $projection.ServiceDocumentCreatedByUser = _UserContactCard.ContactCardID |
| [0..1] | I_SDDocumentCategory | _SDDocumentCategory | _SDDocumentCategory.SDDocumentCategory = 'CSCT' |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| EndUserText.label | Service Contract Attributes | view |
Fields (40)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ServiceDocument | I_ServiceDocument | ServiceDocument | Transaction ID |
| ServiceObjectType | I_ServiceDocument | ServiceObjectType | Object Type | |
| ServiceDocumentStatus | I_ServiceDocument | ServiceDocumentStatus | Unique Custom Status | |
| ServiceDocNetAmount | I_ServiceDocument | ServiceDocNetAmount | Net Value | |
| ServiceDocGrossAmount | I_ServiceDocument | ServiceDocGrossAmount | Gross Value | |
| TransactionCurrency | I_ServiceDocument | TransactionCurrency | Transaction Currency | |
| ServiceDocumentCreationDate | ||||
| SoldToParty | I_ServiceDocument | SoldToParty | Sold-to Party | |
| PurchaseOrderByCustomer | I_ServiceDocument | PurchaseOrderByCustomer | Purchase Order Number | |
| FullName | _UserContactCard | FullName | Name | |
| SalesOrganization | I_ServiceDocument | SalesOrganization | Sales Organization | |
| DistributionChannel | I_ServiceDocument | DistributionChannel | RefDistCh-Cust/Mat. | |
| DistributionChannelName | ||||
| Division | I_ServiceDocument | Division | Internal Division ID | |
| ServiceDocumentStatusName | ||||
| CustomerName | ||||
| CustomerFullName | ||||
| SalesOrganizationName | ||||
| DivisionName | ||||
| PaymentTermsName | ||||
| Divisionastxt_vtrberasSalesArea | ||||
| DivisionName1astxt_vtrberasSalesAreaDesc | ||||
| ServiceDocumentCreatedByUser | I_ServiceDocument | ServiceDocumentCreatedByUser | Created By | |
| ServiceDocCreationDateTime | I_ServiceDocument | ServiceDocCreationDateTime | Created On | |
| ServiceContractStartDate | ||||
| ServiceContractEndDate | ||||
| PaymentTerms | I_ServiceDocument | PaymentTerms | Pyt Terms | |
| SDDocumentCategory | _SDDocumentCategory | SDDocumentCategory | Document Cat. | |
| SDDocumentCategoryName | ||||
| _ServiceDocument | _ServiceDocument | |||
| _SoldToParty | _SoldToParty | |||
| _SoldToPartyToCustomer | _SoldToPartyToCustomer | |||
| _TransactionCurrency | _TransactionCurrency | |||
| _PaymentTerms | _PaymentTerms | |||
| _SrvcDocLifecycleStatus | _SrvcDocLifecycleStatus | |||
| _ServiceObjType | _ServiceObjType | |||
| _SalesOrganization | _SalesOrganization | |||
| _DistributionChannel | _DistributionChannel | |||
| _Division | _Division | |||
| _Item | _Item |
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 P_ARProcessFlowServiceContract.
-- 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 P_ARProcessFlowServiceContract AS
SELECT
I_ServiceDocument.ServiceDocument AS ServiceDocument,
I_ServiceDocument.ServiceObjectType AS ServiceObjectType,
I_ServiceDocument.ServiceDocumentStatus AS ServiceDocumentStatus,
I_ServiceDocument.ServiceDocNetAmount AS ServiceDocNetAmount,
I_ServiceDocument.ServiceDocGrossAmount AS ServiceDocGrossAmount,
I_ServiceDocument.TransactionCurrency AS TransactionCurrency,
tstmp_to_dats(I_ServiceDocument.ServiceDocCreationDateTime , $session.user_timezone, $session.client, 'NULL') AS ServiceDocumentCreationDate,
I_ServiceDocument.SoldToParty AS SoldToParty,
I_ServiceDocument.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
_UserContactCard.FullName AS FullName,
I_ServiceDocument.SalesOrganization AS SalesOrganization,
I_ServiceDocument.DistributionChannel AS DistributionChannel,
I_ServiceDocument._DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName AS DistributionChannelName,
I_ServiceDocument.Division AS Division,
I_ServiceDocument._ServiceDocumentStatus._ServiceDocumentStatusText[1:Language = $session.system_language].ServiceDocumentStatusName AS ServiceDocumentStatusName,
I_ServiceDocument._SoldToParty.BusinessPartnerName AS CustomerName,
I_ServiceDocument._SoldToParty.BusinessPartnerFullName AS CustomerFullName,
I_ServiceDocument._SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName AS SalesOrganizationName,
I_ServiceDocument._Division._Text[1:Language = $session.system_language].DivisionName AS DivisionName,
I_ServiceDocument._PaymentTerms._Text[1:Language = $session.system_language].PaymentTermsName AS PaymentTermsName,
cast( concat( concat( concat( concat( I_ServiceDocument.SalesOrganization, '/'), I_ServiceDocument.DistributionChannel), '/'), I_ServiceDocument.Division) as txt_vtrber ) as SalesArea AS Divisionastxt_vtrberasSalesArea,
cast( concat_with_space( concat( concat_with_space( concat( I_ServiceDocument._SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName, ','), cast(I_ServiceDocument._DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName as vtxtk), 1), ','), I_ServiceDocument._Division._Text[1:Language = $session.system_language].DivisionName, 1) as txt_vtrber ) as SalesAreaDesc AS DivisionName1astxt_vtrberasSalesAreaDesc,
I_ServiceDocument.ServiceDocumentCreatedByUser AS ServiceDocumentCreatedByUser,
I_ServiceDocument.ServiceDocCreationDateTime AS ServiceDocCreationDateTime,
tstmp_to_dats(I_ServiceDocument.ServiceContractStartDateTime, $session.user_timezone, $session.client, 'NULL') AS ServiceContractStartDate,
tstmp_to_dats(I_ServiceDocument.ServiceContractEndDateTime, $session.user_timezone, $session.client, 'NULL') AS ServiceContractEndDate,
I_ServiceDocument.PaymentTerms AS PaymentTerms,
_SDDocumentCategory.SDDocumentCategory AS SDDocumentCategory,
_SDDocumentCategory._Text[1:Language = $session.system_language].SDDocumentCategoryName AS SDDocumentCategoryName
FROM I_ServiceDocument
LEFT OUTER JOIN I_ServiceDocument AS _ServiceDocument ON ServiceDocument = _ServiceDocument.ServiceDocument AND ServiceObjectType = _ServiceDocument.ServiceObjectType -- association [1..1]
LEFT OUTER JOIN I_ServiceDocumentItem AS _Item ON ServiceDocument = _Item.ServiceDocument AND ServiceObjectType = _Item.ServiceObjectType -- association [0..*]
LEFT OUTER JOIN I_UserContactCard AS _UserContactCard ON ServiceDocumentCreatedByUser = _UserContactCard.ContactCardID -- association [1..1]
LEFT OUTER JOIN I_SDDocumentCategory AS _SDDocumentCategory ON _SDDocumentCategory.SDDocumentCategory = 'CSCT' -- 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