如何在SAP C4C里使用ABSL消费第三方Restful API
首先我们得有一个可以正常工作的Restful API:
然后在Cloud for Customer的Cloud Application Studio里创建Restful API的模型,把第一步可以正常工作的Restful API url填进模型里去:
然后在ABSL里使用如下代码进行消费:
import ABSL; if( this.OutboundDeliveryID.IsInitial() == false){ raise already_delivered.Create("E"); return; } var HttpMethod = "GET"; var HttpResource = ""; // not required var ContentType = ""; // not required var Body = ""; // not required var HeaderParameter : collectionof NameAndValue; // not required var URLParameter : collectionof NameAndValue; var URLParameterEntry : NameAndValue; URLParameterEntry.Name = "SoID"; URLParameterEntry.Value = this.ID.content; URLParameter.Add(URLParameterEntry); var response = WebServiceUtilities.ExecuteRESTService("JerryExternalService", "JerryExternal", HttpMethod, HttpResource, URLParameter, HeaderParameter,ContentType, Body); this.OutboundDeliveryID = response.Content; raise delivery_message.Create("S", this.OutboundDeliveryID);
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关推荐
Eiceblue 2020-08-02
ahnjwj 2020-07-28
playis 2020-06-28
playis 2020-06-16
ahnjwj 2020-06-12
84560296 2020-06-10
84560296 2020-06-09
84560296 2020-06-08
84560296 2020-05-30
81901836 2020-05-26
beibeijia 2020-05-16
85291545 2020-05-01
84560296 2020-04-10
fanix 2020-04-09
bapinggaitianli 2020-04-07
84560296 2020-03-27
85291545 2020-03-26
82911731 2020-03-25