Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tiklabaq
Creator
Creator

Scrip Error (Field not found) SAP Table

Hi Guys,

I have a Problem with loading The SAP Table "COVP". When I check in SAP all fields exists, as soon as I want to load the specific fields of this table via QlikView, the error comes, "Field not found", for all fields of this table.


What can I do?


[COVP]:

Load

   [WERKS] as [WERKS.COVP],

   [MATNR] as [MATNR.COVP],

   [GJAHR] as [GJAHR.COVP],

   [KOKRS] as [KOKRS.COVP],

   [OBJNR] as [OBJNR.COVP],

   [WTGBTR] as [WTGBTR.COVP],

   [KSTAR] as [KSTAR.COVP],

   [USPOB] as [USPOB.COVP],

   [MEGBTR] as [MEGBTR.COVP],

   [BUDAT] as [BUDAT.COVP],

   [PERIO] as [PERIO.COVP],

   [WRTTP] as [WRTTP.COVP],

   [PAROB] as [PAROB.COVP];

SQL Select GJAHR WERKS MATNR BUDAT KOKRS OBJNR KSTAR WRTTP PERIO USPOB WTGBTR MEGBTR PAROB  from COVP

where KOKRS = 'XXXX' and (((KSTAR = 'C43100 or KSTAR ='C43200') and WERKS = 'XXXX') or KSTAR = 'C49200');

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Also, there is a quote missing after the C43100 value...

View solution in original post

6 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Most probably a problem with your connection or permissions.

Are you able to load any other table, for example a simple one like KNA1?

How did you check in SAP anyway? The ScriptBuilder has no live connection to SAP. And asking SAP for table details doesn't mean anything with respect to them being available to your SAP Connector account...

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Does it work when you remove the WHERE clause?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Also, there is a quote missing after the C43100 value...

tiklabaq
Creator
Creator
Author

Oh my God. For over a day, I have been desperate for this problem, and it is so simple. Many many thanks

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Oh wow... didn't think we would have found it so quickly. Problems with SAP connections aren't usually that easy to diagnose. Well, sorry for the lost day but maybe a tip may be useful for future diagnoses:

The QlikView Script Editor isn't usually very strong in analysing SQL statements, let alone in checking OpenSQL  However, in this case it was able to detect and mark a bracket balancing problem. I checked again and again but the parentheses were ok. And then I found the missing quote which turns the better half of the WHERE clause into one long string...

Sometimes the markers aren't obvious, but they're there allright Always check for red wiggly lines or parentheses that go red without an apparent cause.

Good luck,

Peter

tiklabaq
Creator
Creator
Author

Thank you very much Peter.