cancel
Showing results for 
Search instead for 
Did you mean: 

Reading header fields from WebDynpro for ABAP

Former Member
0 Kudos
591

Hello,

i want to read the header fields from my webdynpro-application.

i hope it is possible to read all the fields like it is done in the BSP-App under 8. 8. http://host:port/sap/bc/bsp/sap/it00

i tried to use the class cl_http_request but there were nothing.

please help me,

best regards,

Michael

View Entire Topic
Former Member
0 Kudos

I have found the solution...

best regards,

Michael

DATA: cl_request  TYPE REF TO IF_HTTP_REQUEST,
        lt_header_fields TYPE tihttpnvp,
        ls_header_fields LIKE LINE OF lt_header_fields.

  cl_request = wdr_task=>request.
  DATA: name TYPE string,
        value TYPE string,
        data TYPE xstring.
  CALL METHOD cl_request->if_http_entity~get_header_fields
    CHANGING
      fields = lt_header_fields.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Direct access to the wdr_task object is not supported by SAP. SAP can make incompatible changes to this object at any time.

Former Member
0 Kudos

Thank you Thomas,

is there any other way to get the same result?

best regards, michael

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

URL parameters can be read within an input plug:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/frameset.htm

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/2233b60c21072ce10000000a155369/frameset.htm

This should give you access to application specific headers. There are APIs for reading some of the system level headers. For instance in IF_WD_APPLICATION, you can get the Remote IP address and the Client Environment. These methods are just wrappers around WDR_TASK, but they ensure safe and permanent access to it.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/036b1fdc7e22f2e10000000a1553f7/frameset.htm

0 Kudos

This is important functionality cut by the ABAP Web Dynpro Runtime. The above links don't help.