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

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > windows >内容正文

windows

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

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

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

實現(xiàn)步驟概述:

(1) client System創(chuàng)建outbound communication.
(2) 在provision系統(tǒng)創(chuàng)建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) 創(chuàng)建一個remote client proxy
(5) 在client System創(chuàng)建一個OData服務(wù),使用Fiori Elements消費并展示從provision系統(tǒng)取回的數(shù)據(jù)

SAP標(biāo)準(zhǔn)發(fā)布的Communication Scenario SAP_COM_0276,提供了SAP Cloud Platform ABAP實例同遠(yuǎn)端的ABAP On-Premises系統(tǒng)或者第三方系統(tǒng)集成的可能性。

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指定了必須的元數(shù)據(jù),包括通信系統(tǒng)和消息認(rèn)證方式等信息,這些元數(shù)據(jù)以Service key的形式存儲。可以基于Communication Arrangement創(chuàng)建Destination.

在SAP云平臺CloudFoundry環(huán)境里創(chuàng)建一個Destination服務(wù)實例:



基于這個Destination服務(wù)創(chuàng)建一個新的Destination實例:


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

給Destination service創(chuàng)建一個新的service key,將其內(nèi)容保存在本地:

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



在Communication Arrangement tile里,創(chuàng)建一個新的實例:

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


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

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

最后一步,在ABAP client System上創(chuàng)建ABAP 實現(xiàn)類:

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行的參數(shù)i_name的值,就是之前在SAP Cloud Platform里創(chuàng)建的Destination名稱。

i_service_instance_name, 就是創(chuàng)建的Communication Arrangement additional properties里創(chuàng)建的Service instance name的值。

執(zhí)行ABAP類,測試結(jié)果如下:

要獲取更多Jerry的原創(chuàng)文章,請關(guān)注公眾號"汪子熙":

總結(jié)

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

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。