P_SI_AddNonResidentDocument

DDL: P_SI_ADDNONRESIDENTDOCUMENT Type: view_entity COMPOSITE Package: GLO_FIN_IS_SI_CBR_BST

Merged additional documents added by RAP - SI BST

P_SI_AddNonResidentDocument is a Composite CDS View that provides data about "Merged additional documents added by RAP - SI BST" in SAP S/4HANA. It reads from 1 data source (P_SI_GLLineItmBPAssignment) and exposes 7 fields with key fields CompanyCode, FiscalYear, AccountingDocument. It has 1 association to related views. Part of development package GLO_FIN_IS_SI_CBR_BST.

Data Sources (1)

SourceAliasJoin Type
P_SI_GLLineItmBPAssignment GLRawData from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_Country intcn GLRawData.Country = intcn.Country and GLRawData.SI_IntlInstitutionCode is initial

Annotations (9)

NameValueLevelField
EndUserText.label Merged additional documents added by RAP - SI BST view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Metadata.ignorePropagatedAnnotations true view
VDM.private true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_SI_GLLineItmBPAssignment CompanyCode
KEY FiscalYear P_SI_GLLineItmBPAssignment FiscalYear
KEY AccountingDocument P_SI_GLLineItmBPAssignment AccountingDocument
Customer
Supplier
Country
DocumentIsAdded
@EndUserText.label: 'Merged additional documents added by RAP - SI BST'
@VDM.viewType: #COMPOSITE
//@Metadata.allowExtensions:true

//@Analytics: { dataCategory: #CUBE }

@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.dataClass: #MIXED
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
//@Analytics.internalName:#LOCAL

@Metadata.ignorePropagatedAnnotations: true
@VDM.private:true

define view entity P_SI_AddNonResidentDocument as select from  P_SI_GLLineItmBPAssignment as GLRawData
association [1..1] to  I_Country                   as intcn       on //GLRawData.SI_IntlInstitutionCode is initial

                                                                    GLRawData.Country      = intcn.Country and GLRawData.SI_IntlInstitutionCode is initial 
{
key GLRawData.CompanyCode,
key GLRawData.FiscalYear,
key GLRawData.AccountingDocument,
//in casse there are more BP in one document - should not happen but in might - also ensures that manually added document from union will not be dulpicated

max( GLRawData.Customer ) as Customer,
max( GLRawData.Supplier ) as Supplier,
//needs to have the same country in case of duplucate documents - chose to be max - might cause possible issue when adding document manually -> then the country needs to be changes for each item of the document in FIORI application in preprocessing of the report

max( coalesce( intcn.CountryThreeDigitISOCode, GLRawData.SI_IntlInstitutionCode ) ) as Country,
//if document is manually added and then the BP is maintained additionally, we would have a duplicate as there would be document coming from both parts of union. In this case we take the info from the maintained BP

min ( GLRawData.DocumentIsAdded ) as DocumentIsAdded
}
group by GLRawData.CompanyCode, GLRawData.FiscalYear, GLRawData.AccountingDocument