Skip to Content
Feb 01, 2018 at 06:31 PM

$batch issue on CHANGESET_BEGIN



I'm having an issue working with $batch call for multiple entries...

As I already read in a lot of places, I redefined the CHANGESET_BEGIN and CHANGESET_END methods with an EXIT (or empty code).

In the UI5 app I have the following code:

for (var iRowIndex = 0; iRowIndex < aItems.length; iRowIndex++) {
	// here I set oCreateIT9006Data values...
		oCreateIT9006Data, {
			success: function(oData, response) {},
			error: function(oError) {}

If I only have 1 record, the $batch call is raising the success callback function and everything is working fine:

But if I have more than 1 record, the $batch call is raising the error callback function and the "500 Internal Server Error" message:

If I set a breakpoint on CHANGESET_BEGIN and CHANGESET_END methods, I see the 2 records are arriving there into the IT_OPERATION_INFO parameter:

Any idea about what's happening here? Before this method the /IWBEP/IF_MGW_CORE_SRV_RUNTIME-CHANGESET_BEGIN method is called... Do I need to make some changes there?

Thanks !!

Miguel Angel.


changeset.png (11.7 kB)
batch-1.png (18.9 kB)
batch-2.png (30.0 kB)
500-error.png (30.7 kB)
changeset-2.png (53.2 kB)