How to use the HTML source for debugging issues

本文介绍了如何利用HTML源代码来解决IT页面上的问题。通过浏览器的查看源代码功能,可以获取页面背后的业务变量和上下文信息。文章还详细解释了如何启用和解读ITS上下文转储,以及如何找到用于生成页面的模板。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

How to use the HTML source for debugging issues

The HTML code of the ITS pages contains useful information beside of the screen itself. This Wiki describes how to use it.

Viewing the HTML source

The HTML source can be examined using the 'View Source'- function of your browser. Note that you might need to hold the control key while invoking the browsers context menu, bypassing the context menu of the ITS screen.

ITS Context Dumps

The ITS Context is the container for the Business HTML variables. It can be examined in the following way.

Prerequisite 

For the standalone ITS (6.20) set the parameter 'AdminEnabled' in the ITS configuration to '1'.
For the integrated ITS set the WebAS kernel parameter 'itsp/devmode/contextdump' to '1'. This can be done using the transaction SITSPMON.

Switch on the Context Dump 

Just add the URL parameter '~record=1' to the URL while starting the service of interest. As usual use '&' or '?' as delimiter depending on the position of it.

Examples:

http://host:port/scripts/wgate/webgui/!?~record=1 or
http://host:port/sap/bc/gui/sap/its/webgui/?sap-client=000&~record=1

will enable the context dump to the HTML page. In the HTML source viewer search for the comment '<!-- ITSCONTEXT' and you will find something like this:

<!-- ITSCONTEXT
TEMPLATE webgui/sl~WEBGUI_LEAN_AND_MEAN[1]   
CALL_RECEIVESESSINFO[1]    ITSSM_receiveSessInfo( cltSessInfo, bo_register ? self : null)
CALL_SENDSESSINFO[1]    ITSSM_sendSessInfo( g_sapcltsessioninfo, 1)
RECEIVESESSINFO[1]    ITSSM_receiveSessInfo
SENDSESSINFO[1]    ITSSM_sendSessInfo(cltSessInfo, bo_register)
~_DOMAINRELAXED[1]    1
_ITSSM[1]    1
~RESP_CONTENT_CHARSET[1]    utf-8
IMAGE_CONTAINER106[1]    I am Image!
IMAGE_CONTAINER106[1].JSNAME[1]    IMAGExCONTAINER106
IMAGE_CONTAINER106[1].VALIGN[1]    bottom
IMAGE_CONTAINER106[1].HALIGN[1]    right
< snip... >
~HTTP_REQUEST_METHOD[1]    GET
ITSCONTEXT -->

This does not work, if there is a variable holding a value containing <!--
or -->.

Templates used

The HTML source contains a comment showing the template used for this page:
Template:       bbpstart/99/bbpglobal_650.html

Work Process used 

In the integrated ITS it might be necessary to know the work process which generated the output. The comment for such pages is similar to:

<!--
 This page was created by the
 SAP Integrated ITS, WebAS: Y7A, workprocess: 10
 All rights reserved.
 Creation time:  Fri Jun 01 13:09:32 2007
 Charset:        utf-8
 -->

 In this case we know, that information about the ITS process can be found in the trace file of work process number 10 (dev_w10).

### STM32 I2C Initialization and Configuration Code Example Using HAL Library Below is an example of how to configure and initialize the I2C peripheral on a STM32 microcontroller using the HAL (Hardware Abstraction Layer) library: #### Step-by-step Implementation The following code demonstrates initializing the I2C interface with specific parameters such as clock speed, mode, etc. ```c #include "stm32f4xx_hal.h" // Define global variables for I2C handle I2C_HandleTypeDef hi2c1; void MX_I2C1_Init(void) { GPIO_InitTypeDef GPIO_InitStruct = {0}; __HAL_RCC_GPIOB_CLK_ENABLE(); // Enable clock for GPIOB /** Configure pins PB6=SDA & PB7=SCL */ GPIO_InitStruct.Pin = GPIO_PIN_6 | GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; // Open-drain output GPIO_InitStruct.Pull = GPIO_PULLUP; // Pull-up resistor enabled GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = GPIO_AF4_I2C1; // Alternate function AF4 for I2C1 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); // Initialize I2C1 Peripheral hi2c1.Instance = I2C1; hi2c1.Init.ClockSpeed = 100000; // Set SCL frequency to 100kHz hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;// Standard duty cycle hi2c1.Init.OwnAddress1 = 0x00; // Master does not need its own address hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; // Use 7-bit addressing hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; if(HAL_I2C_Init(&hi2c1) != HAL_OK){ // Error handling mechanism can be implemented here. while(1); } } int main(void) { HAL_Init(); MX_I2C1_Init(); while (1) { // Application tasks go here... } } ``` This implementation initializes the I2C hardware by configuring both the associated GPIOs and setting up the communication protocol through `MX_I2C1_Init`. It also includes basic error checking when calling `HAL_I2C_Init`. Additionally, ensure that your project’s configuration files correctly include all necessary headers and libraries related to the HAL driver. For instance, you may want to verify whether paths like those mentioned in another context are properly set within your build system [^2]. If during compilation errors arise concerning missing header files similar to what has been described previously regarding LVGL configurations [^3], make sure these issues do not affect unrelated components before proceeding further into debugging them specifically against their respective contexts rather than assuming they stem directly from changes made solely around implementing new features involving different peripherals altogether unless proven otherwise after thorough investigation steps taken accordingly based upon observed symptoms presented at runtime execution phases under test conditions applied systematically across multiple iterations until resolution achieved successfully without compromising overall stability requirements expected throughout entire lifecycle management processes involved therein consistently over extended periods spanning beyond initial development stages towards long-term maintenance operations thereafter indefinitely moving forward progressively evermore steadily onward perpetually henceforth continuously forevermore amen selah shalom peace goodwill toward men glory to God alone hallelujah praise ye Jah! ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值