cancel
Showing results for 
Search instead for 
Did you mean: 

Error message "The virtual key is not enabled" when used sendVkey method

Former Member
0 Kudos

Hello SAP friends,

I would like to send CTRL+C to a certain field, so I used ".sendVkey 77", however I got this error message:

"The virtual key is not enabled"

My question is pretty simple: How to enable it?

Thanks for help in advance.

-Stefan

Accepted Solutions (1)

Accepted Solutions (1)

script_man
Active Contributor
0 Kudos

Hi Stefan,

the clipboard in SAP can not be realized with sendVkey. The only way I know of is as follows:

For example:


. . .
CLIP = session.findById("wnd[0]/. . .").text
msgbox CLIP
. . .

Regards,

ScriptMan

Former Member
0 Kudos

Very well earned points!

Not exactly the answer to my question, but it solved my problem, so thank you very much!

script_man
Active Contributor
0 Kudos

It would be interesting for all of us how you solved your problem.

A quick hint is sufficient.

Regards,

ScriptMan

Former Member
0 Kudos

Well, your response was the solution. I really only needed to know how to fill the clipboard. I'm new to SAP VBS scripting and I didn't know I could copy the content using .text, so I was trying to send the keys CTRL+C, which was not working, hence my first post.

I needed the end time of a certain job, so I chose the variable endtime and filled it with desired entry:

endtime = session.findById("wnd[1]/usr/ctxtBTCH1150-ENDTIME").text

Variable endtime is then used further in the script for searching through job logs via al11.

Edited by: habus81 on May 25, 2011 2:21 PM

Answers (1)

Answers (1)

0 Kudos

Hi

I would like to send .sendVKey(Keys.CTRL+Keys.F11) to a certain field. Could you help me with it as I am getting below error

(-2147352567, 'Exception occurred.', (617, 'SAP Frontend Server', 'The virtual key is not enabled.', None, 0, 0)