Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulhv1
Creator II
Creator II

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
Anonymous
Not applicable

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
Creator II
Creator II
Author

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


Anonymous
Not applicable

ABAP uses the following date format:

YYYYMMDD

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

Anonymous
Not applicable

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

rahulhv1
Creator II
Creator II
Author

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'

Anonymous
Not applicable

Please send the connector log file