@AbapCatalog.sqlViewName: 'ZI_V_OBJHEADER'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.type: #INHERITED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Object Header'
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #BASIC
@ObjectModel.representativeKey: 'ObjectID'
define view ZI_ObjHeader
as select from zobjhdr
association [0..1] to I_BusinessPartner as _SoldToParty on $projection.SoldToParty = _SoldToParty.BusinessPartner
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_SalesOrganization as _SalesOrganization on $projection.SalesOrganization = _SalesOrganization.SalesOrganization
association [0..1] to I_DistributionChannel as _DistributionChannel on $projection.DistributionChannel = _DistributionChannel.DistributionChannel
association [0..1] to I_Division as _Division on $projection.Division = _Division.Division
association [1..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [1..1] to I_User as _ChangedByUser on $projection.LastChangedByUser = _ChangedByUser.UserID
association [0..*] to ZI_ObjItem as _ObjectItems on $projection.DBKey = _ObjectItems.ObjectID
{
key db_key as DBKey,
obj_id as ObjectID,
obj_type as ObjectType,
@ObjectModel.foreignKey.association: '_CompanyCode'
ccode as CompanyCode,
@ObjectModel.foreignKey.association: '_SalesOrganization'
vkorg as SalesOrganization,
@ObjectModel.foreignKey.association: '_DistributionChannel'
vtweg as DistributionChannel,
@ObjectModel.foreignKey.association: '_Division'
spart as Division,
@ObjectModel.foreignKey.association: '_SoldToParty'
sold_to_party as SoldToParty,
@ObjectModel.foreignKey.association: '_CreatedByUser'
created_by as CreatedByUser,
created_on as CreatedOnDateTime,
valid_from as ValidFromDateTime,
valid_to as ValidToDateTime,
status as Status,
@ObjectModel.foreignKey.association: '_ChangedByUser'
changed_by as LastChangedByUser,
changed_on as LastChangedOnDateTime,
/* Associations */
_CompanyCode,
_SalesOrganization,
_DistributionChannel,
_Division,
_ChangedByUser,
_CreatedByUser,
_SoldToParty,
_ObjectItems
}
@AbapCatalog.sqlViewName: 'ZI_V_OBJITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.type: #INHERITED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Object Items'
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #BASIC
define view ZI_ObjItem
as select from zobjitm
association [1..1] to ZI_ObjHeader as _ObjectHeader on $projection.ObjectID = _ObjectHeader.DBKey
association [1..1] to I_UnitOfMeasure as _UnitOfMeasure on $projection.UnitOfMeasure = _UnitOfMeasure.UnitOfMeasure
{
db_key as ObjectItemKey,
parent_key as ObjectID,
item_num as ObjectItemNum,
products as Products,
volume as Volume,
uom as UnitOfMeasure,
start_date as StartDate,
end_date as EndDate,
created_by as CreatedBy,
created_on as CreatedOn,
changed_by as ChangedBy,
changed_on as ChangedOn,
/* Associations */
_ObjectHeader
}
@AbapCatalog.sqlViewName: 'ZI_V_OBJECT'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.type: #INHERITED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Objects'
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #BASIC
define view ZI_Object
as select from ZI_ObjHeader
{
//ZI_ObjHeader
DBKey,
ObjectID,
ObjectType,
@ObjectModel.foreignKey.association : '_CompanyCode'
CompanyCode,
@ObjectModel.foreignKey.association : '_SalesOrganization'
SalesOrganization,
@ObjectModel.foreignKey.association : '_DistributionChannel'
DistributionChannel,
@ObjectModel.foreignKey.association : '_Division'
Division,
@ObjectModel.foreignKey.association : '_SoldToParty'
SoldToParty,
@ObjectModel.foreignKey.association : '_CreatedByUser'
CreatedByUser,
CreatedOnDateTime,
ValidFromDateTime,
ValidToDateTime,
Status,
@ObjectModel.foreignKey.association : '_ChangedByUser'
LastChangedByUser,
LastChangedOnDateTime,
/* Associations */
_ChangedByUser,
_CompanyCode,
_CreatedByUser,
_DistributionChannel,
_Division,
_ObjectItems,
_SalesOrganization,
_SoldToParty
}
@AbapCatalog.sqlViewName: 'ZC_V_OBJLIST'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Object List'
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #CONSUMPTION
define view ZC_ObjList
with parameters
p_date : abap.dats, //Current Date
p_tzone : suidtzone //Timezone in which the Current Date lies
as select from ZI_Object
{
//ZI_Object
DBKey,
ObjectID,
ObjectType,
@ObjectModel.foreignKey.association : '_CompanyCode'
CompanyCode,
@ObjectModel.foreignKey.association : '_SalesOrganization'
SalesOrganization,
@ObjectModel.foreignKey.association : '_DistributionChannel'
DistributionChannel,
@ObjectModel.foreignKey.association : '_Division'
Division,
@ObjectModel.foreignKey.association : '_SoldToParty'
SoldToParty,
@ObjectModel.foreignKey.association : '_CreatedByUser'
CreatedByUser,
CreatedOnDateTime,
ValidFromDateTime,
ValidToDateTime,
Status,
LastChangedByUser,
LastChangedOnDateTime,
/* Date-Time Calculations */
@Semantics.businessDate.from: true
cast ( tstmp_to_dats( ValidFromDateTime, :p_tzone,
$session.client, 'NULL' ) as datum ) as ValidFromDate,
@Semantics.businessDate.to: true
cast ( tstmp_to_dats( ValidToDateTime, :p_tzone,
$session.client, 'NULL' ) as datum ) as ValidToDate,
/* Associations */
//ZI_Object
_ChangedByUser,
_CompanyCode,
_CreatedByUser,
_DistributionChannel,
_Division,
_ObjectItems,
_SalesOrganization,
_SoldToParty
}
@AbapCatalog.sqlViewName: 'ZV_OBJ_EXP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Object List Expanded'
define view ZC_ObjListExpanded
with parameters
p_date : abap.dats,
p_tzone : suidtzone
as select from ZC_ObjList( p_date: :p_date, p_tzone: :p_tzone )
//Date is not needed to be passed, as the purpose of this CDS is just to have a ABAP DDIC structure
{
//A new key Generated_Id is created
//This key is required by Analytical Table on UI Layer
@Consumption.hidden: true
key cast(( ObjectID ) as abap.sstring(1000) ) as GeneratedId,
//ZC_ObjList
@Consumption.hidden: true
DBKey,
@Search.defaultSearchElement: true
ObjectID,
ObjectType,
@Search.defaultSearchElement: true
CompanyCode,
@Search.defaultSearchElement: true
SalesOrganization,
@Search.defaultSearchElement: true
DistributionChannel,
Division,
SoldToParty,
@Semantics.user.createdBy: true
CreatedByUser,
@Semantics.businessDate.from: true
CreatedOnDateTime,
@Semantics.businessDate.from: true
ValidFromDateTime,
@Semantics.businessDate.from: true
ValidToDateTime,
Status,
LastChangedByUser,
@Semantics.businessDate.from: true
LastChangedOnDateTime,
@Semantics.businessDate.from: true
ValidFromDate,
@Semantics.businessDate.from: true
ValidToDate,
@Semantics.text: true
@Search.defaultSearchElement: true
_SoldToParty.BusinessPartnerFullName as SoldToPartyName,
@Consumption.hidden: true
_SoldToParty.FirstName as SoldToPartyFirstName,
@Consumption.hidden: true
_SoldToParty.LastName as SoldToPartyLastName,
@Consumption.hidden: true
_SoldToParty.OrganizationBPName1 as SoldToPartyOrgName1,
@Consumption.hidden: true
_SoldToParty.OrganizationBPName2 as SoldToPartyOrgName2,
@Consumption.hidden: true
_SoldToParty.GroupBusinessPartnerName1 as SoldToPartyGroupName1,
@Consumption.hidden: true
_SoldToParty.GroupBusinessPartnerName2,
@Search.defaultSearchElement: true
_SalesOrganization._Text[1: Language = $session.system_language ].SalesOrganizationName as SalesOrganizationName,
@Search.defaultSearchElement: true
_CompanyCode.CompanyCodeName as CompanyCodeName,
@Search.defaultSearchElement: true
_DistributionChannel._Text[1: Language = $session.system_language ].DistributionChannelName as DistributionChannelName,
@Search.defaultSearchElement: true
_Division._Text[1: Language = $session.system_language ].DivisionName,
@Consumption.hidden: true
_ObjectItems. ObjectItemKey,
@Consumption.hidden: true
_ObjectItems.ObjectID as ItemParentKey,
@Consumption.hidden: true
_ObjectItems. ObjectItemNum,
_ObjectItems. Products,
@DefaultAggregation:#SUM
_ObjectItems. Volume,
_ObjectItems. UnitOfMeasure,
_ObjectItems. StartDate,
_ObjectItems. EndDate,
@Consumption.hidden: true
_ObjectItems. CreatedBy,
@Consumption.hidden: true
_ObjectItems. CreatedOn,
@Consumption.hidden: true
_ObjectItems. ChangedBy,
@Consumption.hidden: true
_ObjectItems. ChangedOn
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 |