Commit 08528023 authored by Leon Li's avatar Leon Li

Add new file

parent e00643b0
var xhr = new XMLHttpRequest;
var user = "webservice";
var password = "654321";
xhr.setRequestHeader("Content-Type", "text/xml;charset=UTF-8");
xhr.setRequestHeader("Authorization", "Basic " + TDataParse.encodeBase64(user+":"+password));
var url = "http://58.20.243.15:8068/sap/bc/srt/rfc/sap/zfmpp_vbeln/710/zfmpp_vbeln/zfmpp_vbeln_binding";
var werks = 1002;
var body = " \
<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:soap:functions:mc-style\"> \
<soapenv:Header/> \
<soapenv:Body> \
<urn:ZfmppVbeln> \
<EtOutput> \
<item> \
<Werks></Werks> \
<Zgpcno></Zgpcno> \
<Zvkaus></Zvkaus> \
<Matnr></Matnr> \
<Maktx></Maktx> \
<Verid></Verid> \
<Zdtcmj></Zdtcmj>\
<Zsetc></Zsetc> \
<Zsetk></Zsetk> \
<Zbcly></Zbcly> \
<Z1stpcs></Z1stpcs> \
<Kwmeng1></Kwmeng1> \
<Erdat></Erdat> \
<Edatu></Edatu> \
<Zjhtlrq></Zjhtlrq> \
<Zbcgys></Zbcgys> \
<Zbclx></Zbclx> \
</item> \
</EtOutput> \
<Werks>{0}</Werks> \
</urn:ZfmppVbeln> \
</soapenv:Body> \
</soapenv:Envelope> \
";
body = _.format(body, werks);
xhr.open("POST", url, false);
xhr.send(body);
print(xhr.status);
print(xhr.responseText);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment