Child pages
  • Inbound handler debug - Where to check Codepage
Skip to end of metadata
Go to start of metadata

Purpose

This content is created to shows where to check in code if the Codepage of Catalog Web Service is correctly taken.

Overview

The Codepage can be set in Catalog Customizing which is red out by Inbound handler. Sometimes the characters get wrongly converted. If someone has no access to customizing than the value can be checked within SRM code in debug mode.

Customizing

In customizing for Web Service we have the possibility to add a Codepage of Service. This one will be used by Inbound handler service for character conversion of catalog items.

 

The following content will introduce some debugging hints within Inbound handler.

Debugging

To debug Inbound Handler, a breakpoint should be set within Method HANDLE_REQUEST of Interface IF_HTTP_EXTENSION which is realised by Class /SAPSRM/CL_CH_WD_INBOUND_HDLR.

Here in Inbound handler an HTML code is created and stored in a variable called lv_html. This HTML content will be posted to SRM with post data which also can be checked with an HTTP Watch trace.

Below the opening lines of HTML response gets added to lv_html:

 

This HTML response contains post data. One of these post data parameters is Codepage, which is red out from customizing by the following codepart:

After the call of get_from_field, the lv_source_codepage variable should contain the Codepage from customizing:

This value will be added to lt_post_body, which will be included into HTML response:

With the help of ABAP inline JavaScript the HTML response with Post data will be created and sent:

After above lines has been executed, the fully complete HTML response can be checked within the value of variable lv_html.

The Codepage is now determined and posted by Inbound handler, which can be checked and seen via an HTTP watch trace also:

 

 

 

 

  • No labels