cancel
Showing results for 
Search instead for 
Did you mean: 

CGI variables?

Former Member
0 Kudos

Hi,

I was searching all over the (wrong?) place, but I don't seem to find how to retrieve typical CGI vars like:

- REMOTE_ADDR (I want the ip addresse of the server running the htm)

- REQUEST_PORT (same as above, the port)

- SERVER_NAME (same as above, but then the name)

- SCRIPT_NAME (the name of the htm running)

- HTTP_REFERER

- HTTP_USER_AGENT

And something else: how can I retrieve the "version number" of the WebAS within a BSP? 640 is sufficiant.

Eddy

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Check out this thread Eddy

Should find your answer in a link provided in the second or third to the last reply I believe.

or just go here:

http://help.sap.com/saphelp_erp2004/helpdata/en/c1/7f56d32e243141a1595268bfcf351a/frameset.htm

eddy_declercq
Active Contributor
0 Kudos

Guess what. I had the pseudo header fields page in front of me for setting stuff in the header and I didn't realize that I could also get stuff. It's not my day I guess. I'm getting old

And the version numer is of course SY-SAPRL

eddy_declercq
Active Contributor
0 Kudos

I'm missing HTTP_REFERER and HTTP_USER_AGENT though. Any suggestions?

former_member181879
Active Contributor
0 Kudos

request->get_header_field( if_http_header_fields=>user_agent )? etc.

Why not look at BSP application IT00, page misc_echo.htm?

eddy_declercq
Active Contributor
0 Kudos

SUMFS (Sitting Under Mydesk and Feeling ****)

Anyway, any chance to retrieve the referrer somewhere?

former_member181879
Active Contributor
0 Kudos

request->get_header_field( if_http_header_fields=>referer )?

You have to keep in mind that this header field is not always there. Typically, on the first incoming request it might be missing. Also, some proxy tools will filter this header out, as it can tell you a lot about where the user has been.

Also, do not overlook that spelling mistake: referer (as defined in RFC for HTTP) versus referrer (English language).

Former Member
0 Kudos

Hey Eddy

I know how you feel

Don't worry though everyone has days like this.