cancel
Showing results for 
Search instead for 
Did you mean: 

Reading HTTP Headers of Request in PUT method

former_member188019
Active Participant
0 Kudos

Hi All,

We are able to read HTTP Headers of request in POST method, but not in PUT method.

in POST method (zentitySet_CREATE_ENTITY), we are able to read HTTP headers of request using following code.

    DATA: lt_request_header TYPE tihttpnvp,

          ls_request_header TYPE ihttpnvp.

    lt_request_header = me->mr_request_details->*-technical_request-request_header.

    READ TABLE lt_request_header INTO ls_request_header WITH KEY name = 'headername'.

Reading HTTP Headers, in PUT method (zentitySet_UPDATE_ENTITY), although the above code is comipling properly, it is giving runtime error

SYSTEM_DATA_ALREADY_FREE

Accessing data that has already been released is not permitted.

in PUT method, how can we get reference to request_header table.

thanks,

Madhu_1980

Accepted Solutions (0)

Answers (1)

Answers (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Madhu,

Check the below once :

DATA lo_dp_facade TYPE REF TO /iwbep/if_mgw_dp_facade.

lo_dp_facade = /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).

lt_clnt_headers = lo_dp_facade->get_request_header( ).

Regards,

Ashwin

former_member188019
Active Participant
0 Kudos

Ashwin, I tried in PUT method, it is gving the same runtime error, inside the method get_request_header()

Former Member
0 Kudos

I have the same problem as solved?

former_member188019
Active Participant
0 Kudos

Not resolved,

we converted the PUT method/service into POST method. Not using PUT now.

in POST (create entity) method, we are able to read headers properly.