I want to pass an amount of storage units in one step. I need all storage units at once in the CREATE_ENTITY
method in my OData service implementation (CREATE_ENTITY
, or CREATE_DEEP_ENTITY
, or...?), because I have to make a comparison of some values.
I tried a batch request. This doesn't work, because the CREATE_ENTITY
method was called for each storage unit. So I could access only one storage unit in each call.
I also searched for tutorials concerning deep_entities
. But I only find some with deep structures (head - items). But I have a flat structure (key: storage Unit) and want to pass this as table/array to my CREATE_ENTITY
method. It should be possible to do this in SAPUI5.
As workaround I could pass all storage units into a string and pass this to the CREATE_ENTITY
method. But that seems quite amateurish to me.
Here is how I invoke CREATE
method:
onStartVert: function () {
this.oContext = this.getModel().createEntry("/LenumIPunktSet", {
success: this._successSave.bind(this),
error: this._errorSave.bind(this)
});
var oBindingPath = {
path: this.oContext.getPath()
};
this.getView().bindObject(oBindingPath);
var sLenum;
for (var i = 0; i < this._data.LePool.length; i++) {
sLenum = this._data.LePool[i].lenum;
this.getModel().create("/LenumIPunktSet", {
lenum: sLenum
});
}
this.getModel().submitChanges();
this.getRouter().navTo("iPunkt02");
},
The signature for the CHANGESET_PROCESS
method is:
CT_CHANGESET_DATA TYPE /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_T_CHANGESET_DATA
/IWBEP/CX_MGW_BUSI_EXCEPTION Business Exception
/IWBEP/CX_MGW_TECH_EXCEPTION Technical Exception
So, by now there is no table IT_CHANGESET_REQUEST
available.
My entity type has only this one field (lenum
) I need as key.