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

Run time Error: SQL error 60 when accessing table NRIV.

naveen_inuganti2
Active Contributor
0 Likes
3,192

Hi,

I am re-designing one FI Document postings program which is taking long time in our production system. In the new version, I had to implement parallel processing to get better response time.

Flow:

If you want understand little more about the program flow:

  1. Selecting records from one Z table in our system
  2. Checking number of available processors with help of SPBT_INITIALIZE function module ( I am passing nothing to this FM and collecting available processor count in FREE_PBT_WPS)
  3. There is a cut-off on number of tasks from selection-screen of the program. So, even though I receive more processors in available status, will cut some of them based on the selection screen input. Example, if user enters "4" on selection-screen and there are "6" available then process go for 4 parallel tasks.
  4. Now, I am sending data to RFC which handles this postings part in smaller chunks (based on step 3 count). Example, if I have 40000 records and 4 tasks can be activated then 10000 to each task.
  5. In the RFC, I have few more (4-5) select queries to fetch data relevant to given data set. And, after doing that, in the same RFC, I am calling BAPI_ACC_DOCUMENT_POST to post documents.

System Details

Currently I am testing this in one of our testing environment where we have 4 servers with 14+18+18+18 DIA processors.

Issue:

We are receiving run time error "SQL error 60 when accessing table NRIV." , in very few cases i.e couple of times out of 20-25 executions. Apparently, we got this error when we tried with "6" parallel tasks (as we can control this from selection-screen). But I don't see any technical or logical reason behind "6" tasks.

As you can see in run time error, we are facing this error due to number range that we are using. In this number range object RF_BELEG we did not set any buffering, till now. I don't see much documentation on "Parallel buffering" option that we have for this number range (as per the name, it seems relevant to parallel processing). Actually, i am worried if there will be any impact on other applications/programs if we change this, as we are using FI document posting (which will hit this number range) widely in our system.

Regards,

Naveen

1 ACCEPTED SOLUTION
Read only

naveen_inuganti2
Active Contributor
0 Likes
1,809

I found this SAP NOTE to resolve the issues. Thanks to our SAP support team.


1398444 - Buffering the document number assignment for RF_BELEG


Recommendation is to proceed with Parallel buffering.


Regards,

Naveen

3 REPLIES 3
Read only

former_member201275
Active Contributor
0 Likes
1,809

Can you please post your ST22 dump here. Normally we get this error because of a table lock, i.e. your program is trying to use a table which is locked by another program using same table, and usually this is detailed clearly in the dump message.

Read only

0 Likes
1,809

Unfortunately, that dump portion where you can see with highlighted line of the code is not available in this case. Because, it is showing "RFC" where I submitted postings portion as a separate task (There is something went wrong in side the RFC of parallel task and as you know, we can submit parallel tasks only with RFCs).

yes, I agree with you it is same issue with number ranges table NRIV. And, this must be triggered in Postings BAPI that I am using.

Now, I want to understand why it is not giving this error every time (Is it because there is no conflict??)

Also, what is the "Parallel buffering" option at Number Ranges scope and impact on other applications?

Regards,

Naveen

Read only

naveen_inuganti2
Active Contributor
0 Likes
1,810

I found this SAP NOTE to resolve the issues. Thanks to our SAP support team.


1398444 - Buffering the document number assignment for RF_BELEG


Recommendation is to proceed with Parallel buffering.


Regards,

Naveen