You are on page 1of 3

@AbapCatalog.

sqlViewName: 'ZIJANBUPA'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Business Partner Interface Dimension basic'
@VDM.viewType: #BASIC
@Analytics: { dataCategory: #DIMENSION,
dataExtraction.enabled: true }
@ObjectModel.representativeKey:'BpKey'
define view ZI_JAN_BUPA as select from snwd_bpa as bp
association[1] to snwd_ad as _Addresses on
$projection.AddressId = _Addresses.node_key {
key node_key as BpKey,
bp_role as BpRole,
bp_id as BpId,
company_name as CompanyName,
address_guid as AddressId,
_Addresses
}

@AbapCatalog.sqlViewName: 'ZIJANPTEXT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'product Text View, Interface Basic, Text'
@Analytics : { dataExtraction.enabled: true }
@ObjectModel.dataCategory: #TEXT
@VDM.viewType: #BASIC
@ObjectModel.representativeKey:'NodeKey'
define view ZI_JAN_PROD_TEXT as select from snwd_texts {
key node_key as NodeKey,
parent_key as ParentKey,
language as Language,
text as ProductText
}

@AbapCatalog.sqlViewName: 'ZIJANPRODUCT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Interface Basic Dimension data view'
@VDM.viewType: #BASIC
@Analytics: {dataCategory: #DIMENSION, dataExtraction.enabled: true}
@ObjectModel.representativeKey:'NodeKey'
define view ZI_JAN_PRODUCT as select from snwd_pd as Product
association[1..*] to ZI_JAN_PROD_TEXT as _productText on
$projection.DescriptionId = _productText.ParentKey
association[1] to ZI_JAN_BUPA as _Supplier on
$projection.SupplierId = _Supplier.BpKey
{
key node_key as NodeKey,
product_id as ProductId,
type_code as Type,
category as Category,
desc_guid as DescriptionId,
supplier_guid as SupplierId,
_productText,
_Supplier
}

@AbapCatalog.sqlViewName: 'ZIJANINVOICEH'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Buyer of the invoice with header'
@VDM.viewType: #BASIC
@Analytics.dataCategory: #FACT
@ObjectModel.representativeKey:'NodeKey'
define view ZI_JAN_INVHEADER as select from snwd_so_inv_head as head
association[1] to ZI_JAN_BUPA as _Buyer on
$projection.BuyerId = _Buyer.BpKey
{
key node_key as NodeKey,
buyer_guid as BuyerId,
_Buyer
}

@AbapCatalog.sqlViewName: 'ZIJANINVOICESF'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Invoices Interface Basic Facts'

@VDM.viewType: #BASIC
@Analytics.dataCategory: #FACT
@Analytics.dataExtraction.enabled: true
@ObjectModel.representativeKey: 'NodeKey'
define view ZI_JAN_INVOICES as select from snwd_so_inv_item as Items
association[1] to ZI_JAN_PRODUCT as _Product on
$projection.ProductId = _Product.NodeKey
association[1] to ZI_JAN_INVHEADER as _Header on
$projection.ParentKey = _Header.NodeKey
{
key node_key as NodeKey,
parent_key as ParentKey,
gross_amount as GrossAmount,
currency_code as CurrencyCode,
product_guid as ProductId,
_Product,
_Header
}

@AbapCatalog.sqlViewName: 'ZICOINVOICE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Composite View, Interface for Invoice'
@VDM.viewType: #COMPOSITE
@Analytics.dataExtraction.enabled: true
@Analytics.dataCategory: #CUBE
define view ZI_JAN_INVOICE_CO as select from ZI_JAN_INVOICES {
//ZI_JAN_INVOICES
key NodeKey,
key _Header._Buyer.CompanyName as Customer,
key _Product._productText[1:Language = 'E'].ProductText as Product,
key _Header._Buyer._Addresses.country as Country,
@Semantics.amount.currencyCode: 'CurrencyCode'
@DefaultAggregation: #SUM
GrossAmount,
@Semantics.currencyCode: true
CurrencyCode

You might also like