我有如下一个CDS view, 这个view的数据来自CRMD_ORDERADM_H, 定义了一个名称为_statushelp的association, 指向了另一个CDS view Z_C_Status_Valuehelp.该view暴露了两个字段STATUS_KEY和STATUS_TEXT. 现在我的需求是:在ABAP代码里只需要一次读操作,既能读出主view里的guid字段,又能读出association view Z_C_Status_Valuehelp暴露出的两个字段STATUS_KE…
在S/4HANA事务码CO03显示的Production Order里,我希望用ABAP代码显示出该订单的operation(工序)ID,描述和状态Status,如下图所示: 很简单的几行ABAP代码: DATA: lt_operation TYPE TABLE OF afvgd. CALL FUNCTION 'PM_ORDER_DATA_READ' EXPORTING order_number = '000001000381' TABLES iafvgd = lt_operation EXCE…
cds view 是一个core data service, 能够将数据库表虚拟化为一个虚拟表(double).因为各个使用sap的公司,使用的数据库数据是不同的,所以提供一个数据库的虚拟.  通过向虚拟double test里面插入数据,进行unit test. 下面是主要步骤. 准备一个数据表 ztest_view 1: 首先在装有abap development tool 的eclipse软件中,在自己的目录下创建一个cds view. 目录>右键>new abap repository…
S4/HANA里有一个新的UI框架叫做Smart template, 配合ABAP后台的CDS view技术,能够让developer以Metadata driven的方式来开发Fiori应用, 这种开发方式几乎不需要或者只需要很少量的JavaScript开发. 下面是我写在SCN上的相关13篇blog的链接: Step by Step to create CDS view through SmartTemplate + WebIDE Currency example - how Smart f…
From Create Fiori List App Report with ABAP CDS view – PART 1 In this blog, I am going to show How CDS view can be used to generate a Fiori List App Report. Below are the steps that need to be implemented to generate Fiori List App Report. CDS annota…
ABAP CDS - SELECT, association Syntax ... ASSOCIATION [ [min..max] ] TO target [AS _assoc] ON cond_exp                 [ WITH DEFAULT FILTER cond_exp ] ... Extras: 1. ... [min..max] 2. ... AS _assoc 3. ... WITH DEFAULT FILTER cond_exp Effect Defines…
1:创建两张表:ztt_teacher01 和ztt_teacher02 用于 cds view中的join和association 2:创建两个cds view:ztt_teacher01_id_name和 ztt_teacher02_id_salary 3: 在ztt_teacher01_id_name 中使用连接对数据表进行查询 @AbapCatalog.sqlViewName: 'TEACHER01' @AbapCatalog.compiler.compareFilter: true @…
In the Part 1 blog, we have discussed below topics CDS annotations for Fiori List Report. How to create a Gateway service from ABAP CDS view How to create a Fiori List App report in Web IDE. How to Deploy the Fiori Application. In this blog, we are g…
Jerry 2016年在学习SAP CDS view时,曾经写过一个CDS view的自学系列,其中有一篇提到了一个很方便的注解: @OData.publish: true 加上这个注解的CDS view,一旦激活后就会在ABAP Netweaver自动生成一个OData服务,在事务码/IWFND/MAINT_SERVICE里将其搜索出来并添加,就能够以OData服务的方式,消费这个view暴露出来的数据了. 当然@OData.publish这个注解为什么有这种神奇的魔力,在Jerry之前的博客…
下面的CDS view使用到了@Environment.systemField这个注解,定义了两个参数#SYSTEM_LANGUAGE和#USER. 这个view从CRM物料主数据的产品抬头表COMM_PRODUCT读取product_id, product_type,以及comm_prshtext表里读取产品的描述信息,存储在字段description里. @AbapCatalog.sqlViewName: 'zprdtext' @AbapCatalog.compiler.compareFil…