Qlik Community

QlikView Connectors

Highlighted
pieter1976
New Contributor III

Second Sap select statement does not work ( problem )

The sapconnector has been working fine for a long time but today i discovered that it is impossible to execute two SAP select statements in one qvw file.

Here is a part of the logfile:

2010-06-03 14:11:15 Progress Connector delayed for 20 ms.

2010-06-03 14:11:16 Progress Calling FetchStream

2010-06-03 14:11:16 Progress Reply from FetchStream received

2010-06-03 14:11:16 Progress Empty fetch

2010-06-03 14:11:16 Progress Connector delayed for 20 ms.

2010-06-03 14:11:16 Progress Calling FetchStream

2010-06-03 14:11:16 Progress Reply from FetchStream received

2010-06-03 14:11:16 Progress Empty fetch

2010-06-03 14:11:16 Progress Connector delayed for 20 ms.

2010-06-03 14:11:16 Progress Calling FetchStream

2010-06-03 14:11:16 Progress Reply from FetchStream received

2010-06-03 14:11:16 Progress Empty fetch

2010-06-03 14:11:16 Progress Connector delayed for 20 ms.

2010-06-03 14:11:16 Progress Calling FetchStream

2010-06-03 14:11:16 Progress Reply from FetchStream received

2010-06-03 14:11:16 Error Fetch aborted, due to an unexpected exception. Key = TIMEOUT (ID:PO Type:E Number:238)

2010-06-03 14:11:16 Progress Disconnected

2010-06-03 14:11:16 Error RFC function failed! Key = RFC_INVALID_HANDLE (An invalid handle was passed to the API call)



Can somebody tell me howto solve this please.

7 Replies
pieter1976
New Contributor III

Second Sap select statement does not work ( problem )

I was able to solve to problem by putting a separate SapConnectionstring before every Sap select Statement.

It seems that originally Sap or qlikview drops the connection in between the two sap select statements.

A timeout property in Sap can probably fix this problem as well.

tabletuner
Contributor III

Second Sap select statement does not work ( problem )

did the previous answer help you? I've got timeout errors with the connector as well. I've had some luck so far by adding some code to the end of the connection string:

xxx;xxx;xxx;xxx;xxx;Log=1;TimeOutFetch=21000";

Where the x's are the beginning of the connectionstring.

Hope this can help you. Good luck.

pieter1976
New Contributor III

Second Sap select statement does not work ( problem )

It seemed the error was caused by the sap system. We now reopen de sap connection before every qlikview select statement and we don't do long lasting selects anymore. We break them down into smaller shorter lasting selects.

pieter1976
New Contributor III

Second Sap select statement does not work ( problem )

The Timeout was cause by Sap but we weren't allowed to change these settings.

The solution I mentioned worked for us but makes the code look a bit more chaotic.

suniljain
Honored Contributor

Second Sap select statement does not work ( problem )

Yes, This error is because of SAP System. You are unable to get response within decided time frame from SAP thats why you are getting this error.

Pls try extraction in idle time.

Not applicable

Second Sap select statement does not work ( problem )

does it consume a lot of time having different connection for a single sap server every time you make a select statement?

i haven't experienced this problem but I observed that when the sap system started for the first time it will disconnect(db icon turns gray) then it will automatically connect again because of its service..

pieter1976
New Contributor III

Second Sap select statement does not work ( problem )

Reconnecting to the sap server isn't a problem.

The timeout was give because the sap select statement took 2 hour to complete.

If it had finished it would have loaded 20 miljon rows.

This is data for a month.

I have now spit the month select statement in a select statement for every day which has solved are problem.