Skip to Content
0

changeSet_process question

Nov 13, 2017 at 07:25 AM

60

avatar image

Hi experts.

I am redefine method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_PROCESS

for update my odata v2 model. I fill changing table CT_CHANGESET_RESPONSE(fill entity_data from my internal table for each entry ) by example in class /IWBEP/CL_MGW_RT_SFLIGHT.

And when I do :

m.submitChanges({
"success": function(d, r) {
t.getView().setBusy(false);
var resp = d.__batchResponses[0];

...

}

In success method i am getting empty response(No content).

Maybe i need to do something else? Maybe i need fill headers in CT_CHANGESET_RESPONSE?

2l9uk.png (10.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Iftah Peretz
Nov 22, 2017 at 04:07 PM
0

Hey Alex,

I'm assuming you got all your connections set and you have established a CRUD able channel.

Given all that, based on the example method you provided, /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_PROCESS, are you changing the CT_CHANGESET_RESPONSE parameter? As you already suspected it will contain the response (look at the structure that contains the fields: operation_no, entity_data etc, clearly an indication for a response change).

Furthermore, in the private method HANDLE_CHANGESET_CREATES you can see the call to method COPY_DATA_TO_REF and above it the comment states that we set the response data and later append it to the response table, i.e. CT_CHANGESET_RESPONSE.

Bottom line, return values in CT_CHANGESET_RESPONSE based on what you changed and you will see them in the success method.

Share
10 |10000 characters needed characters left characters exceeded
Alexander K Nov 23, 2017 at 01:54 AM
0

Hello, Iftan.

Thanks for answer, but I append data in CT_CHANGESET_RESPONSE and in success method response is empty


LOOP AT lt_patch_info INTO ls_patch_info.

    ASSIGN ct_changeset_response[ operation_no = ls_changeset_request-operation_no ] TO FIELD-SYMBOL(<fs_resp>).
    CHECK <fs_resp> IS ASSIGNED.

    ls_changeset_request = VALUE #( it_changeset_request[ operation_no = ls_patch_info-operation_no ]  OPTIONAL ).
    CHECK NOT ls_changeset_request IS INITIAL.

    ls_changeset_request-entry_provider->read_entry_data( IMPORTING es_data = ls_entity ).

    SELECT SINGLE * INTO @DATA(ls_user)

       FROM zvdfi_cds_users

       CLIENT SPECIFIED

       WHERE class = @ls_patch_info-usergroup AND mandt = '301'.


      ls_user-bukrs = ls_patch_info-bukrs.

       copy_data_to_ref( EXPORTING is_data = ls_user CHANGING cr_data = <fs_resp>-entity_data ).

ENDLOOP.


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

And the activation of the method from the front end (the controller) is working?

0

I don't understand, what is activation.

But breakpoint in back-end work and abap debugger stand in

/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_PROCESS and in debugger i can see than table

CT_CHANGESET_RESPONSE has entries at the end of method.

Maybe i need fill headers in CT_CHANGESET_RESPONSE?

0