Skip to Content
Oct 08, 2014 at 11:29 AM

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



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.


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.


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.




NR.png (40.2 kB)
DMP1.png (17.4 kB)
DMP2.png (11.5 kB)