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: 
igorgois_
Partner - Creator
Partner - Creator

Parallel hint with SAP connector

Hello,

I am trying to execute a SQL command using a parallel hint with SAP Connector.

I have already tried:

1) the stripcomments = 0, tried

2) the parallel without space between / and +

3) use a variable with replace the '/*'

With no success!

I got this error:

Connector reply error: ERROR parsing query: Duplicate field names not allowed, field name:/!

The DBA says that this sql runs fine in the oracle database.

Any clue? Thanks in advance

My code:

set StripComments=0;

LIB CONNECT TO 'CNNSAP-ECC';

EKKO:

LOAD

Text(MANDT) As MANDT,

     Text(EBELN) As EBELN,

     Text(BSART) As BSART,

Date(AEDAT) As AEDAT,

Text(EKORG) As EKORG,

Text(EKGRP) As EKGRP,

Text(IHREZ) As IHREZ,

Text(LIFNR) As LIFNR,

Text(VERKF) As VERKF,

     Text(ERNAM) As ERNAM,

     Text(BUKRS) As BUKRS,

     Text(FRGKE) As FRGKE,

     Text(LOEKZ) As LOEKZ,

     Text(KNUMV) As KNUMV,

     text(EQ_WERKS) as EQ_WERKS,

     WKURS,

     Text(BEDAT) As BEDAT,

     Text(ZTERM) As ZTERM;

SQL SELECT /*+parallel */

MANDT,

EBELN,

    BSART,

AEDAT,

    EQ_WERKS,

EKORG,

EKGRP,

IHREZ,

LIFNR,

VERKF,

ERNAM,

    BUKRS,

    FRGKE,

    LOEKZ,

    KNUMV,

    WKURS,

    BEDAT,

    ZTERM FROM EKKO;

  

set StripComments=1;

9 Replies
petter
Partner - Champion III
Partner - Champion III

Try to do the hint with a end of line comment -- instead:

SQL SELECT --+parallel

  MANDT,

....

...

igorgois_
Partner - Creator
Partner - Creator
Author

Hello Petter,

I forgot to mention that I also tried this one and got this error:

QVX_UNEXPECTED_END_OF_DATA: SQL_ERROR Unknown column name "--" field list. field list. f ield list. field list.


my code:

LIB CONNECT TO 'CNNSAP-ECC';

EKKO:

LOAD Text(MANDT) As MANDT,

     Text(EBELN) As EBELN,

     Text(BSART) As BSART,

Date(AEDAT) As AEDAT,

Text(EKORG) As EKORG,

Text(EKGRP) As EKGRP,

Text(IHREZ) As IHREZ,

Text(LIFNR) As LIFNR,

Text(VERKF) As VERKF,

     Text(ERNAM) As ERNAM,

     Text(BUKRS) As BUKRS,

     Text(FRGKE) As FRGKE,

     Text(LOEKZ) As LOEKZ,

     Text(KNUMV) As KNUMV,

     text(EQ_WERKS) as EQ_WERKS,

     WKURS,

     Text(BEDAT) As BEDAT,

     Text(ZTERM) As ZTERM;

SQL SELECT --+parallel

MANDT,

EBELN,

    BSART,

AEDAT,

    EQ_WERKS,

EKORG,

EKGRP,

IHREZ,

LIFNR,

VERKF,

ERNAM,

    BUKRS,

    FRGKE,

    LOEKZ,

    KNUMV,

    WKURS,

    BEDAT,

    ZTERM FROM EKKO;

petter
Partner - Champion III
Partner - Champion III

It might be that you have to use ~~ instead of --

What kind of SAP system, version and underlying database do you have?

petter
Partner - Champion III
Partner - Champion III

SAP ABAP SQL also supports hints as a last text after the actual SELECT statement like this:

SQL

  SELECT <fields> INTO <work area> FROM <database table> WHERE <logical expression> AND <logical   

    expression>

    %_HINTS <database name> 'INDEX("<database table>" "Index name")'.

;


igorgois_
Partner - Creator
Partner - Creator
Author

Hello, Petter

Thanks a lot for your instant help.

I tried now ~~ and got this:

Connector reply error: RfcAbapException:NOT_FOUND

Im not sure about the SAP info. What I know:

- I am connecting to SAP ECC

- Its a oracle database

- The string connection is:

CUSTOM CONNECT TO "provider=QvSAPSqlConnector.exe;servertype=0;ASHOST=saplccp2.removed.br;CLIENT=500;SYSNR=00;Timeout=3600;SNC_MODE=false;SNC_QOP=9;advancedProperties=true;ConvRoutine=false;CheckSeparator=false;Nulldate=true;RemoveAllBlanks=false;ReplaceNullvalue=true;Trace=false;MixedMode=false;NulldateLegacy=false;FLTPLegacy=false;TIMSLegacy=false;DataTypeLegacyMode=false;PacketSize=20000;FetchBuffers=99999999;BufferPercentage=10;TimeOutBatch=600;TimeOutFetch=1200;TimeOutStartBatch=2400;BatchJobName=/QTQVC/READ_DATA;TargetServer=saplccp2_CCP_00;JobClass=A;SocketBufferSize=32768;SenseVersion=12.20.10;"

If you need some other information, please let me know

petter
Partner - Champion III
Partner - Champion III

I am sorry - I am out of suggestions for now ....

igorgois_
Partner - Creator
Partner - Creator
Author

I will check with the DBA these infos to try this syntax

Thanks a lot for your help

igorgois_
Partner - Creator
Partner - Creator
Author

Here are the informations about SAP systemsap_info.jpg

igorgois_
Partner - Creator
Partner - Creator
Author

I tried with this syntax:

SQL SELECT

MANDT,

EBELN,

    BSART,

AEDAT,

    EQ_WERKS,

EKORG,

EKGRP,

IHREZ,

LIFNR,

VERKF,

ERNAM,

    BUKRS,

    FRGKE,

    LOEKZ,

    KNUMV,

    WKURS,

    BEDAT,

    ZTERM FROM EKKO

    %_HINTS

    ORACLE 'FULL(T_00) PARALLEL(T_00,18)'.

    ;

(https://archive.sap.com/discussions/thread/1790569)

and got this error:

QVX_UNEXPECTED_END_OF_DATA: SQL_ERROR Wrong expression "%" in FROM clause .