cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Request - CHANGESET_BEGIN

mdiez
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor
0 Kudos

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.

Answers (1)

Answers (1)

mdiez
Participant
0 Kudos

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.

kammaje_cis
Active Contributor

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.