cancel
Showing results for 
Search instead for 
Did you mean: 

Running a saved Query in SAP2005

Former Member
0 Kudos
52

Hi

I want to repeatedly run a saved query from my application which I can do with the activatemenu command. One of our guys wants a list of current support calls on screen, I will update this every few minutes.

The problem I have is that a system message appears on screen that you must press enter on.

An ideas how I can clear that message so I can display the next query please ?

Thanks

Regards Andy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This snippet seems to work. Well... most of the time:

			p_old = Cursor.Position
			Cursor.Position = New System.Drawing.Point(1, 1)
			SBOApplication.StatusBar.SetText(System.Windows.Forms.Application.ProductName & ": A click on 'OK' is needed in the case that the 'System Message' window does not get closed by itself in 30 seconds.", SAPbouiCOM_BoMessageTime_bmt_Long, SAPbouiCOM_BoStatusBarMessageType_smt_Warning)

			frmQuery.Select()
			frmQuery.Items.Item("15").Click()			 ' Edit button - Disables editing
			System.Threading.Thread.Sleep(500)
			SendKeys.Send("{LEFT 100}{ESC}")			'Fill the keyboard buffer with harmless keystrokes + ESC to clear the 'System Message' window
			frmQuery.Items.Item("1").Click()			 ' Execute
			SendKeys.SendWait(("{LEFT}"))			'wait that all keystrokes are processed 

			Cursor.Position = p_old

HTH

Juha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Juha

That seems to work

Many thanks

Regards Andy