Skip to Content

sapui5 multi crud operations?

Hi experts,

I'm sending line by line.It's working np. but now I want multi CRUD operations.

I have a record button.I want to send all lines.

deepent.png (44.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jan 02 at 10:27 PM

    Hi Burak,

    You should use $batch operations in order to send multiple items to the same OData service. Your service must provide support for batch operations. Check this blog for UI5 details on how to implement this.

    Regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 04 at 01:34 PM

    Hi,

    you can use $batch option as recommended by ivan and it had to be supported from UI5 and oData service side.

    Check the below blog on implementing batch

    Service side oData Batch

    UI5 implementation Gateway

    Thanks,

    Mahesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 05 at 11:54 AM

    Question “IF variant found with incompatible validity period”

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06 at 06:43 PM

    v2 model has batch enable by default, no need to createBatchOperation

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06 at 06:52 PM

    if you don't anything at your odata service, that is how batch works,

    you can change the default behavior, please read through

    https://help.sap.com/saphelp_gateway20sp12/helpdata/en/90/dc8363306c47d3b2fca1398f5de94b/frameset.htm

    This handling is also called processing a changeset in defer mode.

    When method CHANGESET_BEGIN is called a data provider can use the changing parameter CV_DEFER_MODE to inform the framework that it can process all changeset operations at once (deferred processing). Based on the list of entity set name, entity type name and action name, a data provider can dynamically set the exporting parameter mentioned above to inform the framework that it will process the current changeset at once or to reset this parameter to have a single processing as usual. Default implementation is single processing. That means without any changes in a data provider each changeset operation will be processed one after another as usual.

    If CV_DEFER_MODE is set, the framework will call the data provider using the new method CHANGESET_PROCESS with importing parameter IT_CHANGESET_REQUEST containing a list of change set operations. Each entry of this list contains the technical request context IO_TECH_REQUEST_CONTEXT as usual but also a message container for error or information message happened during the processing. Response data of a change set operation including HTTP custom headers and ETag (if it exists) must be returned in changing parameter CT_CHANGESET_RESPONSE.

    Add comment
    10|10000 characters needed characters exceeded