打开SAP C4C Cloud Application Studio,

进入Solution Explorer,右键菜单里选择Add -> New Item:

新建一个Business Object,取名CarPark:

源代码如下:

import AP.FO.BusinessPartner.Global;import AP.Common.GDT as apCommonGDT;businessobject CarPark // *Further Development*// declare an error message that is called if the BO fails validation// raises Message_Car_Park_Full{// Root node must not be specified, it is created implicitly//// Add elements here.//// To declare an element as alternative key, use the [AlternativeKey]
// annotation.//Please note:// - An alternative key of type UUID exists implicitly for each node, enabling//  the node to be used as an association target.// - The QueryByElements query is created automatically for each node.// Code completion is available with CTRL + SPACE. // *Further Development*// define an error message to be displayed if the BO fails validation// message Message_Car_Park_Full text "The car park is full - no spaces available"; // Car Park ID - (the company may have multiple car parks)// - therefore we use this ID to identify the individual car parkelement CarParkID : ID; // additional information on the car parkelement CarParkName : LANGUAGEINDEPENDENT_LONG_Text;element CarParkDescription : LANGUAGEINDEPENDENT_LONG_Description;element Number_of_ParkingSpaces : IntegerValue;// *Further Development*// add an element to display how many parking spaces are available// element Number_of_ParkingSpaces_Available : IntegerValue;// declare an action to calculate the available car spaces// action Update_AvailableParkingSpaces;// *Further Development*// add an element to record location information// this field is used with a URL mashup to display the location of the car park// element CarParkLocation : LANGUAGEINDEPENDENT_MEDIUM_Description; // each car park will have multiple parking spaces// we create a node with 0 to n parking spacesnode ParkingSpace [0,n]    {// each parking space is assigned a unique identifierelement ParkingSpaceID : ID;// display the ID of the Employee assigned to the parking spaceelement ParkingSpace_AssignedEmployeeID : ID;// a parking space may be designated as a "Disabled Friendly" parking spaceelement ParkingSpace_Disabled : Indicator;// is there an electric charging station for this parking space ?element ParkingSpace_ElectricChargeStation : Indicator;// display the license plate number of the employee's carelement Vehicle_RegistrationNumber : LANGUAGEINDEPENDENT_MEDIUM_Text;// for a multi-level car park, we have the possibility to specify a level numberelement ParkingSpace_Level : NumberValue;// we need to create an association to the SAP BO "Employee"// this allows us to include elements from the Employee BO in our screens// a parking space may be associated to at most one employeeassociation ToEmployee [0,1] to Employee;}
}

激活该BO,确保Activation Status为Runtime Objects up to date:

BO激活后,右键菜单选择Create Screens:

选择Screen Scenario with Thing-Based navigation:

会自动生成很多SAP Cloud for Customer 屏幕:

双击QA打开自动生成的UI,发现上面已经有一些来自BO抬头级别的字段了:

点工具栏上这个AddFlexLayoutRow按钮:

出现一个新的空白行:

将Toolbox里的控件AdvancedListPane拖到新建的FlexLayoutRow里:

选中某一个column,右键菜单里添加一个新的column:

现在我们有了一个表格,包含四列:

View菜单里打开:BO Browser / Data Model,使其显示在屏幕右边:

把ParkingSpaceID拖拽到第一列上去:

选择No:

从而建立了UI字段和BO 模型字段的绑定关系:

此处查看绑定关系:

显示employee ID的字段默认是input field,需要将其改成value help:

改成Object Value Selector:OVS

选择/SAP_BYD_APPLICATION_UI/publicovs/employeeid/
EmployeeID: 作为OVS Component:

把字段:ToEmployee.CurrentCommon.Person.Name.GivenName拖到第三列:

familyName拖到第四列:

把GivenName的display type设置为Static Text:

右边properties下拉菜单里,选择AdvancedListPaneVariant: ListPaneVariant:

useToolbar从false改成true:

设置成true之后,多了两个按钮:Add Row和Remove.

选中Add Row按钮,新建一个Event handler:

新建一个operation,类型为List:

Target List里,从下拉菜单选择/Root/DataList:

给Remove按钮也添加一个event handler:

再添加一个save action,确保Row被删除后自动保存:

选中identificationRegion:

点击Advanced:

选择CarParkID:

最终效果:

选中SectionGroup,可以对里面的字段进行位置顺序调整:

最后把用户分配到这个新建好的work center即可:

现在就可以进行测试了:

更多Jerry的原创文章,尽在:“汪子熙”:

