0% found this document useful (0 votes)
10 views2 pages

Object 1

The document defines two OData views. The first view defines an entity called zdm_daterange that selects data from a table and calculates additional fields. The second view defines an entity called zdddm_suspension that joins data from the first view with other tables and filters the data based on date range parameters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Object 1

The document defines two OData views. The first view defines an entity called zdm_daterange that selects data from a table and calculates additional fields. The second view defines an entity called zdddm_suspension that joins data from the first view with other tables and filters the data based on date range parameters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Daterange:

@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'End Date as Range'
define view entity zdm_daterange
as select from scmg_t_case_attr
{ key case_guid,
plan_end_date,
ext_key,
stat_orderno,
create_time,
tstmp_to_tims( create_time,
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ) as zcreate_time,
tstmp_to_dats( create_time,
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ) as zcreate_date
}where stat_orderno = '10'

Suspension:

@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Suspension of Service'
@OData.publish: true

//@Metadata.ignorePropagatedAnnotations: true
//@ObjectModel.usageType:{
// serviceQuality: #X,
// sizeCategory: #S,
// dataClass: #MIXED
//}

define view entity zdddm_suspension with parameters startdate : dats,


enddate : dats
//starttime : erzet,
//endtime : erzet

as select from zdm_daterange as a

left outer join udmcaseattr00 as b on a.case_guid= b.case_guid


left outer join but000 as c on b.fin_kunnr = c.partner
{

key a.case_guid,
a.ext_key as Dispute_Case_ID,
// a.stat_orderno,
b.fin_kunnr as Customer,
b.fin_contact_name as Contact_person,
c.name_org1 as Customer_Name
// a.zcreate_time,
// a.zcreate_date
} where a.zcreate_date between $parameters.startdate and $parameters.enddate
// a.zcreate_time between $parameters.starttime and $parameters.endtime

You might also like