!--a11y-->
Migrating from Stateful BSP Applications to
Stateless 
If you are already using Web requests that were generated before Release CRM IS 4.0 and are therefore stateful, you can adjust these Web requests manually as executable stateless BSP applications (stateless BSPs are also supported for older CRM releases as of Basis component 6.20 SP40).
Proceed as follows for the migration:
...
...
1. Call the screen Web Application Builder: Change BSP Application in transaction SE80 or in the Customizing of CRM for the respective request category using IMG activity Define Request Categories.
a. If you want to change the whole BSP application, delete the stateful indicator from the tab page Properties.
b. If you only want to change individual BSP pages from stateful to stateless, change to the corresponding BSP page and define the option Stateless from now on on the tab page Properties in the screen section Status.
2. Enter the additional method calls in the source texts of all BSP pages (except the confirmation page):
a. Enter the following method calls in BSP event OnRequest:
CALL METHOD application->on_request
EXPORTING
ir_http_request = request
ir_bsp_runtime = runtime
ir_bsp_page = page
ir_bsp_page_context = page_context
ir_bsp_navigation = navigation
id_event_id = event_id.
The data is read and recreated from the cookie with this method.
b. The data is saved shortly before it is displayed in the cookie in BSP event OnManipulation. Here you should enter the following method calls:
CALL METHOD application->on_manipulation
EXPORTING
ir_http_response = response
ir_http_request = request
ir_bsp_page = page
ir_bsp_page_context = page_context
ir_bsp_runtime = runtime.

Both these method calls must be entered in all BSP pages, even if the page is stateful.
3. Optional: Display of request data on the confirmation page
If the BSP-confirmation page is displayed by a Web request, the request data is already in the database. If you want to read the data from the database, use method call on_initialization in BSP event OnInitialization:
CALL METHOD application->on_initialization
EXPORTING
ir_http_request = request
ir_http_response = responde
ir_bsp_navigation = navigation
ir_bsp_runtime = runtime.