在SAP C4C TI(Thing Inspector)頁面裏添加自定義UI

SAP C4C的自開發UI可以放到Embedded Component裏去,如下圖所示,在Cloud Application Studio裏創建一個新的Embedded Component:

我在這個自開發頁面裏就放了一個input field:

如果想把包含了這個input field的Embedded Component放到Sales Lead的TI頁面去,UI designer裏切換到Extensibility explorer,選中想要把EC放置到的目標區域,點擊按鈕:Add Embedded Component to Pane:

彈出對話框,在Embedded Component字段裏,選擇我們剛剛創建的EC:

Embedded Component必須提前創建好Inport,這個例子裏我創建的Inport取名fromLead, 有一個輸入參數ObjectID

左邊的Source區域,Outport選擇PublicOutportECLeadProduct,參數選擇SalesLeadID,點擊Bind進行綁定。這樣TI頁面的Lead ID的值就能傳遞到Embedded Component裏了:

生成的change transaction如下:



<ChangeTransaction xmlns="http://www.sap.com/a1s/cd/oberon/uimodelchange-1.0" embeddingContext="" userType="Partner" user="K903ZOYBX3I" type="AddRemoveECToScreen" xrepPath="/YS5XJ942Y_MAIN/CHANGE_TRANSACTIONS/Partner/AddRemoveECToScreen/45d47fb08c09448f8e31d0df0871ff8d.uichange" id="9386162a9e6f4ac083855959e6441d38">


<UsedAnchor type="PaneContainerAnchor" xrepPath="/SAP_BYD_UI_FLEX/STABLE_ANCHORS/PaneContainerAnchor/UY3wFQ8MMqAhxwrWp2Co3G.uianchor">

<ReferencedAnchor type="OutPortAnchor" xrepPath="/SAP_BYD_UI_FLEX/STABLE_ANCHORS/OutPortAnchor/_9sw_Z26$4kqtD5LK_7isW.uianchor"/>


<AddECtoScreen title="Jerry Embedded Component test" textPoolId="7b909085b8bb4df1a3ba78467bbea288" InportName="fromLead" targetComponentID="/YS5XJ942Y_MAIN/SRC/ARCard/EC031801.EC.uicomponent">

<PassParameter inParamName="ObjectID" outParamName="SalesLeadID"/>

</AddECtoScreen>

</UsedAnchor>

</ChangeTransaction>

要獲取更多Jerry的原創文章,請關注公衆號"汪子熙":

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章