on 10-14-2015 4:26 PM
I would like to know how I can get the HTTP_METHOD in the GET_ENTITY method. When the HTTP_METHOD is a patch I can skip a lot of ABAP code in the implementation. This would benefit performance. When I debug, I can see the IO_TECH_REQUEST_CONTEXT having a attribute MR_REQUEST. This contains the HTTP_METHOD.
I have not been able to retrieve this data.
Can anyone help me?
I got a hint from Arshad Ansary
I can redefine the PATCH_ENTITY method in the ..........DPC_EXT class.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
from the context value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The scope of this attribute is private the visibility is restricted within the class i.e to methods in the class. so if we capture the value in a method and read this private attribute and returns back then your problem is solved.
so you can go for a small enhancement like pre/post exit and capture the value.
Then using an added new optional parameter you can retrieve the value. Is it the best i don't know but this is technically feasible...
l can try on my system and give u code once i am back to office, but i trust if you try this it will work.
GET_ENTITY_SET is OData Query op and HTTP GET op
GET_ENTITY is OData Read op and HTTP verb is GET.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank yo for your answer. It took a while before I was able to look at it.
I added the following code to get the HTTP_METHOD:
data:
l_http_method type string,
l_r_tech_request type ref to /iwbep/cl_mgw_request.
l_r_tech_request ?= io_tech_request_context.
l_http_method = L_R_TECH_REQUEST->MR_REQUEST->HTTP_METHOD.
Problem is now that the MR_REQUEST is protected and can't be retrieved just like that. I could not find any method in the class to expose the data.
Hi Paul,
No need to create a new z subclass, please have a look to the class '/IWBEP/CL_MGW_REQUEST_UNITTST' which is subclass of '/IWBEP/CL_MGW_REQUEST'.
reference link :
Integration With Unit Test Framework - SAP NetWeaver Gateway - SAP Library
Hope this will get values.
Thanks-
Abhishek
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.