Skip to Content

Text is corrupted by DI API, is there a way of getting the actual text value via DI API for HANA?

I’m having trouble reading the value of a “Text” thing in SAP B1 HANA via the DI API. There is a large XML report in a field called “RawData”, some 800Mbytes in length. Due to DI restrictions, it is only possible to query the value in chunks using ‘substring’ in SQL.

When reading a 10000 character chunk, my VB.NET debug environment suggests that the field only has around 9800 odd characters in it. Generally the deficit is the same number as the number of carriage returns in the document. Sometimes the number of chars is slightly less, which I suspect is related to additional white space trimming.

My working hypothesis is that DI treats some (perhaps all) string results by converting them to have Linux style line endings, and then trims whitespace. Since I’m unable to read the data via DI in a single chunk of data, this cooking of the data can break my XML document (lacking space between attributes).

My SAP B1 UDF type is listed as “Alphanumeric” with structure “Text”. In HANA, we have SQL Data Type “NCLOB” with Column Store Data Type “LOB”.

The troublesome query is as simple as:

SELECT SUBSTRING(\"U_RawData\",1,10000) as \"RawData\" FROM “@CSREPORTS”

Since the data cooking is not visible inn SAP HANA STUDIO, I’m presuming that it is a fault in either the HANA Session set up by DI, or some program within DI itself.

Is there any way to configure an open DI session in HANA so that Textual data does not get altered, and ends up in Recordset Fields in full?

Also, is this a bug in SAP DI for HANA?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 15, 2017 at 11:00 AM

    In HANA you should not handle the DB logic on the application layer.

    I.e, the substring, query on top of tables and others, should be handled by a Graphic Calculation view.

    It seems that amount of data you are trying to store it's beyond HANA limits. You should use a BLOB column to handle that amount of data.

    Add comment
    10|10000 characters needed characters exceeded