当前位置:网站首页>Attachment handling of SAP Fiori
Attachment handling of SAP Fiori
2022-07-25 16:24:00 【Jerry Wang】
With SAP CRM Fiori Application, for example . Attachment processing has two levels , That is to say Fiori UI Show attachments on ( Read operation ), And by Fiori UI Create attachments ( Write operation ).
Attachment The read
As shown in the figure below , Click any Attachment Hyperlinks ,
That is, automatically open the browser download window .
It's time to OData Corresponding implementation system , such as AG3 backstage , Things code SEGW, open CRM_OPPORTUNITY OData project , Create a file called Opportunity_Attachments Of association, Point to a name OpportunityAttachment Of Dependent Entity.
Opportunity and OpportunityAttachment The relationship between models is 0:n, That is, a Opportunity It's not allowed to attachment, Multiple attachment.
Attachment Model fields for :
We can do it in AG3 To set breakpoints , debugging attachment Read requests for :
Fiori UI Put what you want to read attachment The instance information passes through SAP UI5 Pass the code to the background ABAP:
Last call CL_CRM_OPPORTUNITY_DPC_EXT~GET_STREAM Methods from AG3/001 Read attachment data on the system :
Fiori The front desk is S3.view.xml It uses UploadCollection Control to display attachments .
When Attachment When the tab is clicked , Trigger attachmentsTabSelected Method :
In this method , Manual call OData API Initiate reading data to the background OData request :
var info = this.getView().byId('info');
var headerGuid = info.getModel('json').getData().Guid;
var oModel = this.oModel;
var sPath = this.sPath;
// get the list to set the post url param
var that = this.getView();
oModel.read(sPath, null, [
"$expand=Attachments"
], true, jQuery.proxy(function(odata, response) {
var data = {
OpportunityAttachments: []
};
var length = response.data.Attachments.results.length;Attachment The creation of
Click on + Icon , Choose a file to upload locally :
SAP UI5 Control can display the uploaded progress bar :
Trigger the background CL_CRM_OPPORTUNITY_DPC_EXT~CREATE_STREAM Method :
CREATE_STREAM Method to create a flow ( Media resources ) And corresponding entities ( Media link entries ). Additional information can be found in Slug In the head . The layout of creating media link entries is performed first HTTP Post, It only contains binary data . Be careful , It is not allowed to publish the item itself first , Then release relevant media resources . be based on Slug head , Developers can pass additional information to the server , for example , The server can be used to store binaries ( Media resources ) And create entities ( Media link entries ) Created framework . Newly created entity ( Media link entries ) stay HTTP The response is sent back to the user , The response can be updated with appropriate data . The updated entry will be in HTTP Put Send to SAP NetWeaver Gateway System , To complete the creation of media resources / The process of media link entries .
边栏推荐
猜你喜欢

城市燃气安全再拉警钟,如何防患于未“燃”?

Verifiable random function VRF

Which led display manufacturer is better

进程之间的通信(管道详解)

Quickly deploy mqtt clusters on AWS using terraform

Baidu rich text editor ueeditor single image upload cross domain

Paper notes: highly accurate protein structure prediction with alphafold (alphafold 2 & appendix)

Use huggingface to quickly load pre training models and datasets in moment pool cloud

2w字详解数据湖:概念、特征、架构与案例

食品安全丨无处不在的冷冻食品,你真的了解吗?
随机推荐
Typescript learning 1 - data types
使用 Terraform 在 AWS 上快速部署 MQTT 集群
解决Win10磁盘占用100%
测试框架-unittest-跳过测试
微信小程序不使用插件,渲染富文本中的视频,图片自适应,plus版本
Pagehelper.startpage is not effective
Lazy loading of pictures
使用Huggingface在矩池云快速加载预训练模型和数据集
Upgrade esxi6.7.0 to 7.0u3f (updated on July 12, 2022)
mysql 表写锁
MySQL explicit lock
MYSQL导入sqllite表格的两种方法
MySQL页锁
Intention lock
The annualized interest rate of treasury bonds is too low. Is there a financial product with a higher annualized interest rate than the reverse repurchase of treasury bonds?
论文笔记:Highly accurate protein structure prediction with AlphaFold (AlphaFold 2 & appendix)
从业务需求出发,开启IDC高效运维之路
MySQL read / write lock
Win11自带画图软件怎么显示标尺?
意向锁(Intention Lock)