cancel
Showing results for 
Search instead for 
Did you mean: 

$batch issue on CHANGESET_BEGIN

0 Kudos

Hi,

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...
	oModel.create(
		sPath,
		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.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I finally followed the implementation on /IWBEP/CL_MGW_RT_SFLIGHT class and now it's working...

https://archive.sap.com/documents/docs/DOC-57113

But I really don't understand why I need to set CV_DEFER_MODE parameter and implement CHANGESET_PROCESS method... If not, the above error is raised always !!

Answers (2)

Answers (2)

former_member214867
Participant

Hello.

Check transaction st22. Maybe you have dumps in backend system.

And try to redefine CHANGESET_PROCESS method.

0 Kudos

Hi Alexander,

You are right, I had a DUMP in the backend...

There the system is checking again the total rows, and if more than 1 record is sent, the system raises the DUMP...

If I set a breakpoint, I see the ABAP stack:

Anybody knows how can I avoid this call?

Miguel Angel.

former_member214867
Participant
0 Kudos

Hello, Miguel.

Check method Z***UPDATE_ENTITY(method for update single entity). If you have COMMIT WORK in this method,

system raises your DUMP.