cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find which line of code contains a syntax error?

Former Member
0 Kudos

I use the Script recording & Playback button to generate my scripts which I then edit and run using the same button. However, if during editing, I accidently make a typing mistake and get an error (especially a syntax error) on playback, I spend a long time trying to find the problem, as the SAP Frontend Server returns a generic message such as

                                                  "Expected 'Then

Because it does not tell me where in the code the problem occurred, I have to look at every line (ok, so the above example is fairly easy as I probably only have to look at all the If.... Then statements, but you get the idea). Commenting out large parts of code looking for which line has a missing quote symbol is very tedious and I'm sure there is a simple method to reduce the effort, if only I knew how.....

I have tried to use "/h", SE71, and RSTXDBUG with little success, I then found a reference to Scripting Tracker, but it only works on windows 7 or later and I am on 6.2.

How exactly do I get the "system" to tell me which line it found a syntax error?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I found the answer....

Double clicking on the VBS file from Windows Explorer means that the code is processed by Windows Script Host and it gives the actual line number containing the syntax error.




Answers (0)