【发布时间】:2021-03-10 04:41:48
【问题描述】:
我正在尝试通过 lambda/AWS 在 SAP B1 中添加时间表。 我的代码之前已经运行过,但现在它返回了这个错误 - 找不到匹配的记录 (ODBC -2028)。
你能帮帮我吗?
这是我的帖子代码:
addNewAppointment: function(sId, sTitle, sDescription, sDate, sSTime, sETime,sType){
var url = "/destinations/IBC/add";
var query = "ProjectManagementTimeSheet";
var json = {
"servicoSL": query,
"DateFrom": sDate.value,
"PM_TimeSheetLineDataCollection": [
{
"ActivityType": sType.value,
"Date": sDate.value,
"EndTime": sETime.value,
"StartTime": sSTime.value
}
],
"UserID": sId.value
};
$.ajax({
"url": url,
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify(json),
success: function (data) {
},
error: function (error) {
}
});
},
这是按钮的代码:
handleDialogOkButton: function (){
var oId = Fragment.byId("dialogFrag", "userId").getValue(),
oTitle = Fragment.byId("dialogFrag", "appTitle").getValue(),
oDescription = Fragment.byId("dialogFrag", "moreInfo").getValue(),
oSDate = Fragment.byId("dialogFrag", "sDTDate").getDateValue(),
_sDate = new Date(oSDate),
oEDate = Fragment.byId("dialogFrag", "eDTDate").getDateValue(),
_eDate = new Date(oEDate),
oType = Fragment.byId("dialogFrag", "type").getValue();
if (oSDate !== "Error"
&& oEDate !== "Error") {
var sId = oId,
sType = oType.slice(0,2),
sTitle = oTitle,
sDescription = oDescription,
Month = _sDate.getMonth(),
sMonth = Month + 1,
sSDate = _sDate.getFullYear() + "-" + sMonth + "-" + _sDate.getDate(),
sSTime = _sDate.getHours() + ":" + _sDate.getMinutes(),
sETime = _eDate.getHours() + ":" + _eDate.getMinutes();
this.addNewAppointment(sId, sTitle, sDescription, sSDate, sSTime, sETime,sType);
this._oNewAppointmentDialog.close();
} else {
this.getTimeSheet();
}
},
这是我遇到的错误:
【问题讨论】:
标签: javascript ajax sapui5 service-layer