cancel
Showing results for 
Search instead for 
Did you mean: 

Could i modify 'REQUEST' or 'RESEPONSE' data ?

Former Member
0 Kudos

Hi Gurus,

For some custome reson, i need change REQUEST data after 'PROCESS_ENTITY_SET' or 'PROCESS_ENTITY' method, but before certain specified operation method, such as 'READ_ENTITY' 'CREATE_ENTITY' method.

I need get request data from 'io_request', change data according some rule, update it back to REQUEST. Then go into specified operation method.

I`m not sure this could be done, maybe not. Any hits appreciated.thanks.

Regards,

Archer

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184867
Active Contributor
0 Kudos

Request data can not be modified. response data can be modified using the APIS provided by Gateway framework exposed via the DPC/MPC class.

What specific information would to like to change/ influence ?

Former Member
0 Kudos

HI Atanu,

We have a scenario to do 'Value Mapping' during user call OData service. All the exsiting OData service need do this kind of mapping.

regards,
Archer

AshwinDutt
Active Contributor
0 Kudos

Hello Zhang,

Based on input you read in GW level, you can do all required operations and send back the desired response to GW without overriding standard flow of the GW frame work.

For Update and Create operations you can read the payload using IO_DATA_PROVIDER

io_data_provider->read_entry_data(
IMPORTING
es_data
= <Local_Structure> ).


This local structure will have all the details sent as part of payload.

For Get/Delete operation also you can do it based reading KEYS and FILTER parameters.

For Filters IT_FILTER_SELECT_OPTIONS will have all the filters sent as part of input in the URL for QUERY Operation.

For Keys IT_KEY_TAB will have all the Keys sent as part of input in the URL for READ operation

or you can use IO_TECH_REQUEST_CONTEXT to get the above details.

snippet ->

DATA lo_filter TYPE  REF TO /iwbep/if_mgw_req_filter.

DATA lt_filter_select_options TYPE /iwbep/t_mgw_select_option.

  lo_filter = io_tech_request_context->get_filter( ).

  lt_filter_select_options = lo_filter->get_filter_select_options( ).

Same for KEYS as well.

Regards,

Ashwin