12-30-2014 4:41 AM
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 ;
12-30-2014 8:41 AM
try to put quotes around the table name like "/BI0/PCOMP_CODE"
Regards, Thomas
12-30-2014 8:41 AM
try to put quotes around the table name like "/BI0/PCOMP_CODE"
Regards, Thomas
12-30-2014 1:00 PM
Hi Thomas, I have tried that option but it was commenting out sql code.
12-30-2014 1:13 PM
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
12-30-2014 1:48 PM
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