一段在C4C里触发S4HANA outbound Delivery的ABSL代码
作者:互联网
同时也展示了ABSL里如何调用第三方的web service:
/*
Add your SAP Business ByDesign scripting language implementation for:
Business Object: CustomerQuote
Node: Root
Action: triggerOutboundDeliveru
Note:
- To access the elements of the business object node,
use path expressions, for example, this.<element name>.
- To use code completion, press CTRL+J.
*/
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的原创文章,请关注公众号"汪子熙":
标签:URLParameter,outbound,OutboundDeliveryID,URLParameterEntry,required,Delivery,ABS 来源: https://www.cnblogs.com/sap-jerry/p/12189035.html