• 如何让SAP C4C自定义BO实现附件上传的功能


    My series of Cloud Application Studio Blogs

    I began to learn how to use Cloud Application Studio today and I record what I have learned into this blog regarding how to enable attachment upload functionality for my custom BO.
    (1) Create a new BO for example TestBO by copying the following source code in Cloud studio and activate it. Here an association to depedent object AttachmentFolder is declared.

    import AP.Common.GDT as apCommonGDT;
    businessobject TestBO {
    [Label("Agreement ID")] [AlternativeKey] element AgreementID:ID;
    		[Label("Start Date")] element StartDate:Date;
    		[Label("Close Date")] element CloseDate:Date;
    		[DependentObject(AttachmentFolder)] node Attachment;
    }
    

    (2) Create all necessary UI screens via wizard by right clicking the created BO and choose “Create Screens” from context menu. Once done you should have several automatically created artifacts as displayed below.

    (3) Assign your business user to the created work center floorplan and after you log on the system, you should see the below OWL with only one “Export” button existing in toolbar. Without New button it is not possible for us to create some test data. As a result we have to create the New button manually.

    Open the OWL in UI Designer, select the toolbar in OWL and click “Configure” button in property tab:

    Select “My Button” and click the triangle to move it to the right part.

    Choose “QuickCreate” as Semantic, and for OnClick property, leave it as blank.

    Under Thing Type section, bind the “Associated Thing Type container” to BO ID field.

    And then bind this BO ID field to the automatically created Thing Type Object.

    Now you could create new BO instance by pressing the New button, and quick create UI will be displayed:



    Click the hyperlink and now you can reach the Thing inspector UI.

    Remove unused tab and only keep Attachments tab. Locate the document reuse UI from path listed below, drag it from Configuration Explorer and drop to the area of Attachments tab.

    Click Bind button, bind Controller root node to the NodeReference Binding under Interface in the right.

    Now you could create new attachment file for a given test BO instance.

    Once you have created an attachment and successfully saved it, next time you open the Thing inspector UI, you can observe there is a HTTP request which fetches the attachment data from backend.

    In the response, the structure fields are exactly mapped to the corresponding fields in attachment DO.

    要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  • 相关阅读:
    搭建视频网站光线cms
    Linux FTP服务配置
    Chromium下载地址
    Ubuntu Server批量ping选择最快源
    vs2010扩展
    私有云
    mssql格式化输出
    CSLA .NET 3.6支持Silverlight 2
    Unity Application Block 1.2 for Silverlight December 2008
    silverlight寻奇 Graphite
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/13585948.html
Copyright © 2020-2023  润新知