P_CndnContrConditionItem
P_CndnContrConditionItem is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (konh, konp) and exposes 31 fields with key fields ConditionContract, ConditionRecord.
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PWCBCCKONP | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_ALLOWED | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| ClientHandling.type | #INHERITED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ConditionContract | konh | ccnum | |
| KEY | ConditionRecord | konp | knumh | |
| ConditionType | konp | kschl | ||
| ConditionTextID | konp | knumt | ||
| PricingScaleType | konp | stfkz | ||
| PricingScaleBasis | konp | kzbzg | ||
| ConditionScaleQuantity | konp | kstbm | ||
| ConditionScaleQuantityUnit | konp | konms | ||
| ConditionScaleAmount | konp | kstbw | ||
| ConditionScaleAmountCurrency | konp | konws | ||
| ConditionCalculationType | konp | krech | ||
| ConditionRateValueUnit | konp | konwa | ||
| ConditionQuantity | konp | kpein | ||
| ConditionQuantityUnit | konp | kmein | ||
| ConditionToBaseQtyNmrtr | konp | kumza | ||
| ConditionToBaseQtyDnmntr | konp | kumne | ||
| BaseUnit | konp | meins | ||
| ConditionLowerLimit | konp | mxwrt | ||
| ConditionUpperLimit | konp | gkwrt | ||
| ConditionAlternativeCurrency | konp | kwaeh | ||
| ConditionExclusion | konp | kznep | ||
| ConditionIsDeleted | konp | loevm_ko | ||
| AdditionalValueDays | konp | valtg | ||
| PaymentTerms | konp | zterm | ||
| CndnMaxNumberOfSalesOrders | konp | anzauf | ||
| MinimumConditionBasisValue | konp | mikbas | ||
| MaximumConditionBasisValue | konp | mxkbas | ||
| MaximumConditionAmount | konp | komxwrt | ||
| IncrementalScale | konp | klf_stg | ||
| PricingScaleLine | konp | klf_kal | ||
| ConditionReleaseStatus | konp | kfrst |
@AbapCatalog: {
sqlViewName: 'PWCBCCKONP',
compiler.compareFilter: true,
preserveKey: true
}
//@EndUserText.label: 'Condition Item'
@AccessControl: {
authorizationCheck: #NOT_ALLOWED,
personalData.blocking: #NOT_REQUIRED
}
@ClientHandling: {
type: #INHERITED,
algorithm: #SESSION_VARIABLE
}
@VDM: {
private: true,
viewType: #BASIC
}
@Metadata: {
ignorePropagatedAnnotations: true
}
// Taking P_PrcgCndnRecordItem as reference
define view P_CndnContrConditionItem
as select from konp
inner join konh as konh on konp.knumh = konh.knumh
{
key konh.ccnum as ConditionContract,
key konp.knumh as ConditionRecord,
konp.kschl as ConditionType,
konp.knumt as ConditionTextID,
konp.stfkz as PricingScaleType,
konp.kzbzg as PricingScaleBasis,
konp.kstbm as ConditionScaleQuantity,
konp.konms as ConditionScaleQuantityUnit,
konp.kstbw as ConditionScaleAmount,
konp.konws as ConditionScaleAmountCurrency,
konp.krech as ConditionCalculationType,
// case konp.konwa
// when '%' then
// cast(
// decimal_shift(
// amount => konp.kbetr,
// currency => cast(
// case krech
// when 'A' then '3 ' //if_pricing_calculation_types=>c_percentage
// when 'H' then '3 ' //if_pricing_calculation_types=>c_percentage_in_hundreds
// when 'I' then '3 ' //if_pricing_calculation_types=>c_percentage_travel_exp
// when 'K' then '3 ' //if_pricing_calculation_types=>c_per_mille_in_thousands
// when 'J' then '3 ' //if_pricing_calculation_types=>c_per_mille 'AHIKJ'
// when 'W' then '6 ' //if_pricing_calculation_types=>c_percentage_6
// when 'V' then '5 ' //if_pricing_calculation_types=>c_quantity_adjustment
// else '2 '
// end as konwa ),
// error_handling => 'KEEP_UNCONVERTED' ) as vfprc_element_amount )
// else
// cast(
// decimal_shift(
// amount => konp.kbetr,
// currency => konp.konwa,
// error_handling => 'KEEP_UNCONVERTED' ) as vfprc_element_amount )
// end as ConditionRateValue,
konp.konwa as ConditionRateValueUnit,
konp.kpein as ConditionQuantity,
konp.kmein as ConditionQuantityUnit,
konp.kumza as ConditionToBaseQtyNmrtr,
konp.kumne as ConditionToBaseQtyDnmntr,
konp.meins as BaseUnit,
konp.mxwrt as ConditionLowerLimit,
konp.gkwrt as ConditionUpperLimit,
konp.kwaeh as ConditionAlternativeCurrency,
konp.kznep as ConditionExclusion,
konp.loevm_ko as ConditionIsDeleted,
konp.valtg as AdditionalValueDays,
case valdt
when '' then cast ('00000000' as valdt )
else valdt
end as FixedValueDate,
konp.zterm as PaymentTerms,
konp.anzauf as CndnMaxNumberOfSalesOrders,
konp.mikbas as MinimumConditionBasisValue,
konp.mxkbas as MaximumConditionBasisValue,
konp.komxwrt as MaximumConditionAmount,
konp.klf_stg as IncrementalScale,
konp.klf_kal as PricingScaleLine,
konp.kfrst as ConditionReleaseStatus
}
where
konh.ccnum <> ''
and konp.kopos = '01'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"KONH",
"KONP"
],
"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