Qlik Community

QlikView Connectors

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
rahulhv1
New Contributor III

SQL Query not working in SAP for extractig data from tables (Combination of tables)

Hi Guys

We have SAP ECC 6 , Oracle 11 i   as data base. Below is the query which i have in Qlikview to extract the data from SAP.

SQL SELECT

MBLNR,  WERKS, MATNR, CHARG,  BWART, MENGE, MJAHR,  MKPF.BUDAT  FROM MSEG  , MKPF  where MSEG.MBLNR = MKPF.MBLNR and WERKS ='A100' and  MATNR = 'RM010000'  AND MKPF.BUDAT >= TO_DATE(’01-JAN-2014’,’DD-MON-YYYY’)

Above query is not working with SAP , on the contrary, when i use this query with our oracle server (Other than SAP), it works fine. Can anybody pls. help me out for this. 

Below is the error which i am getting.

/QTQVC/OPEN_STREAM failed after 00:00:00 Key = SQL_ERROR (ID:00 Type:E Number:001 Comma without preceding colon (after OPEN ?).)

6 Replies
yfe
Contributor III

Re: SQL Query not working in SAP for extractig data from tables (Combination of tables)

SQL connector uses ABAP sql syntax which different than the one that you used in your Oracle client.

Please try this one:

SQL SELECT

A~MBLNR  A~WERKS A~MATNR A~CHARG A~BWART A~MENGE A~MJAHR B~BUDAT

FROM MSEG as A INNER JOIN MKPF as B ON A~MBLNR EQ B~MBLNR

WHERE A~WERKS EQ 'A100'

     AND A~MATNR EQ 'RM010000' 

     AND B~BUDAT GE '20140101'

It worked for me

Thanks

Yaniv

rahulhv1
New Contributor III

Re: SQL Query not working in SAP for extractig data from tables (Combination of tables)

Thank you so much yaniv, its working... but what about date format? i wish to data for 31st dec. 2014?


yfe
Contributor III

Re: SQL Query not working in SAP for extractig data from tables (Combination of tables)

ABAP uses the following date format:

YYYYMMDD

you can format the date in QlikView whichever you want...

yfe
Contributor III

Re: SQL Query not working in SAP for extractig data from tables (Combination of tables)

Also, please mark question as Answered if the solution helps.

rahulhv1
New Contributor III

Re: SQL Query not working in SAP for extractig data from tables (Combination of tables)

Yes, i''ll, but where to mark? i can not locate any provision to mark is corrct.. Any ways,Sorry to say, but the query is giving below error

Custom read failed
SQL SELECT

A~MBLNR  A~WERKS A~MATNR A~CHARG A~BWART A~MENGE A~MJAHR B~BUDAT

FROM MSEG as A INNER JOIN MKPF as B ON A~MBLNR EQ B~MBLNR

WHERE A~WERKS EQ '4000'

     AND B~BUDAT GE '20140101'

yfe
Contributor III

Re: SQL Query not working in SAP for extractig data from tables (Combination of tables)

Please send the connector log file

Community Browser