Application Development 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: 

AMDP BW tables

Former Member
0 Kudos

Hello friends ,

   I am kind of struck writing a basic AMDP to fetch data from BW tables .
I am getting SQLscript syntax error without any further explanations. I was able to do the similar logic with regulat tables like sflight , but if I wanted to fetch anything from BW tables then I am getting this error. Most of BW table start with "/BIC/". Error is highlighted at " / ".

Can you please advise how to bypass this or any workaround ?

Message was edited by: ST Reddy code is attached et_count = select count(*) from /BI0/PCOMP_CODE where currency = :lv_curr and mandt = :lv_mandt ;

1 ACCEPTED SOLUTION

thomasgauweiler
Active Participant
0 Kudos

try to put quotes around the table name like "/BI0/PCOMP_CODE"

Regards, Thomas

4 REPLIES 4

thomasgauweiler
Active Participant
0 Kudos

try to put quotes around the table name like "/BI0/PCOMP_CODE"

Regards, Thomas

0 Kudos

Hi Thomas, I have tried that option but it was commenting out sql code.

0 Kudos

But the quote " does not start a comment in SQL Script.

Now I see another problem: You are selecting a single value and not a table. In this case you cannot use the construct: <table> = select ...

Please try the following

select count(*) into ev_count  from "/BI0/PCOMP_CODE" where currency = :lv_curr and mandt = :lv_mandt ;

Regards, Thomas

0 Kudos

Thank you . When I used two double quotes it worked fine . Single double quote gives a pause and greys out everything as if it is commenting out in ABAP