显示CD中的输出值又称转换exiT值?
我创建了一个CD视图,该视图从2个表中读取一些数据。 我的问题是,其中一列具有背后的转换策略 - 因此,如果我使用se16n
显示数据,则显示“转换值”,但在我的CDS视图中,只显示未转换的值。
是否可以在CDS视图中显示转换值的选项?
I've created a CDS view, which reads some data from 2 tables.
My problem is, that one of the columns has a conversion policy behind - so if I display the data with SE16n
, it shows the "converted value" but within my cds view only the unconverted value is shown.
Is there an option to show converted values in CDS views?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(2)
使用虚拟元素
它们可用于计算CD中不可用的字段。
步骤
cast('as as abap.char(255))作为after_conversion
@objectmodel.virtualelement:true
到您的字段@objectModel.virtualElementCalcalcultyby:'abap:< z_class>'
z_class
if_sadl_exit_calc_element_element_element_element_element_element_elemread
在这里您可以看到一个简单的示例
Use Virtual Elements
they can be used to calculate fields that are not available in CDS.
Steps
cast( '' as abap.char(255)) AS after_conversion
@ObjectModel.virtualElement: true
to your field@ObjectModel.virtualElementCalculatedBy: 'ABAP:<z_class>'
Z_CLASS
if_sadl_exit_calc_element_read
calculate
you can do the conversionHere you can see a simple example
CD中没有实际不支持转换出口。但是,通过字符串转换,您可以重建转换退出。
- &gt;参见
No actually conversion exits are not supported in CDS. But with string conversions you can rebuild the conversion exits.
-> see Documentation