Finding a control id for VBScript: I want to invoke a VBScript  via the command ApplyGUIScript in order to perform a particular task in VA02, but how do I find out the right control id for the order position number? In GuiXT scripts it is F[VBAP-POSNR].
The best way to find the control id is to use the recording option in SAP GUI. Click on the field (or double click) so that an action is recorded. In the case of F[VBAP-POSNR] I got the following in my test system:

session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\03/ssubSUBSCREEN_BODY:SAPMV45A:4490/ssubITEM_FRAME:SAPMV45A:4480/txtVBAP-POSNR")

Depending on the SAP release it is possible that the control id is slightly different in your system, since it reflects the implementation details (subscreen names) of the SAP dynpro.