有一个需求是对费用凭证的费用那行也要显示供应商。
最终建立一个自定义表zfi036_xt 记录对应的供应商,再建一个CDS视图 ZBSEG替换BSEG表
在HANA里
@AbapCatalog.sqlViewName: 'ZBSEG' @AbapCatalog.compiler.compareFilter: true @AbapCatalog.preserveKey: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label: '扩展的bseg' define view ZCDS_BSEG as select from bseg left outer join zfi036_xt on bseg.mandt = zfi036_xt.mandt and bseg.bukrs = zfi036_xt.bukrs and bseg.belnr = zfi036_xt.belnr and bseg.gjahr = zfi036_xt.gjahr and bseg.buzei = zfi036_xt.buzei { key bseg.mandt, key bseg.bukrs, key bseg.belnr, key bseg.gjahr, key bseg.buzei, buzid, augdt, augcp, augbl, bschl, koart, umskz, umsks, zumsk, shkzg, gsber, pargb, mwskz, qsskz, dmbtr, wrbtr, kzbtr, pswbt, pswsl, txbhw, txbfw, mwsts, wmwst, hwbas, fwbas, hwzuz, fwzuz, shzuz, stekz, mwart, txgrp, ktosl, qsshb, kursr, gbetr, bdiff, bdif2, valut, zuonr, sgtxt, zinkz, vbund, bewar, altkt, vorgn, fdlev, fdgrp, fdwbt, fdtag, fkont, kokrs, kostl, projn, aufnr, vbeln, vbel2, posn2, eten2, anln1, anln2, anbwa, bzdat, pernr, xumsw, xhres, xkres, xopvw, xcpdd, xskst, xsauf, xspro, xserg, xfakt, xuman, xanet, xskrl, xinve, xpanz, xauto, xncop, xzahl, saknr, hkont, kunnr, case when zfi036_xt.lifnr is not null then zfi036_xt.lifnr else bseg.lifnr end as lifnr, filkd, xbilk, gvtyp, hzuon, zfbdt, zterm, zbd1t, zbd2t, zbd3t, zbd1p, zbd2p, skfbt, sknto, wskto, zlsch, zlspr, zbfix, hbkid, bvtyp, nebtr, mwsk1, dmbt1, wrbt1, mwsk2, dmbt2, wrbt2, mwsk3, dmbt3, wrbt3, rebzg, rebzj, rebzz, rebzt, zollt, zolld, lzbkz, landl, diekz, samnr, abper, vrskz, vrsdt, disbn, disbj, disbz, wverw, anfbn, anfbj, anfbu, anfae, blnbt, blnkz, blnpz, mschl, mansp, madat, manst, maber, esrnr, esrre, esrpz, klibt, qsznr, qbshb, qsfbt, navhw, navfw, matnr, werks, menge, meins, erfmg, erfme, bpmng, bprme, ebeln, ebelp, zekkn, elikz, vprsv, peinh, bwkey, bwtar, bustw, rewrt, rewwr, bonfb, bualt, psalt, nprei, tbtkz, spgrp, spgrm, spgrt, spgrg, spgrv, spgrq, stceg, egbld, eglld, rstgr, ryacq, rpacq, rdiff, rdif2, prctr, xhkom, vname, recid, egrup, vptnr, vertt, vertn, vbewa, depot, txjcd, imkey, dabrz, popts, fipos, kstrg, nplnr, aufpl, aplzl, projk, paobjnr, pasubnr, spgrs, spgrc, btype, etype, xegdr, lnran, hrkft, dmbe2, dmbe3, dmb21, dmb22, dmb23, dmb31, dmb32, dmb33, mwst2, mwst3, navh2, navh3, sknt2, sknt3, bdif3, rdif3, hwmet, glupm, xragl, uzawe, lokkt, fistl, geber, stbuk, txbh2, txbh3, pprct, xref1, xref2, kblnr, kblpos, sttax, fkber, obzei, xnegp, rfzei, ccbtc, kkber, empfb, xref3, dtws1, dtws2, dtws3, dtws4, gricd, grirg, gityp, xpypr, kidno, absbt, idxsp, linfv, kontt, kontl, uebgdat, txdat, agzei, pycur, pyamt, bupla, secco, lstar, cession_kz, prznr, ppdiff, ppdif2, ppdif3, penlc1, penlc2, penlc3, penfc, pendays, penrc, grant_nbr, sctax, fkber_long, gmvkz, srtype, intreno, measure, auggj, ppa_ex_ind, docln, segment, psegment, pfkber, hktid, kstar, xlgclr, taxps, pays_prov, pays_tran, mndid, xfrge_bseg, awtyp, awkey, awsys, posnr, buzei_sender, h_monat, h_bstat, h_budat, h_bldat, h_waers, h_blart, h_hwaer, h_hwae2, h_hwae3, netdt, sk1dt, sk2dt, _dataaging, fqftype, lqitem, gkont, gkart, ghkon, squan, anln2_pn, bwasl_pn, bzdat_pn, xvabg_pn, anbtr_pn, prozs_pn, dummy_incl_eew_cobl, re_bukrs, re_account, pgeber, pgrant_nbr, budget_pd, pbudget_pd, j_1tpbupl, perop_beg, perop_end, fastpay, ignr_ivref, fmfgus_key, fmxdocnr, fmxyear, fmxdocln, fmxzekkn, prodper, recrf, inward_no, inward_dt, pymtkey, zzysbm, zzlwgs }
最后激活
标签:buzei,HANA,bseg,视图,zfi036,key,CDS,pn,xt From: https://www.cnblogs.com/highsir/p/17431769.html