一步步使用SAP C4C Cloud Application Studio创建一个BO和对应的屏幕相关推荐

  1. C4C Cloud Application Studio做ABSL开发的一些性能方面的最佳实践

    Stefan Hagen在博文SAP Cloud Application Studio Performance Best Practices里介绍了在C4C里使用Cloud Application S ...

  2. 关于SAP Cloud for Customer Cloud Application Studio登录失败的问题

    使用SAP C4C Cloud Application Studio登录时,可能会遇到如下错误: 错误消息: you are already logged on to the SDK on syste ...

  3. 如何下载 SAP Cloud for Customer Cloud Application Studio

    SAP Cloud Application Studio 是 SAP C4C 二次开发工具. 下载网址: https://support.sap.com/en/index.html 登录 SAP su ...

  4. SAP Cloud for Customer Cloud Application Studio的Trace功能

    You can activate tracing on any system that you can log on to with your developer user account. When ...

  5. 使用Cloud application Studio在C4C UI里创建下拉列表(dropdown list)

    2019独角兽企业重金招聘Python工程师标准>>> 在Cloud Application Studio里新建一个Code List Data Type: 维护Value和描述信息 ...

  6. Android Studio SVN配置忽略文件 1.用Android Studio创建一个项目,会在根目录和Module目录下自动生成.gitignore文件,貌似是Git的配置文件,

    Android Studio SVN配置忽略文件 1.用Android Studio创建一个项目,会在根目录和Module目录下自动生成.gitignore文件,貌似是Git的配置文件,和SVN没有关 ...

  7. 使用 SAP Business Application Studio 创建 Fiori Elements 应用显示 OData 服务的数据

    关于 SAP Fiori Elements 的介绍,请参考我这些文章: 在没有任何前端开发经验的基础上, 创建第一个 SAP Fiori Elements 应用 答网友提问:使用 SAP Fiori ...

  8. 为SAP Analytics Cloud的story创建持久化页面

    在SAP Analytics Cloud Story标签页里新建一个页面,或者选中默认的page,选择Rename进行重命名: 例如改成Jerry first page. 工具栏里点击如下按钮,插入一 ...

  9. android studio创建一个类继承application_带你全方位了解Android中的Context

    这道题想考察什么? 是否熟悉Context类结构 是否熟悉Application,Activity,Service和Context的依赖关系 Application,Activity,Service中 ...

最新文章

  1. mysql 查询结果转置_转置MySQL查询 – 需要将行放入列中
  2. 2019/4/4 动态规划
  3. 83.76%任职回报!这位「互联网研霸」基金经理的作业赶快抄!
  4. T4((Text Template Transformation Toolkit))模版引擎之基础入门 C#中文本模板(.tt)的应用...
  5. byte[]、sbyte[]、int[]以及Array的故事
  6. HTML5和CSS3:游戏的变革Flexbox
  7. python两个字典合并、相同key值保留_Python两个字典key相同的值组成新字典?
  8. JeeSite 4.0 规划(二)
  9. python教程我要自学网-我要自学网--json 数据解析-python。
  10. linux系统编译Q,Linux下安装qBittorrent,开启24小时挂机BT下载
  11. 《阿里巴巴大数据实践-大数据之路》读后感言
  12. 英语口语练习四十三之7种方式说“温柔”
  13. 基于共识算法和区块链模拟实现超级账本
  14. pythondjango教程_【秒懂】号称最为简明实用的Django上手教程
  15. FANUC机器人进行全部备份和镜像备份以及加载备份文件的具体操作(图文)
  16. 15年前,一则公路旁的Google的招聘广告
  17. Unity小技巧——延时销毁GameObject
  18. 函数周期表丨时间智能丨表丨SAMEPERIODLASTYEAR(修订)
  19. [附源码]计算机毕业设计Python+uniapp家政服务系统小程序7na26(程序+lw+远程部署)
  20. 创维E900-S,非高安-卡刷-刷机固件及教程

热门文章

  1. SpringCloud学习成长之路 五 路由器网关
  2. Linux CentOS6编译安装Python2.7
  3. 96D - Police Stations
  4. 【干货】Html与CSS入门学习笔记12-14【完】
  5. 在RelativeLayout中对控件的显示隐藏操作问题
  6. HTML5能为我们带来什么?(一)
  7. 用户权限 组 特殊权限
  8. 【windows8开发】C++开发WinRT组件和JS调用
  9. 第2本书:CCIE Practical Studies, Volume II-第5天
  10. LeetCode Wiggle Sort II