Skip to Content
avatar image
Former Member

$batch issue on CHANGESET_BEGIN

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.

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 02 at 04:56 PM

    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 !!

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 02 at 01:16 AM

    Hello.

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

    And try to redefine CHANGESET_PROCESS method.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 02 at 11:53 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello, Miguel.

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

      system raises your DUMP.