Skip to Content
0

Batch Request - CHANGESET_BEGIN

Mar 14, 2017 at 05:54 PM

81

avatar image

Hi experts,

I have some doubts when I send a batch request from SAPUI5.

First of all, there are two CHANGESET_BEGIN methods.

  • /IWBEP/IF_MGW_CORE_SRV_RUNTIME~CHANGESET_BEGIN
  • /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN

If I use the first one I received a table with all the request I have sent with its corresponding entity_name and entity_data. Then I convert the xml data and I am able to work with it. Searching about that I read the method that have to be used is the second one (....APPL_SRV_RUNTIME~CHANGESET_BEGIN) but here, I don't received any data from SAPUI5.

It's ok use the CORE_SRV_RUNTIME~CHANGESET_BEGIN?

If yes, I have to add some code to this method? In order to call the corresponding UPDATE_ENTITY methods?

Thanks in advanced,

Regards.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Krishna Kishor Kammaje
Mar 17, 2017 at 04:12 AM
0

Hi Marcos,

You have to use '/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN'. None of the methods from the interface /IWBEP/IF_MGW_CORE_SRV_RUNTIME should be redefined.

By your question, it looks like you want to process all requests at once. In that case, you have to set flag cv_deferred_mode = true in the changeset_begin method. Then move on to the changeset_process method. Here you get all the requests together.

Share
10 |10000 characters needed characters left characters exceeded
Marcos Díez Mar 21, 2017 at 11:21 AM
0

Hi Krishna,

Thanks for your answer. It was what I needed.

Only a doubt more:

Once I get the structure of each request I should call the corresponding update/create/get_entityset method of my entities from the changeset_process, right?

Thanks in advanced,

Regards.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

You can do that way, or call a BAPI if it can do all the work together. For example in a case of creating a SalesOrder header and item.

1