P_ARPromisesToPayOvw
P_ARPromisesToPayOvw is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_PromiseToPay0, P_DaysSalesOutstandingCalMonth) and exposes 16 fields with key field case_guid.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_PromiseToPay0 | _prom | inner |
| P_DaysSalesOutstandingCalMonth | CM | from |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_StartDate | sydate | |
| P_KeyDate | sydate | |
| P_DisplayCurrency | vdm_v_display_currency | |
| P_ExchangeRateType | kurst_curr |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PARPROM2PAYOVW | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (16)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | case_guid | case_guid | ||
| CompanyCode | CompanyCode | |||
| Customer | Customer | |||
| DisplayCurrency | ||||
| DaysSinceCreation | ||||
| trueasPromisedAmountInDspCrcy | ||||
| trueasPaidAmountInDspCrcy | ||||
| SourceCurrency | SourceCurrency | |||
| Status | Status | |||
| DueDate | DueDate | |||
| CreationDate | CreationDate | |||
| CalendarYear | CalendarYear | |||
| CalendarMonth | CalendarMonth | |||
| YearMonth | YearMonth | |||
| FirstDayOfMonth | FirstDayOfMonth | |||
| LastDayOfMonth | LastDayOfMonth |
@AbapCatalog.sqlViewName: 'PARPROM2PAYOVW'
@VDM.viewType: #COMPOSITE
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_ARPromisesToPayOvw
with parameters
P_StartDate : sydate,
P_KeyDate : sydate,
P_DisplayCurrency : vdm_v_display_currency,
P_ExchangeRateType : kurst_curr
as select from P_DaysSalesOutstandingCalMonth as CM
inner join P_PromiseToPay0 as _prom on case_guid is null
or case_guid is not null
{
key case_guid,
CompanyCode,
Customer,
:P_DisplayCurrency as DisplayCurrency,
DATS_DAYS_BETWEEN(CreationDate,:P_KeyDate) as DaysSinceCreation,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
currency_conversion(
amount => PromisedAmount,
source_currency => SourceCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_KeyDate,
exchange_rate_type => :P_ExchangeRateType,
error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as PromisedAmountInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
currency_conversion(
amount => PaidAmount,
source_currency => SourceCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_KeyDate,
exchange_rate_type => :P_ExchangeRateType,
error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as PaidAmountInDspCrcy,
SourceCurrency,
Status,
DueDate,
CreationDate,
CalendarYear,
CalendarMonth,
YearMonth,
FirstDayOfMonth,
LastDayOfMonth
}
where
DueDate >= :P_StartDate
and DueDate <= :P_KeyDate
and DueDate <= LastDayOfMonth
and DueDate >= FirstDayOfMonth
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_DAYSSALESOUTSTANDINGCALMONTH",
"P_PROMISETOPAY0"
],
"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