-
-
Save ilyakaznacheev/3aefa1006b5ec48c9c693704ca0bec36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AbapCatalog.sqlViewName: 'ZTEST_VSHOP' | |
@AbapCatalog.compiler.compareFilter: true | |
@AccessControl.authorizationCheck: #CHECK | |
@VDM.viewType: #BASIC | |
@EndUserText.label: 'Shop Info' | |
define view Ztest_I_Shop | |
as select from ztest_shop | |
association [*] to Ztest_I_ShopText as _Text on _Text.ShopID = $projection.ShopID | |
association [*] to Ztest_I_ShopProducts as _Products on _Products.ShopID = $projection.ShopID | |
association [*] to Ztest_I_ShopSalesHistory as _SalesHistory on _SalesHistory.ShopID = $projection.ShopID | |
{ | |
@ObjectModel.text.association: '_Text' | |
@ObjectModel.foreignKey.association:[ '_Products', '_SalesHistory'] | |
key shop_id as ShopID, | |
@Semantics.address.label: true | |
address as Address, | |
_Text, | |
_Products, | |
_SalesHistory | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AbapCatalog.sqlViewName: 'ZTEST_VSHOPPROD' | |
@AbapCatalog.compiler.compareFilter: true | |
@AccessControl.authorizationCheck: #CHECK | |
@VDM.viewType: #BASIC | |
@EndUserText.label: 'Products in shop' | |
define view Ztest_I_ShopProducts | |
as select from ztest_shop_prod | |
association [1..1] to I_Material as _Material on _Material.Material = $projection.Material | |
association [1..1] to Ztest_I_Shop as _Shop on _Shop.ShopID = $projection.ShopID | |
{ | |
@ObjectModel.foreignKey.association: '_Shop' | |
key shop_id as ShopID, | |
@ObjectModel.foreignKey.association: '_Material' | |
key matnr as Material, | |
@Semantics.amount.currencyCode: 'Currency' | |
price as Price, | |
@Semantics.currencyCode: true | |
currency as Currency, | |
amount as AvailableAmount, | |
_Material, | |
_Shop | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AbapCatalog.sqlViewName: 'ZTEST_VSHOPHIST' | |
@AbapCatalog.compiler.compareFilter: true | |
@AccessControl.authorizationCheck: #CHECK | |
@VDM.viewType: #BASIC | |
@EndUserText.label: 'Sales history of the shop' | |
define view Ztest_I_ShopSalesHistory | |
as select from ztest_shop_hist | |
association [1..1] to I_Material as _Material on _Material.Material = $projection.Material | |
association [1..1] to Ztest_I_Shop as _Shop on _Shop.ShopID = $projection.ShopID | |
{ | |
@ObjectModel.foreignKey.association: '_Shop' | |
key shop_id as ShopID, | |
@ObjectModel.foreignKey.association: '_Material' | |
key matnr as Material, | |
key timestamp as OperationDateTime, | |
amount as Amount, | |
_Material, | |
_Shop | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AbapCatalog.sqlViewName: 'ZTEST_VSHOPTEXT' | |
@AbapCatalog.compiler.compareFilter: true | |
@AccessControl.authorizationCheck: #CHECK | |
@VDM.viewType: #BASIC | |
@EndUserText.label: 'Shop Texts' | |
@ObjectModel.dataCategory: #TEXT | |
@ObjectModel.representativeKey: 'ShopID' | |
define view Ztest_I_ShopText | |
as select from ztest_shop_t | |
{ | |
@Semantics.language: true | |
key spras as Language, | |
key shop_id as ShopID, | |
@Semantics.text: true | |
text as Text | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment