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:


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.