日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

SAP云平台上两个ABAP系统实例之间的互连

發布時間:2023/12/19 windows 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SAP云平台上两个ABAP系统实例之间的互连 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

場景:SAP云平臺上的兩個ABAP系統實例,一個作為數據的提供者-provision system;另一個作為數據的消費者 - client system,后者從前者讀取數據,并顯示

實現步驟概述:

(1) client System創建outbound communication.
(2) 在provision系統創建inbound communication.
(3) Create a Service Consumption Model, and save this locally as a $metadata XML file; From this you will create proxy artefacts in the client system, representing the remote service, and use this model to generate an abstract entity.
(4) 創建一個remote client proxy
(5) 在client System創建一個OData服務,使用Fiori Elements消費并展示從provision系統取回的數據

SAP標準發布的Communication Scenario SAP_COM_0276,提供了SAP Cloud Platform ABAP實例同遠端的ABAP On-Premises系統或者第三方系統集成的可能性。

A communication arrangement specifies the metadata for a specific communication scenario, such as your host system and the authentication method. This metadata is contained in a service key. You can then define one or more specific destinations for this arrangement.

Communication Arrangement為Communication Scenario指定了必須的元數據,包括通信系統和消息認證方式等信息,這些元數據以Service key的形式存儲??梢曰贑ommunication Arrangement創建Destination.

在SAP云平臺CloudFoundry環境里創建一個Destination服務實例:



基于這個Destination服務創建一個新的Destination實例:


url字段維護成provision System的url,確保連接能夠成功建立。

給Destination service創建一個新的service key,將其內容保存在本地:

在client System上打開ABAP service instance的dashboard:



在Communication Arrangement tile里,創建一個新的實例:

從Communication Scenario下拉列表里,選擇之前介紹的SAP_COM_0276: SAP CP CF Destination Service integration:


選擇好Communication Scenario后,維護Communication Arrangement的名稱,比如OUTBOUND_XXX.

在Communication Arrangement的additional properties里,將service instance name的值從默認值OUTBOUND_XXX改成更便于記憶的值,比如Outbound-For-Tutorials_XXX.

最后一步,在ABAP client System上創建ABAP 實現類:

CLASS ZCL_OUTPUT_HTTP_XXX DEFINITIONPUBLICFINALCREATE PUBLIC .PUBLIC SECTION.INTERFACES if_oo_adt_classrun.PROTECTED SECTION.PRIVATE SECTION. ENDCLASS.CLASS ZCL_OUTPUT_HTTP_XXX IMPLEMENTATION.METHOD if_oo_adt_classrun~main.TRY.DATA(lo_destination) = cl_http_destination_provider=>create_by_cloud_destination(i_name = 'A4C_ACCESS_XXX_HTTP'i_service_instance_name = 'Outbound-For-Tutorial-XXX'i_authn_mode = if_a4c_cp_service=>service_specific ).DATA(lo_http_client) = cl_web_http_client_manager=>create_by_http_destination( i_destination = lo_destination ).DATA(lo_request) = lo_http_client->get_http_request( ).DATA(lo_response) = lo_http_client->execute( i_method = if_web_http_client=>get ).out->write( lo_response->get_text( ) ).CATCH cx_root INTO DATA(lx_exception).out->write( lx_exception->get_text( ) ).ENDTRY.ENDMETHOD.ENDCLASS.

第18行的參數i_name的值,就是之前在SAP Cloud Platform里創建的Destination名稱。

i_service_instance_name, 就是創建的Communication Arrangement additional properties里創建的Service instance name的值。

執行ABAP類,測試結果如下:

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

總結

以上是生活随笔為你收集整理的SAP云平台上两个ABAP系统实例之间的互连的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。