Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

AMDP error -SQLSCRIPT: sql syntax error: incorrect syntax near "/"

ajay_mukundan2
Explorer
10,277

Hi Gurus,

Consider the customer name space is '/XYZ/'. We have created custom table - /XYZ/DB_0019.

While using the table /XYZ/DB_0019 in AMDP method, we encounter the below error.

SQLSCRIPT: sql syntax error: incorrect syntax near "/"

Version of ADT on Eclipse:

Eclipse IDE for Java Developers Version: 2019-03 (4.11.0) Build id: 20190314-1200 OS: Windows 10, v.10.0, x86_64 / win32 Java version: 12.0.2

How to go about the above error?

9 REPLIES 9
Read only

Sijin_Chandran
Active Contributor
0 Likes
7,034

Hello,

In line number 94 can you remove the space after '/'

I have a feel like you have mentioned the Table name as '/ sflight' instead of '/sflight'.

If the table name is correct then it should not throw an error, try with this and update here.

Thanks,

Sijin

Read only

ajay_mukundan2
Explorer
0 Likes
7,034

Hi Sijin,

The table name is /XYZ/DB0019. I have removed the space in the 'USING' clause.

Still the error is thrown on the 'Select' clause only.

Can you try table join with table under Customer Names Space /XYZ/ .

Read only

0 Likes
7,034

Hi Ajay,

Unfortunately now I don't have access to S4 system 😞

This error looks really strange. If you have given the correct table name in the USING part and later using it in the SQL query it should not throw an error. Might be as highlighted by you its because of the Custom Namespace starting with '/' and this '/' is getting interpreted as something else from the SQL end.

See something like this https://stackoverflow.com/questions/36795096/forward-slash-in-column-name-throwing-an-incorrect-synt...

And as suggested in the above link can you try with giving your table name inside [] , just a wild guess.

If [] doesn't works out you can also try using "" mask , say like FROM "/XYZ/SFLIGHT"

Please give this a try and let me know.

Lets wait for some expert comments here.

Thanks,

Sijin

Read only

former_member1716
Active Contributor
0 Likes
7,034

Hello,

Instead of typing the table name, can you please try dragging the table from the left and drop in the select query and let us know the results.

Regards

Read only

0 Likes
7,034

Hi Satish,

Thanks for responding!

Upon drag and dropping the table from the Project explorer to the AMDP method, the table is opened in SE11 in new window. The table is not filled in the AMDP table selection query.

Refer screenshot-

Read only

Sijin_Chandran
Active Contributor
0 Likes
7,034

Considering the below thread,

https://answers.sap.com/questions/9089838/invalid-table-name-in-sql-command-editor-for-table.html

I guess "" mask should work in your case and as mentioned by me over comments earlier try with [] and '' mask also in case "" doesn't work.

Eg. FROM "/XYZ/SFLIGHT" or FROM [/XYZ/SFLIGHT] or FROM '/XYZ/SFLIGHT'

Please give this a try and update here.

Thanks,

Sijin

Read only

DoanManhQuynh
Active Contributor
0 Likes
7,034

table naming look like BW object, I think you should put it inside " " (double quote) mark.

Read only

mahesh_2093
Discoverer
0 Likes
7,034

Quotations ( "/XYZ/SFLIGHT" ) worked.

Thank You !

Read only

Kirubakaran_72
Newcomer
0 Likes
5,613

Make sure your using only UPPER CASE characters. Using lower case characters with "(Double Quotes) will show as error only.