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