Skip to Content
0
Former Member
Feb 13, 2006 at 08:31 PM

Scripting usage cause ignore some of user keyboard stroke On 6.40

20 Views

Hello,

I've noticed some changed in <b>SAP GUI 6.40 patch 13</b> behavior comparing to <b>SAP GUI 6.20</b> (all patches).

I developed an application that sample some specific field value, and found that when sample occurs while user

types values in any field,some of the character typed were missing (need re-typing).

I tried to isolate the problem , and I think that the

problem occurs when call the field's Parents properties.

At the same time the saplogon.exe CPU usage is quite high.

The following code (simple loop that calls Parent until getting a window component) cause the described problem:

	if (!pControl || !ppCompWnd)
		return E_INVALIDARG;

	CComQIPtr<ISapControlTarget> spUpComp = pControl;
	while (spUpComp)
	{
		if (spUpComp->TypeAsNumber == GuiFrameWindow || spUpComp->TypeAsNumber == GuiMainWindow || 
			spUpComp->TypeAsNumber == GuiModalWindow)
			break;

		CComPtr<ISapControlTarget> spTmpComp = spUpComp;
		spUpComp.Release();

		spUpComp = spTmpComp->Parent;
	}

	if (!spUpComp)
		return E_UNEXPECTED;

	CComQIPtr<ISapWindowTarget> spOutWndComp = spUpComp;
	if (!spOutWndComp)
		return E_NOINTERFACE;

	*ppCompWnd = spOutWndComp.Detach();
	if (!*ppCompWnd)
		return E_POINTER;

	return S_OK;

When extract the window id from the component id,

and call FindById with the window id , the problem doesn't occur.

Thanks,

Assaf Hayout