cancel
Showing results for 
Search instead for 
Did you mean: 

Service Layer - batch request with changesets in XSJS

Former Member
0 Kudos

Hi!

I am working on an XsJob for a new Customer and I am having issues to send a batch request from XsJob side to Service Layer.

My goal is to do two operations (update on sales order & add new pick list) within a single transaction, so that a rollback is done if one of the operations fails. The httpdest for Service Layer is already configured, login/logout and other single (GET/POST) operations are working. I am having issues with the batch request because I cannot set the request body correctly for multipart content type within JavaScript.

Ahhh and I tested the batch request with postman and it worked (see here -> How to use Batch operation of SAP HANA Service layer for multiple transaction in one request), but I need a solution for JavaScript with $.web.WebRequest.

I was hoping that you can send me a tutorial link or code sample.

Thanks in advance,
Dénes Albert

Accepted Solutions (1)

Accepted Solutions (1)

former_member197733
Contributor
0 Kudos

We've got a very raw (but working) sample in the HANA Elearning repository.

But I am sure you can make it more pretty 🙂


Former Member
0 Kudos

Great, thanks!

Let me test it and I will get back to you.

Former Member
0 Kudos

Thanks for your help Ralph.
It works!

former_member197733
Contributor
0 Kudos

Happy to help.

If you polish the sample. Don't forget to make a pull request 🙂

Answers (0)