on 07-21-2015 5:05 PM
Hello,
We are doing a batch request with below payload.
PUT SubstitutionPeriodSet(SubstitutedPerNr='12345678',Begda=datetime'2015-07-14T00%3A00%3A00',Endda=datetime'2015-07-30T00%3A00%3A00') HTTP/1.1
Accept-Language: de
Accept: application/json
MaxDataServiceVersion: 2.0
DataServiceVersion: 2.0
Content-Type: application/json
Content-Length: 114
{"SubstitutedPerNr":"12345678","Begda":"\/Date(1436832000000)\/","Endda":"\/Date(1438300800000)\/","Leaveflag":""}
The method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_PROCESS is implemented for processing. We are able to get the entry key with below code.
ls_changeset_request-entry_provider->read_entry_data( IMPORTING es_data = ls_subst ).
My question: How can i get the body of the request. In this case content of below line.
{"SubstitutedPerNr":"10096395","Begda":"\/Date(1436832000000)\/","Endda":"\/Date(1438300800000)\/","Leaveflag":""}
Thanks
Pradeep
The option you are using is called deferred batch which was introduced in SP9.
If this option is used the framework would allow the developer/user to process all the operations in the batch as per own convenience, thus not propagating the calls to default implementations.
You can access the payload from IT_CHANGESET_REQUEST in ENTRY_PROVIDER using the following method
entry_provider->read_entry_data( IMPORTING es_data = work_area ).
Hope this helps.
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pradeep,
Inside the Update_Entity Method,
1. Get the Key first.
READ TABLE it_key_tab WITH KEY name = '<Property_Name>' INTO ls_key_tab.
<lv_property_value> = ls_key_tab-value.
2. Read the payload only if <lv_property_value> ( Key ) is not initial.
io_data_provider->read_entry_data( IMPORTING es_data = <ls_input_structure> ).
Where <ls_input_structure> is the structure as per the GW Model and this will have the payload details now.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
call METHOD IO_DATA_PROVIDER->READ_ENTRY_DATA
IMPORTING
ES_DATA = ER_ENTITY.
you can use the above statement in the PUT handler ( UPDATE_ENTITY ) to get the data . Even though you are using batch you will get control in this method as this is the handler for the PUT ( for other operations also the same)
Sree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.