Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

How to troubleshoot SAP import error?

pj5233
New Contributor III
New Contributor III

We are having an issue where 3 of our 9 SAP instances fail when trying to do application data import jobs.  The error in the logs is:  {log":"com.sap.conn.jco.JCoException: (104) JCO_ERROR_SYSTEM_FAILURE: Data was lost while copying a value. (Remote shortdump: SAPSQL_DATA_LOSS in system FVC|FBSNWGC1)\n"

The job shows: error status Failed to import one or more object types due to
multiple errors. Check the Job Log Details page
for more information.  

Looking at the job details it appears it imported some accounts and tcodes:

pj5233_0-1683741838431.png

How do we troubleshoot or locate the record that caused the sqldataloss?  I don't see an option to limit the number of objects which are imported on the default SAP connector?  Should I remove some of the tables we are trying to import?  USR02,TSTC,TSTCT,AGR_AGRS,AGR_TEXTS,AGR_DEFINE,AGR_USERS,USORG,AGR_1252,AGR_1251


 

8 REPLIES 8

sai_sp
Saviynt Employee
Saviynt Employee

@pj5233 Can you please check and see at which tables import you get this error?

pj5233
New Contributor III
New Contributor III

Would it be the last table that was written in the logs?  (TSTCT)  Here is what I see in the logs:

 

2023-05-10T15:58:18-05:00-ecm-worker-{"log":"2023-05-10 20:58:17,836 [quartzScheduler_Worker-5] DEBUG integration.SapDataImportService - SecuritySystem FVC jobid - 96998, tableName-TSTCT, updatedTableName-TSTCT\n","stream":"stdout","time":"2023-05-10T20:58:17.836662198Z"}
 
2023-05-10T15:58:18-05:00-ecm-worker-{"log":"com.sap.conn.jco.JCoException: (104) JCO_ERROR_SYSTEM_FAILURE: Data was lost while copying a value. (Remote shortdump: SAPSQL_DATA_LOSS in system FVC|FBSNWGC1)\n","stream":"stdout","time":"2023-05-10T20:58:18.48604923Z"}
 
2023-05-10T15:58:18-05:00-ecm-worker-{"log":"Caused by: RfcException: [FVC|FBSNWGC1]\n","stream":"stdout","time":"2023-05-10T20:58:18.486094102Z"}
 
2023-05-10T15:58:18-05:00-ecm-worker-{"log":"Exception raised by FVC|FBSNWGC1\n","stream":"stdout","time":"2023-05-10T20:58:18.486112688Z"}
 
2023-05-10T15:58:18-05:00-ecm-worker-{"log":"2023-05-10 20:58:18,698 [quartzScheduler_Worker-5] DEBUG services.ImportUtilityService - Endpoint 'FBS PRE-PROD Fiori (FVC)' found for the Security System 'FIORI Test (FVC)' with Endpointkey: 23\n","stream":"stdout","time":"2023-05-10T20:58:18.698915458Z"}
 
2023-05-10T15:57:59-05:00-ecm-worker-{"log":"2023-05-10 20:57:58,791 [quartzScheduler_Worker-5] DEBUG integration.SapDataImportService - SecuritySystem FVC jobid - 96998, tableName-TSTC, updatedTableName-TSTC\n","stream":"stdout","time":"2023-05-10T20:57:58.791589119Z"}
 
2023-05-10T15:57:59-05:00-ecm-worker-{"log":"2023-05-10 20:57:58,826 [quartzScheduler_Worker-5] DEBUG integration.SapDataImportService - No data retrieved from SAP for the SecuritySystem FVC, table TSTC jobid - 96998\n","stream":"stdout","time":"2023-05-10T20:57:58.826411316Z"}
 
2023-05-10T15:57:59-05:00-ecm-worker-{"log":"2023-05-10 20:57:58,826 [quartzScheduler_Worker-5] DEBUG integration.SapDataImportService - No data retrieved from SAP for SecuritySystem FVC, table TSTC jobid - 96998 .. Loading data in saviynt tables\n","stream":"stdout","time":"2023-05-10T20:57:58.826418641Z"}

pj5233
New Contributor III
New Contributor III

I removed the TSTCT table from import and ran it again.  It got further and failed on AGR_TEXTS.  So I removed it and then ran again and it completed successfully.  So it appears to be something in those two tables.  How can I narrow down what record it is breaking on?

aro
Regular Contributor
Regular Contributor

Hi @pj5233,

SAP has enhanced its function module RFC_READ_TABLE by implementing protection against SQL injections. RFC_READ_TABLE only accepts type-conforming WHERE conditions. In older DBI versions, tolerated errors such as LANGU = 'DE' or SPRAS = 'EN' now generate the runtime error SAPSQL_DATA_LOSS. The correct notation for the given example is SPRAS = 'E' or LANGU = 'D'.

I had the same problem and was able to solve it by configuring the Connections field SAPTABLE_FILTER_LANG.
The possible values "E" and "EN" both work for SAP ABAP versions < 750, and only the value "E" works for SAP ABAP versions > 750

 

sai_sp
Saviynt Employee
Saviynt Employee

Thanks @aro 

Yes that’s correct. Please try setting SAPTABLE_FILTER_LANG to E and run the import again. 

pj5233
New Contributor III
New Contributor III

That seems to have worked.  Do I leave the JCO_LANG set to EN or should I change it to E as well?

aro
Regular Contributor
Regular Contributor

I left JCO_LANG on EN

sai_sp
Saviynt Employee
Saviynt Employee

Combination of JCO_LANG as EN and SAPTABLE_FILTER_LANG as E should work.