Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Query not working

Former Member
0 Likes
875

Hi,

I am facing problem with SAP Query. My query is not working for one particular date. Its giving timeout error when i just give date as input. I tried executing it by giving some particular document as input, then its giving "no data" message but when i check the table data, there are some records for that input condition.

I debugged it, i found that the statement "FETCH NEXT CURSOR cursorname" is throwing sy-subrc eq 4. I couldn't understand the problem.

Any inputs will be very helpful.

Regards,

Mahidhar.

1 ACCEPTED SOLUTION
Read only

Azeemquadri
Contributor
0 Likes
787

Please try filtering the data to avoid timeout error.

Which table are you querying. What is date format you use?

Try to give date in  a different format.

"FETCH NEXT CURSOR cursorname" giving sy-subrc = 4 means there are no more records to be found.

Hi,

I am facing problem with SAP Query. My query is not working for one particular date. Its giving timeout error when i just give date as input. I tried executing it by giving some particular document as input, then its giving "no data" message but when i check the table data, there are some records for that input condition.

I debugged it, i found that the statement "FETCH NEXT CURSOR cursorname" is throwing sy-subrc eq 4. I couldn't understand the problem.

Any inputs will be very helpful.

Regards,

Mahidhar.

2 REPLIES 2
Read only

Azeemquadri
Contributor
0 Likes
788

Please try filtering the data to avoid timeout error.

Which table are you querying. What is date format you use?

Try to give date in  a different format.

"FETCH NEXT CURSOR cursorname" giving sy-subrc = 4 means there are no more records to be found.

Read only

0 Likes
787

Hi Azeem,

There are more than 10 tables that were used in this query with different types joins like inner join, left outer, right outer join. So i wasnt able to decode the select query that was present in open cursor command.

I have given the date and executed the same in background. It ran in 19min. But when i add one more input parameter, then its running more than a day(still running ). Didn't get the exact problem still.

Regards,

Mahidhar.