将SAP C4C Custom BO使用ABSL编写的逻辑通过OData服务暴露出去

简介: 将SAP C4C Custom BO使用ABSL编写的逻辑通过OData服务暴露出去

My series of Cloud Application Studio Blogs

How to detect EditMode in an Embedded Component

Step by step to enable your custom BO with attachment upload functionality

Step by step to create an Adobe Print form in Cloud application Studio

How to render PDF which displays picture from the image attachment of your custom BO

How to get current logged on business user’s employee information and assigned organization unit via ABSL

How to implement dynamic access control based on custom BO using OWL

How to make Code List Restriction work when control field and restricted field are not on the same BO

How to implement custom number range using custom business object

Two approaches to create Code List in Cloud Studio

Create Dynamic Code List via Custom Business Object Association

Step by step to develop Thing Type based navigation and BO Object based navigation

Put Extension field into embedded component and make it visible in Standard UI

One possible cause that embedded component fails to display in UI

Step by step to create HTML Mashup and make it visible in UI

Step by step to enable Text Collection for your custom BO

Automatically send an Email notification to line manager via Workflow in Account application

Step by step to create Object Value Selector in Cloud Application Studio

Two approaches to fill an UI field with dedicated logic implemented in Cloud Application Studio

How to execute BO action on multiple selected BO instances in AdvancedListPane

How to add custom validation logic on mobile phone field in Contact TI

An example about how I analyze why some OBN button does not work

Step by step to create OBN button which navigates from standard UI to custom UI

Service Request ticket split – how to bring the selected service request item to new custom UI

Step by step to create two drop down list with dependency

Expose Custom BO logic implemented by ABSL via Custom OData service

Step by step to create web service in Cloud Application studio and bind it to a custom action in standard BO

Suppose you have implemented some logic in a given action of your custom BO via ABSL, it is possible to expose the logic via Custom OData service so that it could be consumed by external applications.

Custom BO:

image.png

And the logic of Calculate action is very simple, just make comparison between current date and the close date. If the current instance is over due, also store the duration to field “Duration”.

image.png

Then go to work center Administrator->OData Service Explorer, create a new Custom OData Service:

image.png

Create a new function import for this OData service, choose Action as import type, specify “DueCheck” as import name, and bind the BO action Calculate to this function import.


image.png

Now test the function import via this BO instance below:

image.png

first get its object id by Agreement ID via OData filter operation:

image.png

https:///sap/c4c/odata/cust/v1/zjerrytestodataservice/TestBORootCollection?$filter=AgreementID eq ‘JERRY2’

Then execute the url appended with the object id found in previous step plus the function import name: https:///sap/c4c/odata/cust/v1/zjerrytestodataservice/DueCheck?ObjectID=’00163E20C98D1EE7A6BD2FF6E7D3F03F’, and the BO action is successfully executed: you could observe the flag isOverDue and field Duration are correctly calculated and returned by this OData service.

image.png


相关文章
|
5月前
|
存储 数据管理 数据处理
SAP CRM 里 Attachment 搜索的实现逻辑介绍
SAP CRM 里 Attachment 搜索的实现逻辑介绍
|
5月前
|
XML API 数据格式
SAP 标准 OData 服务 CATALOGSERVICE;v=2 的作用介绍
SAP 标准 OData 服务 CATALOGSERVICE;v=2 的作用介绍
|
12月前
|
Web App开发 开发框架 前端开发
SAP Fiori Elements 应用中 table id 的生成逻辑
SAP Fiori Elements 应用中 table id 的生成逻辑
|
12月前
|
搜索推荐 前端开发 JavaScript
关于 SAP Fiori Launchpad 工作所依赖的 OData 服务
关于 SAP Fiori Launchpad 工作所依赖的 OData 服务
|
5月前
|
监控 前端开发 数据可视化
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
|
5月前
|
前端开发 数据库 开发者
如何在 SEGW 事务码里为 SAP ABAP OData 服务实现 Function Import 试读版
如何在 SEGW 事务码里为 SAP ABAP OData 服务实现 Function Import 试读版
SAP ABAP OData 服务里需要指定 guid 类型的请求参数时,正确语法是什么?
SAP ABAP OData 服务里需要指定 guid 类型的请求参数时,正确语法是什么?
|
5月前
|
JSON 应用服务中间件 API
使用 ABAP 代码消费 SAP 系统的 OData 服务
使用 ABAP 代码消费 SAP 系统的 OData 服务
|
5月前
|
机器学习/深度学习 人工智能 搜索推荐
SAP Commerce Cloud 智能销售服务 (Intelligent Selling Services)概述
SAP Commerce Cloud 智能销售服务 (Intelligent Selling Services)概述
关于 SAP ABAP OData 服务如何实现 Deep Insert 场景 - SAP 应用的标准行为试读版
关于 SAP ABAP OData 服务如何实现 Deep Insert 场景 - SAP 应用的标准行为试读版

热门文章

最新文章

下一篇
无影云桌面