Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

@AbapCatalog.

sqlViewName: 'ZJANPEMP'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Basic Private view on emp manager'
@VDM.viewType: #BASIC
@Analytics.dataCategory: #DIMENSION

define view ZATS_P_EMPLOYEE as select from zoft_emp_mgr {


//ZOFT_EMP_MGR
key empid,
empname,
managerid,
costcenter
}

@AbapCatalog.sqlViewName: 'ZJANHCLASS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Interface Basic Hierarchy Classical'
@Hierarchy.parentChild: [{
name: 'EmployeeMgr',
recurse: { parent: ['Manager' ], child: ['Employee'] }
}]
@Analytics.dataCategory: #DIMENSION
define view ZATS_I_EMPMGR as select from ZATS_P_EMPLOYEE
association[1..*] to ZATS_P_EMPLOYEE as _Manager on
$projection.empid = _Manager.empid
{
//ZATS_P_EMPLOYEE
@EndUserText.label: 'Employee Id'
@ObjectModel.text.element: ['EmployeeName']
key empid as Employee,
@EndUserText.label: 'Employee Name'
empname as EmployeeName,
@EndUserText.label: 'Manager Id'
managerid as Manager,
@EndUserText.label: 'Cost Center'
costcenter as CostCenter,
//_Manager
key _Manager
}

@AbapCatalog.sqlViewName: 'ZCOEMPHRS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'join time recording with Emp Mgr Hierarchy'

@VDM.viewType: #COMPOSITE
@Analytics.dataCategory: #CUBE

define view ZATS_CO_EMPHOURS as select from zoft_emp_hrs


association[0..1] to ZATS_I_EMPMGR as _Employee on
$projection.empid = _Employee.Employee
association[1] to csks as _CostCenter on
$projection.CostCenter = _CostCenter.kostl
{

key empid,
@DefaultAggregation: #SUM
@EndUserText.label: 'Planned Effort'
planned,
@DefaultAggregation: #SUM
@EndUserText.label: 'Actual Effort'
recorded,
_Employee.CostCenter as CostCenter,
_CostCenter,
_Employee
}

@AbapCatalog.sqlViewName: 'ZATSCEMPHR'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'View for hierarchy with annotations for Fiori'

@VDM.viewType: #CONSUMPTION
@Analytics.query: true
@OData.publish: true

define view ZATS_C_EMPHOURS as select from ZATS_CO_EMPHOURS {


//ZATS_CO_EMPHOURS
@AnalyticsDetails: {
query: { displayHierarchy: #ON,
hierarchySettings.hidePostedNodesValues: false,
hierarchyInitialLevel: 2,
axis: #ROWS,
totals: #SHOW,
display: #KEY_TEXT }
}
key empid,
planned,
recorded,
CostCenter,
@AnalyticsDetails.query.formula: 'recorded * 100 / planned'
@EndUserText.label: 'Effort Utilization'
0 as EffortUtil,
/* Associations */
//ZATS_CO_EMPHOURS
_CostCenter,
_Employee
}

@AbapCatalog.sqlViewName: 'ZATSIMAX'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Read the max status of failed records'
define view ZATS_I_MAXSTATUS as select from edids {
key docnum,
max( countr ) as countr
} group by docnum

@AbapCatalog.sqlViewName: 'ZATSIMAXRE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'get the entire record with the max no.'
define view ZATS_I_EDIDS_RECORDS as select from edids
inner join ZATS_I_MAXSTATUS as _MaxRecord on
edids.docnum = _MaxRecord.docnum and
edids.countr = _MaxRecord.countr
{
key edids.docnum as docnum,
key edids.countr as countr,
status,
statxt,
stapa1,
stapa2,
stapa3,
stapa4,
stamid,
stamno

/sap/bc/ui5_ui5/sap/zhiercds

ATS_BC_CDS
BCG_SPIDY

ACMMasterData-display

You might also like