Skip to Content

Problem with data type uniqueidentifier from MS SQL SERVER using SAP SLT to SAP HANA


Hello friends, i need help

Data inconsistency is occurring from Microsoft SQL Server to SAP HANA through the SLT.

CASE: The table with name: EstadosConsolidadosPedidos located in the Microsoft SQL Server database with name: ControlDespachos. The fields in the table are:

The error is presented in the field ListId_State, the data type is uniqueidentifier, when the table is replicated in SAP HANA by means of the SLT, the field data is changed.

Sample data from Microsoft SQL Server:

In origin the data is: 0F6F400A-C63F-4918-9DA0-AD080CB1CAB2

The table fields in SAP HANA are:

The field ListId_State arrives with data type VARBINARY, but the data changes:

In the destination the data is: 0A406F0F3FC618499DA0AD080CB1CAB2

Note: A test was performed, the data type was changed to NVARCHAR in HANA, but the result was the same

Environments:

SAP HANA: 1.00.122.16.1520578817

SAP SLT 7.5

MS SQL: SQL Server 2012 Standard SP4

1.png (112.9 kB)
2.png (42.8 kB)
3.png (93.4 kB)
4.png (39.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • By default the data type UNIQUEIDENTIFIER is converted to RAW(16). If you need to keep the this field as a string you should not change it directly in HDB. The converstion happens already on SLT cerntal system. You have to customize the table in LTRS, where you can set the desirable data type for every field. I think that in this case the conversion witll work correctly.

  • Follow
  • Get RSS Feed

4 Answers

  • Nov 26, 2018 at 02:20 PM

    Hello, thanks for answering. We made the change as you indicate, but the data keeps coming different.


    1.png (39.5 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • Nov 26, 2018 at 10:21 PM

    Hi Samuel,

    After doing change to structure,did you done load and replicate ?

    Best Regards,

    Atul

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 27, 2018 at 05:46 PM

    Hello Atul, thanks for answering.

    The data was loaded and replicated, but the ListId_State field continues to arrive differently in HANA.

    Add comment
    10|10000 characters needed characters exceeded

    • hmm, I think it happens while the data comes into the SLT in some strange format. I did a small test in my own test system and found that data comes into HDB looks so:

      I have found a way when it works correctly as you want. I have to do follow steps:

      1. you have to create view with select from your table where the field LISTAID_ESTADO will be converted to, for example, varchar(50) data type.

      2. in LTRS setting for the table under settings "Table Settings" fill the parameters "View for Initial Load" and "View for Replication" with newly created view

      3. restart replication

      Alternative could be create a rule with conversion the GUID in correct format on fly, but I have no idea what is rule for this conversion :(

  • Nov 28, 2018 at 01:57 PM

    Hello Andrey, thanks for answering. You are right, if we knew what the rule is, we would even apply it directly to HANA, but I do not know what the rule is. The funny thing is that apparently the same rule always applies

    Add comment
    10|10000 characters needed characters exceeded