cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Andrey_M
Advisor
Advisor
0 Kudos

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.

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

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

0 Kudos

Hello Atul, thanks for answering.

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

Andrey_M
Advisor
Advisor
0 Kudos

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 😞

AtulKumarJain
Active Contributor
0 Kudos

Hi Samuel,

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

Best Regards,

Atul

0 Kudos

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