In certain cases, you need to log the flow of the HTTP(S) communication to allow you to analyze the error situation in detail at a later stage. You can use the ICF recorder tool to log the exchange of HTTP(S) documents in the SAP system. E.g.: See how the requests are forwarded by a reverse-proxy to the backend system.
There is a client and a server recorder available.
First take a look at the server recorder.
To start the server recorder, choose:
– TR. SICF -> Edit -> Recorder -> Activate Recording
The following pop-up will appear:
In the activation popup the URL has to be maintained. Enter the path in the ICF Tree to the service which should be observed (recorded). Try not to use generic entries /* not to record too many (unecessary) data. */ If you know the user wich will call the service enter it, as it is also not recommended to record for all users. (same reason)
After the recording is enabled, simply carry out the steps you would like to record. In oure case I tested a BSP application /* IT00 */ I started it and clicked some. /* simpy with right clicking the service and context menu option: ‘Test Service’ */
Now we need to deactivate the recorder:
– TR. SICF -> Edit -> Recorder -> Dectivate Recording /* Specify the same values you used at activation time.
The data is ready to display. We open the displayer:
– TR. SICF -> Edit -> Recorder -> Display Recording or Tr. SICFRECORDER
A similar pop-up appears as we have seen when we activated the recorder. Enter the same information you did at activation time. (again 🙂 ) The displayer opens. You will have a similar screen as shown below:
Here we have a lot of options. We can see the complete HTTP request wich arrived to the ICF layer. /* If we have recorded also the complete response can bee seen */. These information can be accessed via the ‘google’ symbol. The request header can contain very important clues about problems. /* like not correctly set host-header, or wich cookies arrived to the server */ Here is a typical request: (recorded in the above scenario)
GET /sap(bD1lbiZjPTAwMA==)/bc/bsp/sap/it00/default.htm?sap-sessioncmd=open HTTP/1.0 Cookie: MYSAPSSO2=....; sap-recorder_sid=....; sap-usercontext=.... via: 1.0 HBUDWS0 user-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) host: us4184.wdf.sap.corp:1080 accept: */* accept-language: hu connection: Keep-Alive
A given recording can be downloaded via the menu path:
Utilities -> download.
This file can be uploaded into an other r/3 system – similar menu path, but upload option -where the complete information can be displayed.
Each recorded request can be re-executed against the WebAS via clicking onto the execute button. /* even on different language / with different user */
I would recommend for evryone who is developing (or just planning to develop) applications wich use the ICF layer (like BSP applications do) to play around a little with this tool to get familiar with it ;-).
The client recorder.
Sometimes the WebAS acts as a client to other server systems. For example you download a file from a content server. In this case the client recorder can help to analyse different problems.
The client recorder can be switched on as follows:
Tr. SICF -> Client -> Recorder -> Activate Recording.
Now we see a similar screen we have seen at the server recorder:
Here we can define the relative client URL path, what we use. e.g if we filter: ‘/sap/bc/bsp/sap/sbspext_htmlb’ than a request to ‘http://host:port/sap/bc/bsp/sap/it00‘ will not be recorded but one to ‘http://host:port/sap/bc/bsp/sap/sbspext_htmlb‘ will be recorded. As it is visible on the picture above I started the recording for all URL’s for my user.
I used ‘host:port’, as here can be any hostname / port pair where we want to call the given service.
In our example we use the report: RSHTML01 for accessing web pages. You can start this very-very basic HTML browser from SE38, and enter the URL you want to access/record. /* If a proxy is requiered, please aslo fill the proxy information */. With this report we can force our WebAS to act as a HTTP client. We can also access services on the same machnie, in this case the same SAP system is server and client at the same time.
Now this request and response is recorded in the ICF. After the steps we want to record we should deactivate the client recorder:
– Tr. SICF -> Client -> Recorder -> Deactivate Recording.
We can check this in Tr. SICFRECORDER. Here We have to click on the button ‘Client request’ /* can be seen on the picture about the recording displayer above */, as in default the server recorder entries are shown. The functionality is the same as in case of the Server recorder.
I hope this weblog made you courageous about the possibilities the tool offers, as it can help you finding causes of problems in different scenarios.