SAP GUI Scripting API - Maintain Selection Options

Interfaces (ALE, IDOC, RFC, EDI etc.)

Moderators: Snowy, thx4allthefish

Post Reply
Posts: 1
Joined: Fri Aug 23, 2013 6:32 am

SAP GUI Scripting API - Maintain Selection Options

Post by leppy » Fri Aug 23, 2013 7:47 am

I have been using this for some time to automate SAP but have come across something that I thought there might be a simpler method to do.

I have created a script to run SE16 for table MAPL and then export the data to a file. The only thing I haven't figured out is an easy method to set the Selection Option (Not Equal, Less Than, Etc)

Code: Select all

Func _NotEqual($textfield, $btnname, $value)
	$sess.ActiveWindow().FindByID($textfield).Text = $value
	$sess.ActiveWindow().findById("usr/cntlOPTION_CONTAINER/shellcont/shell").currentCellRow = 5
	$sess.ActiveWindow().findById("usr/cntlOPTION_CONTAINER/shellcont/shell").selectedRows = "5"

Func _ExtractMAPL()
	$sess.ActiveWindow().FindByID("usr/ctxtDATABROWSE-TABLENAME").Text = "MAPL"
	_NotEqual("usr/ctxtI11-LOW", "usr/btn%_I11_%_APP_%-VALU_PUSH", "X")
	_SaveLocalFile($mypath, "MAPL.txt")
Essentially what I want to know is if there is a one- or two-liner to replace _NotEqual. FYI the code is for AutoIt, but the API calls are all standard.

Thanks in advance.

Post Reply