Skip to Content

OData SADL Batchrequest with multiple changesets doesn't work


Hello,
I’m currently developing a UI5 Application.
My oData service is based on SADL, so the implementation to retrieve the data is the generated SADL-standard implementation.
My problem is this: When I try to execute a batch request with multiple changesets, I get a short dump with the error MESSAGE_TYPE_X.
The error occurs in the program  /IWBEP/SAPLFGR_MGW_CLIENT_IF in the commit_check which is executed when commit work is called in /BOBF/IF_TRA_TRANSACTION_MGR~SAVE, because in my case mv_changeset_optotal is > 1.
When I just skip over the commit_check in the debugger, the batch finishes without problem.
Is there any possibility to avoid this check?
What's the sense of a batchrequest, if I can't hand over more than one request? My intention is to make more request by once, for better performance.

Kind regards, Stefan Frank


FORM commit_check .

* Commit Work is allowed for anyone of the following cases:
*   - no ChangeSet
*   - only one operation in Changeset
*   - during CHANGESET_END
  IF  mv_changeset_optotal = 1             OR
     mv_changeset_processing <> abap_true OR
     mv_changeset_end_processing = abap_true.
    EXIT.
  ENDIF.

  MESSAGE x051(/iwbep/cm_mgw_rt).

ENDFORM.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 22, 2015 at 10:50 AM

    Hello Stefan,

    Your Batch consists of only GET Requests ? or GET along with POST/DELETE/UPDATE ?

    If at all you are performing only GET operations inside BATCH, then no need of specifying ChangeSet inside the payload.

    Change_Set is to group all the operations and treat it as a single Logical Unit of Work. Commit is issued only once at the end after successful execution of all those operations.We specify Change_Set for modifying requests or for Change_Set&Retrieval Cases.

    So could you please elaborate what all operations are being done inside a batch request ?

    Regarding issuing Commit or Roll back please have a look at the below under ChangeSet_Begin/End->

    /IWBEP/IF_MGW_APPL_SRV_RUNTIME - SAP NetWeaver Gateway - SAP Library

    Regards,

    Ashwin

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Ashwin,
      Thank you very much for your help, putting the operations into separate changesets solved my problem.
      Before I just inserted all my operations into a single changeset, by calling addBatchChangeOperations just once. I had to call it separately for each operation, and now the batch request works just fine.
      Kind regards, Stefan Frank !