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

FETCH NEXT CURSOR not working same, for different users

Former Member
0 Likes
1,040

Hi,

I have a query and when it is executed using different users, it gives different results. Its not because of authorisations, because i have already checked that, users with same profile and authorisations have this problem.

Query passes through some standard SAP code. While debugging, i found that, there is a FETCH statement which is acting differently for different users but with same profiles.

FETCH NEXT CURSOR GD_CURSOR

INTO CORRESPONDING FIELDS OF DB_WA_VANLAZ.

If tcode executed with user AAA, it will return sy-subrc = 0 and will process normally. But if its processed using user BBB, it will return sy-subrc = 4. both AAA and BBB has same set of profile and authorisations..

What could be the reason for this??

3 REPLIES 3
Read only

Former Member
0 Likes
649

Hi

Please note that fetch cursor statement also returns the sy-subrc value as 4 when all the lines of the cursor have been read , meaning , when the end of the cursor is reached. If there is any user input for the program, please make sure the same input is given for both the users. Also there is limit on the maximum number of open cursors allowed for a database .

Otherwise I don't see any other reason for this. Sorry If I could not hep you with this.

Regards,

Pawan

.

Read only

0 Likes
649

i am using the same input for both the user. but still its not giving me the result. thats what my problem is. when i give same set of input for both the users, it behaves differently...

Read only

Former Member
0 Likes
649

Sam,

Did you find the solution for the same?

Regards,

NM