Some SAP columns contain NULL instead of the expected value

Some SAP columns contain NULL instead of the expected value

book

Article ID: KB0080174

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization v7.0.0 and higher

Description

When running a query on a SAP data source, the results of the query show that some SAP columns contain a NULL instead of the expected value. The cs_server.log file contains entries of  the type:
SAPResult - Warning : Error parsing value '*00', SAP type 'I' (CIS type 265) in table 'CustomerData' row '58932' column 'A'

Issue/Introduction

Some SAP columns contain NULL instead of the expected value

Resolution

This error is caused by a known bug in SAP's RFC_READ_TABLE (this is the SAP table that TDV queries to get the data). The bug causes RFC_READ_TABLE to truncate the value in DECIMAL columns, in turn resulting in the following message in the logs:

INFO [Thread-5839] 2018-10-22 21:48:47.149 +0100 SAPResult - Warning : Error parsing value '*00', SAP type 'I' (CIS type 265) in table 'CustomerData' row '58932' column 'A': 

In the above error message, the asterisk sign * prefixing the value 00 means that TDV received a truncated value from RFC_READ_TABLE.

Since this is a SAP-side limitation, it needs to be resolved on the SAP server. The resolution is to have your SAP administrator install YRFC_READ_TABLE, and then  configure TDV to use YRFC_READ_TABLE (instead of RFC_READ_TABLE). The details are in the TDV Adapters guide, and the relevant section of the guide is below:

-----------------------------------------------------------
Some data in decimal columns (known as P (ABAP), Packed, BCD (Binary Coded Decimal), and DEC) appears as DECIMAL with native type Px.y, where x is the number of digits and y is the number of decimal places. DECIMAL(9,5) truncates positive numbers greater than 999.99999 and negative numbers less than -99.99999 because they exceed the nine characters allocated for the field. (YRFC_READ_TABLE can resolve this limitation.)

To avoid returning silently incorrect data, the SAP Adapter raises an error when it encounters rows that contain truncated values. TDV recommends using YRFC_READ_TABLE for your SAP data source whenever possible.

SAP note 758278 provides an implementation of YRFC_READ_TABLE that addresses decimal issues. To apply this fix, install the YRFC_READ_TABLE
function module on SAP, then modify the following three advanced data source properties:

- Table read function: YRFC_READ_TABLE
- Table row length: 4010
- Table decimal fix: Checked
-----------------------------------------------------------

If you are unable to obtain SAP note 758278, please contact Technical Support for assistance.