code .
{
"name": "sdkforsoap",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"soap": "^0.43.0",
"short-uuid": "^4.2.0",
"uuid": "^8.3.2"
}
}
const soap = require('soap');
const short = require('short-uuid');
const uuid = require('uuid');
var sid =short.generate();
var id = uuid.v1();
{encoding:'utf8',flag:'r'});
var options = {
forceSoap12Headers: true
};
var date1 =new Date().toISOString();
var args = {'MessageHeader':{'ID':sid,'UUID':id,'CreationDateTime':date1},'JournalEntryHeader':{'MessageHeader':{'ID':sid,'CreationDateTime':date1},'HeaderKey':{'AccountingDocument':'5100000050','CompanyCode':'1310','FiscalYear':'2022'},'DocumentHeaderTextChange':{'DocumentHeaderText':'hello1','FieldValueChangeIsRequested':true}},'JournalEntryDebtorCreditorItem':{'MessageHeader':{'ID':sid,'CreationDateTime':date1},'ItemKey':{'AccountingDocument':'5100000050','CompanyCode':'1310','FiscalYear':'2022','AccountingDocumentItemID':'1'},'PaymentBlockingReasonCodeChange':{'PaymentBlockingReasonCode':'A','FieldValueChangeIsRequested':true}}};
soap.createClient('./external/JOURNALENTRYBULKCHANGEREQUEST_.wsdl',options,function(err,client){
client.setEndpoint('https://my300018-api.saps4hanacloud.cn/sap/bc/srt/scs_ext/sap/journalentrybulkchangerequest_');
client.setSecurity(new soap.BasicAuthSecurity('username','password'));
// client.addSoapHeader('MessageID',id,'Action','http://sap.com/xi/SAPSCORE/SFIN/JournalEntryBulkChangeRequest_In/JournalEntryBulkChangeRequest_InRequest')
client.addSoapHeader({MessageID:id},'http://www.w3.org/2005/08/addressing','wsa','http://www.w3.org/2005/08/addressing');
client.addSoapHeader({CreationDateTime:date1});
client.setSOAPAction('JOURNALENTRYBULKCHANGEREQUEST_.binding.JournalEntryBulkChangeRequest_In');
client.JournalEntryBulkChangeRequest_In(args,function(err,result){
if(err){console.log(err);}else{console.log(result);}
});
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
38 | |
19 | |
13 | |
13 | |
11 | |
10 | |
10 | |
10 | |
8 | |
8 |