cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting usage cause ignore some of user keyboard stroke On 6.40

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Christian_Cohrs
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Assaf,

we had a serious performance problem in SAP GUI 6.40 Scripting, which was solved in the latest patch. This problem led to the behaviour, because the machine was so busy executing scripting code that it would not be able to handle keyboard input.

However, please keep in mind that this problem can never be solved completly on our side. If your script puts too much load on SAP GUI you will not be able to enter data in parallel.

Best regards,

Christian