on 10-02-2023 1:39 PM
Hello everyone,
i am currently trying to derive the description from a text view "Z_TVIEW_TFKTVOT" that I have created, based on the table TFKTVOT in ERP (The values and fields of the table TFKTVOT can be found in the image attached). The table TFKTVOT includes a specific text for TVORG based on the combination of the values of HVORG and TVORG (see image attached). I am trying to derive the text fields for the field "TVORG" from the text view mentioned above and in the beginning it required me to define a representative key for the text view. After defining "TVORG" as representative key in the Text View, I receive the following error in my main view:
Below is the code for my main view and the text view and also a screenshot of the text table "TFKTVOT" in ERP:
Main View: "Z_BVIEW_DFKKOP_001"
@AbapCatalog.sqlViewName: 'Z_BV_DFKKOP_001'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@Analytics.dataCategory: #CUBE
@EndUserText.label: 'Basic View DFKKOP 001 ICRSKL20220802'
define view Z_BVIEW_DFKKOP_001 as select from dfkkop
association [1..1] to Z_TVIEW_BOFUCV_BPRT as _GPARTTEXT on $projection.gpart = _GPARTTEXT.partner
association [1..*] to Z_TVIEW_TGSBH as _GSBERTEXT on $projection.gsber = _GSBERTEXT.gsber
association [0..1] to Z_TVIEW_T001 as _BUKRSTEXT on $projection.bukrs = _BUKRSTEXT.bukrs
association [0..1] to Z_TVIEW_TFKHVOT as _HVORGTEXT on $projection.hvorg = _HVORGTEXT.hvorg
association [1..*] to Z_TVIEW_TFKTVOT as _TVORGTEXT on $projection.hvorg = _TVORGTEXT.hvorg
and $projection.tvorg = _TVORGTEXT.tvorg
association [0..1] to Z_TVIEW_SKAT as _HKONTTEXT on $projection.hkont = _HKONTTEXT.saknr
association [0..1] to Z_TVIEW_T007S as _MWSKZTEXT on $projection.mwskz = _MWSKZTEXT.mwskz
association [0..1] to Z_TVIEW_TFK042ZT as _PYMETTEXT on $projection.pymet = _PYMETTEXT.zlsch
association [0..1] to Z_TVIEW_TFK047AT as _MAHNVTEXT on $projection.mahnv = _MAHNVTEXT.mahnv
association [0..1] to Z_TVIEW_TFK047ST as _MANSPTEXT on $projection.mansp = _MANSPTEXT.mansp
association [0..1] to Z_TVIEW_T880T_BIW as _VBUNDTEXT on $projection.vbund = _VBUNDTEXT.vbund
association [0..1] to Z_TVIEW_TFK003T as _BLARTTEXT on $projection.blart = _BLARTTEXT.blart
association [0..1] to Z_TVIEW_TKKVPRGRPT as _PRGRPTEXT on $projection.prgrp = _PRGRPTEXT.prgrp
association [0..1] to Z_TVIEW_TLXXVALT as _VSARLVXTEXT on $projection.vsarl_vx = _VSARLVXTEXT.vsarl_vx
association [0..1] to Z_TVIEW_TKKVPNTYPT as _PNTYPTEXT on $projection.pntyp = _PNTYPTEXT.pntyp
association [0..1] to Z_TVIEW_TFK002AT as _VKTYPTEXT on $projection.vktyp = _VKTYPTEXT.vktyp
association [0..1] to Z_TVIEW_DIMAIOBPAR as _ZZRCVOTEXT on $projection.zz_rc_vo = _ZZRCVOTEXT.insobject
{
key opbel,
key opupw,
key opupk,
key opupz,
@ObjectModel.text.association: '_BUKRSTEXT'
bukrs,
@ObjectModel.text.association: '_GSBERTEXT'
gsber,
bupla,
segment,
prctr,
augst,
@ObjectModel.text.association: '_GPARTTEXT'
gpart,
vtref,
vtpos,
vtre2,
vkont,
abwbl,
abwtp,
abwkt,
applk,
@ObjectModel.text.association: '_HVORGTEXT'
hvorg,
@ObjectModel.text.association: '_TVORGTEXT'
tvorg,
kofiz,
spart,
@ObjectModel.text.association: '_HKONTTEXT'
hkont,
@ObjectModel.text.association: '_MWSKZTEXT'
mwskz,
mwszkz,
xanza,
stakz,
bldat,
budat,
optxt,
@Semantics.currencyCode: true
waers,
faedn,
faeds,
verkz,
studt,
sktpz,
xmanl,
kursf,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'waers'
betrh,
@DefaultAggregation: #SUM
betrw,
@DefaultAggregation: #SUM
skfbt,
sbeth,
txrul,
spzah,
@ObjectModel.text.association: '_PYMETTEXT'
pymet,
pernr,
grkey,
persl,
augdt,
augbl,
augbd,
augrd,
augwa,
augbt,
augbs,
augvd,
augob,
@ObjectModel.text.association: '_MAHNVTEXT'
mahnv,
@ObjectModel.text.association: '_MANSPTEXT'
mansp,
abrzu,
abrzo,
fdgrp,
fdlev,
fdztg,
fdwbt,
xtaus,
pygrp,
infoz,
txdat,
@ObjectModel.text.association: '_VBUNDTEXT'
vbund,
kontt,
kontl,
opsta,
@ObjectModel.text.association: '_BLARTTEXT'
blart,
xragl,
astkz,
asblg,
xblnr,
inkps,
rfupk,
xpyor,
sctax,
sttax,
stzal,
orupz,
herkf_kk,
cpudt_op,
cputm_op,
cpudt_st,
cputm_st,
awtyp_op,
awkey_op,
@ObjectModel.text.association: '_PRGRPTEXT'
prgrp,
@ObjectModel.text.association: '_VSARLVXTEXT'
vsarl_vx,
@ObjectModel.text.association: '_PNTYPTEXT'
pntyp,
@ObjectModel.text.association: '_VKTYPTEXT'
vktyp,
vtre3,
vgpart2,
vgpart3,
txpos,
@ObjectModel.text.association: '_ZZRCVOTEXT'
zz_rc_vo,
zz_u_xblnr,
zz_verarbtyp,
zz_laufid,
zz_spez_gf,
zz_mig_mahns,
zz_mig_nexdt,
_BUKRSTEXT,
_GSBERTEXT,
_GPARTTEXT,
_HVORGTEXT,
_TVORGTEXT,
_HKONTTEXT,
_MWSKZTEXT,
_PYMETTEXT,
_MAHNVTEXT,
_MANSPTEXT,
_VBUNDTEXT,
_BLARTTEXT,
_PRGRPTEXT,
_VSARLVXTEXT,
_PNTYPTEXT,
_VKTYPTEXT,
_ZZRCVOTEXT
}
Text View: "Z_BVIEW_DFKKOP_001"
@AbapCatalog.sqlViewName: 'Z_TV_TFKTVOT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.dataCategory: #TEXT
@ObjectModel.representativeKey: 'tvorg'
@EndUserText.label: 'Geschäftsbereich Text'
@Search.searchable: true
define view Z_TVIEW_TFKTVOT
as select from tfktvot as TextProvider
{
key TextProvider.hvorg,
key TextProvider.tvorg,
@Semantics.language: true
key TextProvider.spras,
@Semantics.text: true -- identifies the language
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
TextProvider.txt30
}
Text Table: TFKTVOT
Solution: Both Text Views, the view with the texts for field HVORG and the view with the texts for TVORG were converted to type #DIMENSION, instead of #TEXT and the respective texts were mapped to the representative key field using @ObjectModel.text.element[]. The associations in the cube view were converted to foreign key associations instead of text associations using @ObjectModel.foreignKey.association. As a result the field TVORG is shown compounded with the Field HVORG and the respective texts were derived.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.