1 year ago

#381913

test-img

Jünge alles

Set Batch off just for a group of requests

i have a question is there a way to set for consecutive request the batchmodus off? i can set it on the modelbase but than it is deactivated overall -> thats not what i want, just for these example of requests. Why? because we have lagacy code in the backend and there is a commit, commit and batch does not like each other o.o

e.g. => thats just a coded example.

    oData.forEach(element => {
            if (element.isSelected) {
                if (!bValidationError) {
                    oTCGW.create("/TestSet('" + element.test + "')/L", L, {
                        useBatch: false,
                        success: function (oData) {
                            oTCGW.create("/TestSet2('" + element.no + "')/C", C, {
                                useBatch: false,
                                success: function (oData2) {
                                    oTCGW.callFunction("/TestFunc", {
                                        useBatch: false,
                                        method: "POST",
                                        urlParameters: {
                                            no: element.no,
                                            name: name,
                                            plate: plate
                                        },
                                        success: function (osuccess) {
                                            that.oParentController._readDataFromBackendFull();
                                            that.onPressExit();

                                        },
                                        error: function (oerror) {

                                        }

                                    });
                                },
                                error: function (odata2) {

                                }

                            });
                        },
                        error: function (oData) {

                            }
                    });

sapui5

sap-fiori

0 Answers

Your Answer

Accepted video resources