I_BusinessPartnerRating
Rating of Business Partner
I_BusinessPartnerRating is a Basic CDS View (Dimension) that provides data about "Rating of Business Partner" in SAP S/4HANA. It reads from 1 data source (bp1012) and exposes 16 fields with key fields BusinessPartner, BusinessPartnerRatingProcedure, BPRatingValidityEndDate. It has 5 associations to related views. It is exposed through 1 OData service (BPFINANCIALSERVICES). Part of development package FS_BP_CDS_BP1012.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| bp1012 | bp1012 | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1] | I_BusinessPartner | _BusinessPartner | $projection.BusinessPartner = _BusinessPartner.BusinessPartner |
| [0..1] | I_BPFinancialServicesExtn | _BPFinancialServicesExtn | $projection.BusinessPartner = _BPFinancialServicesExtn.BusinessPartner |
| [0..1] | I_BPRatingTrend | _BPRatingTrend | $projection.BusinessPartnerRatingTrend = _BPRatingTrend.BusinessPartnerRatingTrend |
| [0..1] | I_BPRatingProcedure | _BPRatingProcedure | $projection.BusinessPartnerRatingProcedure = _BPRatingProcedure.BusinessPartnerRatingProcedure |
| [0..1] | I_BPRatingProcedureGrade | _BPRatingProcedureGrade | $projection.BusinessPartnerRatingProcedure = _BPRatingProcedureGrade.BusinessPartnerRatingProcedure and $projection.BusinessPartnerRatingGrade = _BPRatingProcedureGrade.BusinessPartnerRatingGrade |
Annotations (19)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IBPRATING | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.buffering.status | #NOT_ALLOWED | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| ObjectModel.representativeKey | BusinessPartner | view | |
| ObjectModel.sapObjectNodeType.name | BusinessPartnerRating | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_DIMENSION | view | |
| Analytics.dataExtraction.enabled | true | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| Analytics.internalName | #LOCAL | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| Metadata.allowExtensions | true | view | |
| VDM.viewType | #BASIC | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Rating of Business Partner | view |
OData Services (1)
| Service | Binding | Version | Contract | Release |
|---|---|---|---|---|
| BPFINANCIALSERVICES | UI_BPFINANCIALSERVICES_02 | V2 | C1 | NOT_RELEASED |
Fields (16)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | BusinessPartner | bp1012 | partner | |
| KEY | BusinessPartnerRatingProcedure | bp1012 | grade_method | |
| KEY | BPRatingValidityEndDate | bp1012 | date_to | |
| BusinessPartnerRatingGrade | bp1012 | grade | ||
| BusinessPartnerRatingTrend | bp1012 | tendency | ||
| BPRatingValidityStartDate | bp1012 | date_from | ||
| BPRatingCreationDate | bp1012 | date_when | ||
| BusinessPartnerRatingComment | bp1012 | text | ||
| BusinessPartnerRatingIsAllowed | bp1012 | flg_permit | ||
| BPRatingLongComment | bp1012 | longtext | ||
| BusinessPartnerRatingKeyDate | ||||
| _BPRatingProcedure | _BPRatingProcedure | |||
| _BPRatingProcedureGrade | _BPRatingProcedureGrade | |||
| _BPRatingTrend | _BPRatingTrend | |||
| _BusinessPartner | _BusinessPartner | |||
| _BPFinancialServicesExtn | _BPFinancialServicesExtn |
@AbapCatalog: { sqlViewName: 'IBPRATING',
compiler.compareFilter: true,
buffering.status: #NOT_ALLOWED
}
@AccessControl: {authorizationCheck: #MANDATORY,
personalData.blocking: #REQUIRED,
personalData.blockingIndicator: [ '_BusinessPartner.IsBusinessPurposeCompleted' ]
}
@ObjectModel: { representativeKey: 'BusinessPartner',
sapObjectNodeType.name: 'BusinessPartnerRating',
usageType: { dataClass: #MASTER,
serviceQuality: #B,
sizeCategory: #XXL
},
supportedCapabilities: [ #ANALYTICAL_DIMENSION,
#CDS_MODELING_DATA_SOURCE,
#CDS_MODELING_ASSOCIATION_TARGET,
#SQL_DATA_SOURCE,
#EXTRACTION_DATA_SOURCE ],
modelingPattern: #ANALYTICAL_DIMENSION
}
@Analytics: { dataExtraction.enabled: true,
dataCategory: #DIMENSION,
internalName: #LOCAL
}
@Metadata: { ignorePropagatedAnnotations: true, // For C1-Release
allowExtensions: true
}
@Consumption.dbHints: [ 'USE_HEX_PLAN' ]
@VDM.viewType: #BASIC
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Rating of Business Partner'
/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ] } */
define view I_BusinessPartnerRating
as select from bp1012
association [1] to I_BusinessPartner as _BusinessPartner on $projection.BusinessPartner = _BusinessPartner.BusinessPartner // <--- to inherit authorizations in DCL
association [0..1] to I_BPFinancialServicesExtn as _BPFinancialServicesExtn on $projection.BusinessPartner = _BPFinancialServicesExtn.BusinessPartner // <--- to inherit authorizations in DCL
association [0..1] to I_BPRatingTrend as _BPRatingTrend on $projection.BusinessPartnerRatingTrend = _BPRatingTrend.BusinessPartnerRatingTrend
association [0..1] to I_BPRatingProcedure as _BPRatingProcedure on $projection.BusinessPartnerRatingProcedure = _BPRatingProcedure.BusinessPartnerRatingProcedure
association [0..1] to I_BPRatingProcedureGrade as _BPRatingProcedureGrade on $projection.BusinessPartnerRatingProcedure = _BPRatingProcedureGrade.BusinessPartnerRatingProcedure
and $projection.BusinessPartnerRatingGrade = _BPRatingProcedureGrade.BusinessPartnerRatingGrade
{
key bp1012.partner as BusinessPartner,
@ObjectModel.foreignKey.association: '_BPRatingProcedure'
key bp1012.grade_method as BusinessPartnerRatingProcedure,
@Semantics.businessDate.to: true
key bp1012.date_to as BPRatingValidityEndDate,
bp1012.grade as BusinessPartnerRatingGrade,
bp1012.tendency as BusinessPartnerRatingTrend,
@Semantics.businessDate.from: true
bp1012.date_from as BPRatingValidityStartDate,
bp1012.date_when as BPRatingCreationDate,
bp1012.text as BusinessPartnerRatingComment,
bp1012.flg_permit as BusinessPartnerRatingIsAllowed,
bp1012.longtext as BPRatingLongComment,
// Calculation of IsRatingValidToday:
// If current date (today) is between bp1012.date_from and bp1012.date_to then IsRatingValidToday = true.
cast ( case
when bp1012.date_to >= tstmp_to_dats( tstmp_current_utctimestamp(), abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL')
and bp1012.date_from <=tstmp_to_dats( tstmp_current_utctimestamp(), abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL')
then 'X'
else ''
end as bp_rat_valid preserving type) as BPRatingIsValidOnKeyDate,
cast ( tstmp_to_dats( tstmp_current_utctimestamp(), abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL') as bp_rat_key_date preserving type) as BusinessPartnerRatingKeyDate,
// Calculation of IsRatingExpired:
// (Expiry days - Permitted Period) = Protected Since, which is the number of days since the rating is protected
// A negative value means the rating is not protected yet.
// Example:
// bp1012.date_to = 01.01.2018 and today is 01.01.2019 and Grade Protection Period is 300 days
// ( 01.01.2019 - 01.01.2018) - 300 = 365 - 300 = 65 --> Rating is proteced since 65 days -> User needs corresponding authorization if SACF is active
cast ( case left(cast(( dats_days_between(bp1012.date_to, tstmp_to_dats( tstmp_current_utctimestamp(), abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ))
- cast(_BPRatingProcedure.BPRatingStandardAccessDays as abap.int4) ) as abap.char( 16 )),1)
when '-' then '' // date_to in the future
when '0' then '' // date_to = today
else 'X' // date_to in the past and lower than threshold of grade method
end as bp_rat_expired preserving type) as BusinessPartnerRatingIsExpired,
_BPRatingProcedure,
_BPRatingProcedureGrade,
_BPRatingTrend,
_BusinessPartner,
_BPFinancialServicesExtn
}
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