一段在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);

本文来自云栖社区合作伙伴“汪子熙”,了解相关信息可以关注微信公众号"汪子熙"。

相关文章
|
3月前
|
数据库
什么是 SAP ABAP 的 Draft Handling 特性
什么是 SAP ABAP 的 Draft Handling 特性
20 0
SAP WM 高阶之2-Step Picking for Outbound Delivery
SAP WM 高阶之2-Step Picking for Outbound Delivery
SAP WM 高阶之2-Step Picking for Outbound Delivery
Determination of movement type in SAP STO outbound delivery
Determination of movement type in SAP STO outbound delivery
Determination of movement type in SAP STO outbound delivery
|
数据挖掘
SAP QM 在Quality Notification里维护Internal Note
SAP QM 在Quality Notification里维护Internal Note
SAP QM 在Quality Notification里维护Internal Note
SAP MM 如何看一个Inbound Delivery单据相关的IDoc?
SAP MM 如何看一个Inbound Delivery单据相关的IDoc?
SAP MM 如何看一个Inbound Delivery单据相关的IDoc?
一段在SAP C4C里触发S4HANA outbound Delivery的ABSL代码
一段在SAP C4C里触发S4HANA outbound Delivery的ABSL代码
使用BAPISDORDER_GETDETAILEDLIST创建S/4HANA的Outbound Delivery
要在S/4HANA里创建Outbound Delivery,首先要具有一个销售订单,ID为376,通过事务码VA03查看。
How to switch on HANA live configuration customizing
How to switch on HANA live configuration customizing
113 0
How to switch on HANA live configuration customizing
|
SQL 数据库
SAP Commerce Cloud 切换 delivery mode 会触发 promotionresult 的删除
SAP Commerce Cloud 切换 delivery mode 会触发 promotionresult 的删除
SAP Commerce Cloud 切换 delivery mode 会触发 promotionresult 的删除
SAP Spartacus delivery mode页面Cannot find control with的错误消息
SAP Spartacus delivery mode页面Cannot find control with的错误消息
106 0
SAP Spartacus delivery mode页面Cannot find control with的错误消息