Control not found in SAP GUI scripting: We use the ApplyGUIScript statement in order to call up a VBS script (SAP GUI scripting). This worked well until we put a "NoScrollbar" statement into the GuiXT script. Now the SAP GUI scripting ends with an error message saying that one of the elements is not found: "The control could not be found by id". What could be the reason?
SAP GUI scripting uses rather complicated field ids that reflect the nested subscreen structure of the screen. Scrollable subscreens and non-scrollable subscreens have different ids. When you record a VBScript in SAP GUI, and then put a "NoScrollbar" into the GuiXT script and replay the VBScript, it can occur that a field id is not found. And also the other way round, recording with "Noscrollbar" in the GuiXT script and replaying it without "NoScrolbar", gives the same error.

For example, in VA02 I recorded a "click" event without and with a "NoScrollbar" statement in the GuiXT script, and got the following:

// without "NoScrollbar"

// with "NoScrollbar"
session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\01/subSUBSCREEN _BODY:SAPMV45A:4400/subHEADER_FRAME:SAPMV45A:4440/cmbVBAK-FAKSK").setFocus

The difference is the notation "ssub" (scrollable subscreen) as compared with "sub" (subscreen).