一段在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的原创文章,请关注公众号"汪子熙":
一段在C4C里触发S4HANA outbound Delivery的ABSL代码

上一篇:题解 CF1443C 【The Delivery Dilemma】


下一篇:HANA S4 1709 数据库安装和备份恢复测试