@AbapCatalog.entityBuffer.definitionAllowed: false
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
define view entity P_Bseg_Add_Com as select from P_Bseg_Add_Com1 as P_Bseg_Add_Com1
inner join t001 on P_Bseg_Add_Com1.bukrs = t001.bukrs
{
key cast( P_Bseg_Add_Com1.bukrs as fis_bukrs preserving type ) as bukrs ,
key cast( P_Bseg_Add_Com1.belnr as farp_belnr_d preserving type ) as belnr,
key cast( P_Bseg_Add_Com1.gjahr as fis_gjahr_no_conv preserving type ) as gjahr,
key P_Bseg_Add_Com1.buzei,
cast( t001.ktopl as fis_ktopl preserving type ) as ktopl,
P_Bseg_Add_Com1.buzid,
cast( P_Bseg_Add_Com1.augdt as fis_augdt preserving type ) as augdt,
cast( P_Bseg_Add_Com1.augcp as fis_augcp preserving type ) as augcp,
cast( P_Bseg_Add_Com1.augbl as fis_augbl preserving type ) as augbl,
cast( P_Bseg_Add_Com1.bschl as fis_bschl preserving type ) as bschl,
cast( P_Bseg_Add_Com1.koart as farp_koart preserving type ) as koart,
cast( P_Bseg_Add_Com1.gsber as fis_rbusa preserving type ) as gsber,
cast( P_Bseg_Add_Com1.pargb as fis_pargb preserving type ) as pargb,
cast( P_Bseg_Add_Com1.mwskz as fis_mwskz preserving type ) as mwskz,
cast( P_Bseg_Add_Com1.qsskz as fac_qsskz preserving type ) as qsskz,
cast( P_Bseg_Add_Com1.ktosl as fac_ktosl preserving type ) as ktosl,
P_Bseg_Add_Com1.valut,
cast( P_Bseg_Add_Com1.zuonr as fis_zuonr preserving type ) as zuonr,
cast( P_Bseg_Add_Com1.sgtxt as farp_sgtxt preserving type ) as sgtxt,
cast( P_Bseg_Add_Com1.vbund as fis_rassc preserving type ) as vbund,
cast( P_Bseg_Add_Com1.bewar as fis_rmvct preserving type ) as bewar,
cast( P_Bseg_Add_Com1.altkt as fis_bilkt_ska1 preserving type ) as altkt,
P_Bseg_Add_Com1.vorgn,
P_Bseg_Add_Com1.fkont,
cast( P_Bseg_Add_Com1.kokrs as fis_kokrs preserving type ) as kokrs,
cast( P_Bseg_Add_Com1.kostl as fis_kostl preserving type ) as kostl,
cast( P_Bseg_Add_Com1.projn as ps_pspid ) as projn,
cast( P_Bseg_Add_Com1.aufnr as fis_aufnr preserving type ) as aufnr,
cast( P_Bseg_Add_Com1.anln1 as fis_anln1 preserving type ) as anln1,
cast( P_Bseg_Add_Com1.anln2 as fis_anln2 preserving type ) as anln2,
P_Bseg_Add_Com1.anbwa,
cast(P_Bseg_Add_Com1.xopvw as fis_xopvw) as xopvw,
cast( P_Bseg_Add_Com1.xauto as fis_xauto) as xauto,
P_Bseg_Add_Com1.xncop,
cast( P_Bseg_Add_Com1.hkont as fis_racct preserving type ) as hkont,
cast( P_Bseg_Add_Com1.xbilk as fis_xbilk ) as xbilk,
cast( P_Bseg_Add_Com1.gvtyp as fis_gvtyp preserving type ) as gvtyp,
cast( P_Bseg_Add_Com1.zfbdt as fis_dzfbdt preserving type ) as zfbdt,
cast( P_Bseg_Add_Com1.rebzg as fis_rebzg preserving type ) as rebzg,
cast( P_Bseg_Add_Com1.rebzj as fis_rebzj_no_conv preserving type ) as rebzj,
cast( P_Bseg_Add_Com1.rebzz as fis_rebzz preserving type ) as rebzz,
cast( P_Bseg_Add_Com1.rebzt as farp_rebzt preserving type ) as rebzt,
cast( P_Bseg_Add_Com1.wverw as farp_wverw preserving type ) as wverw,
P_Bseg_Add_Com1.matnr,
P_Bseg_Add_Com1.werks,
P_Bseg_Add_Com1.bwkey,
P_Bseg_Add_Com1.bwtar,
cast( P_Bseg_Add_Com1.prctr as fis_prctr preserving type ) as prctr,
P_Bseg_Add_Com1.vname,
P_Bseg_Add_Com1.recid,
cast( P_Bseg_Add_Com1.egrup as jv_egroup_cds preserving type ) as egrup,
P_Bseg_Add_Com1.vptnr,
cast( P_Bseg_Add_Com1.vertt as fis_rantyp preserving type ) as vertt,
cast( P_Bseg_Add_Com1.vertn as fis_ranl preserving type ) as vertn,
cast( P_Bseg_Add_Com1.vbewa as farp_sbewart preserving type ) as vbewa,
cast( P_Bseg_Add_Com1.imkey as fis_imkey preserving type ) as imkey,
cast( P_Bseg_Add_Com1.dabrz as farp_dabrbez preserving type ) as dabrz,
cast( P_Bseg_Add_Com1.fipos as fis_fipos preserving type ) as fipos,
P_Bseg_Add_Com1.kstrg,
P_Bseg_Add_Com1.nplnr,
cast( P_Bseg_Add_Com1.aufpl as fis_ordintbillofops preserving type ) as aufpl,
cast( P_Bseg_Add_Com1.aplzl as fis_ordintbillofopitm preserving type ) as aplzl,
cast( P_Bseg_Add_Com1.projk as ps_posnr preserving type ) as projk,
P_Bseg_Add_Com1.paobjnr,
P_Bseg_Add_Com1.pasubnr,
cast( P_Bseg_Add_Com1.xragl as fis_xragl ) as xragl,
cast( P_Bseg_Add_Com1.uzawe as farp_uzawe preserving type ) as uzawe,
cast( P_Bseg_Add_Com1.lokkt as fis_altkt_skb1 preserving type ) as lokkt,
cast( P_Bseg_Add_Com1.fistl as farp_fistl preserving type ) as fistl,
P_Bseg_Add_Com1.geber,
cast( P_Bseg_Add_Com1.pprct as fis_pprctr preserving type ) as pprct,
cast( P_Bseg_Add_Com1.xref1 as fis_xref1 ) as xref1,
cast( P_Bseg_Add_Com1.xref2 as fis_xref2 ) as xref2,
P_Bseg_Add_Com1.kblnr,
P_Bseg_Add_Com1.kblpos,
cast( P_Bseg_Add_Com1.fkber as fm_farea preserving type ) as fkber,
P_Bseg_Add_Com1.obzei,
cast( P_Bseg_Add_Com1.rfzei as fis_rfzei_cc ) as rfzei,
cast( P_Bseg_Add_Com1.ccbtc as fis_ccbtc ) as ccbtc,
cast( P_Bseg_Add_Com1.xref3 as fis_xref3 ) as xref3,
P_Bseg_Add_Com1.kontt,
P_Bseg_Add_Com1.kontl,
cast( P_Bseg_Add_Com1.agzei as fis_agzei preserving type ) as agzei,
cast( P_Bseg_Add_Com1.bupla as farp_bupla preserving type ) as bupla,
cast( P_Bseg_Add_Com1.secco as fis_secco preserving type ) as secco,
P_Bseg_Add_Com1.lstar,
P_Bseg_Add_Com1.prznr,
P_Bseg_Add_Com1.grant_nbr,
P_Bseg_Add_Com1.intreno,
P_Bseg_Add_Com1.measure,
cast( P_Bseg_Add_Com1.auggj as fis_auggj_no_conv preserving type ) as auggj,
P_Bseg_Add_Com1.segment,
P_Bseg_Add_Com1.psegment,
cast(P_Bseg_Add_Com1.pfkber as fis_sfkber preserving type ) as pfkber,
P_Bseg_Add_Com1.kstar,
P_Bseg_Add_Com1.xlgclr,
cast( P_Bseg_Add_Com1.netdt as farp_netdt preserving type ) as netdt,
cast( P_Bseg_Add_Com1.gkont as fis_gkont preserving type ) as gkont,
cast( P_Bseg_Add_Com1.gkart as farp_gkoar preserving type ) as gkart,
P_Bseg_Add_Com1.ghkon,
cast( P_Bseg_Add_Com1.pgeber as bp_p_geber preserving type ) as pgeber,
P_Bseg_Add_Com1.pgrant_nbr,
P_Bseg_Add_Com1.budget_pd,
P_Bseg_Add_Com1.pbudget_pd,
P_Bseg_Add_Com1.prodper,
P_Bseg_Add_Com1.re_bukrs,
P_Bseg_Add_Com1.re_account,
P_Bseg_Add_Com1.bdgt_account_cocode,
P_Bseg_Add_Com1.bdgt_account,
cast( P_Bseg_Add_Com1.h_hwaer as fis_hwaer preserving type ) as h_hwaer,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwaer'} } cast( P_Bseg_Add_Com1.dmbtr_shl as fis_hsl ) as dmbtr_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwaer'} } cast( P_Bseg_Add_Com1.mwsts_shl as fis_mwsts ) as mwsts_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwaer'} } cast( P_Bseg_Add_Com1.bdiff_shl as fis_bdiff ) as bdiff_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwaer'} } P_Bseg_Add_Com1.rdiff_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwaer'} } P_Bseg_Add_Com1.ppdiff_shl ,
cast( P_Bseg_Add_Com1.h_waers as fis_rwcur preserving type ) as h_waers,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_waers'} } cast( P_Bseg_Add_Com1.wrbtr_shl as fis_wsl ) as wrbtr_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_waers'} } cast( P_Bseg_Add_Com1.wmwst_shl as wmwst_shl ) as wmwst_shl ,
cast( P_Bseg_Add_Com1.pswsl as fis_rtcur preserving type ) as pswsl,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'pswsl'} } cast( P_Bseg_Add_Com1.pswbt_shl as fis_tsl ) as pswbt_shl ,
cast( P_Bseg_Add_Com1.h_hwae2 as fis_hwae2 preserving type ) as h_hwae2,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae2'} } cast( P_Bseg_Add_Com1.bdif2_shl as fis_bdif2 ) as bdif2_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae2'} } P_Bseg_Add_Com1.rdif2_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae2'} } cast( P_Bseg_Add_Com1.dmbe2_shl as fis_dmbe2 ) as dmbe2_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae2'} } P_Bseg_Add_Com1.mwst2_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae2'} } P_Bseg_Add_Com1.ppdif2_shl ,
cast( P_Bseg_Add_Com1.h_hwae3 as fis_hwae3 preserving type ) as h_hwae3,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae3'} } cast( P_Bseg_Add_Com1.dmbe3_shl as fis_dmbe3 ) as dmbe3_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae3'} } P_Bseg_Add_Com1.mwst3_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae3'} } cast( P_Bseg_Add_Com1.bdif3_shl as fis_bdif3 ) as bdif3_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae3'} } P_Bseg_Add_Com1.rdif3_shl ,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'h_hwae3'} } P_Bseg_Add_Com1.ppdif3_shl ,
// Functional Currency
P_Bseg_Add_Com1.rfccur as rfccur,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'rfccur'} }
cast( P_Bseg_Add_Com1.fcsl_shl as fis_vfccur12 ) as fcsl_shl,
P_Bseg_Add_Com1.meins as meins,
@Aggregation.default: #SUM
@Semantics: { quantity : {unitOfMeasure: 'meins'} } cast( cast( P_Bseg_Add_Com1.menge as abap.quan(23,3) ) as quan1_12 ) as menge,
cast( P_Bseg_Add_Com1.shkzg_calc as fis_shkzg ) as shkzg,
P_Bseg_Add_Com1.nbritm,
cast( P_Bseg_Add_Com1.bstat as fis_bstat ) as bstat,
P_Bseg_Add_Com1.buzei_sender
}