Skip to Content
avatar image
Former Member

Java Script exit method on XSA using Batch requests.


I have an issue regarding the JS exit method on XSA. Here are the detailed steps whichi have done.

First of all, I have a CDS view with a simple entity:

entity BusinessPartner {  
     key BusinessPartnerID: Integer; 
     isCustomer: hana.TINYINT;
     Name: String(100);   
     isSupplier: hana.TINYINT;

Then, a simple odata service:

service namespace "SUPPLY_CHAIN_TRACKING"{  
   ""                        as "BusinessPartnerSet" 

At this moment, everything is perfect.

In the next step, I want to use a JS function exit on entity creation, so, I created a businessPartnerCreateMethod.xsjslib file, and on that file I have a createMethod with some insert logic.

The next step is to change the odata service declaration:

service namespace "SUPPLY_CHAIN_TRACKING"{  
   ""                        as "BusinessPartnerSet"  
create using"xsjs:businessPartnerCreateMethod.xsjslib::createMethod"; }

When I do a simple POST request, everything is working. The create method is called, everything is ok.

The problem comes, when I do the Batch request. On Batch request, the error message says:

{"error":{"code":500,"message":{"lang":"en-US","value":"context.functionExecutor is not a function"}}} (It works for a simple POST request!)

Any help will be appreciated. Thank you.

P.S If someone need more information, I can provide it.

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Hi Alex, did you find a solution by any chance?

  • Former Member Former Member

    Hi Neha. Unfortunately not.

  • Former Member

    I managed to run it with a single request and the workaround was to turn the batch request mode off in the SAPUI5 app. But I don't know the way to fix it while using the batch mode.

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 26, 2017 at 06:45 AM

    Hi Alexandru,

    the issue should be solved with SAP note 2421178

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded