cancel
Showing results for 
Search instead for 
Did you mean: 

HANA View different data type

11-13-2020 8:33 AM
dusan_smelcer Explorer
917 views 2 comments
0 Likes
SAP Managed Tags
Subscribe

Could you please let me know if there is explanation on this behavior.

I have 2 views - Analytical view (ANV) and Attribute view (ATV) which is used by ANV. I've migrated both of them as copy into Calculation view (CAV). Now when I comparing those views I'm facing below issue.

There is one column 'PRODUCTCODE' originally coming from ATV which is data type NVARCHAR(20) all the way from source table till CAV:

But when I preview the data from CAV and check property of the column in preview pane of Available Attributes then it shows NVARCHAR(18):

Also when I compare data property of Original (ANT) and Migrated (CAV) from _SYS_BI.BIMC_DIMENSION_VIEW then I get different data types:

Any idea if possible to change somehow?

Thank you

Dusan

Technical details:

HANA version: 2.00.047.00.1586595995

Platform: SUSE Linux Enterprise Server 15 SP1

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

dusan_smelcer
Explorer
0 Likes

Hello abhishek_hazra, thank you for suggestion.

Actually the root cause is that the PRODUCTCODE is field from left table joined in Star join node in migrated calculation view and is joined (Referential join, 1..1) to another table via field ARTNR which data type is NVARCHAR (18). I guess therefore it's showing also NVARCHAR (18) for PRODUCTCODE.

Other views behaves same way.

BR, Dusan

Abhishek_Hazra
Active Contributor
0 Likes

Hi Dusan,

You mentioned your ATV is used in another ANV, by any chance you have assigned/modified the data type in that ANV? Else you have 2 options :

1. in the migrated calculation view, you must have the table fields at the very bottom projection/aggregation node. Uncheck the PRODUCTCODE field & check it back again & propagate through semantics. Usually upon unchecking it will invalidate the calculated columns/filter if they are using this field, but they will just be fine when you check it back again.

2. Create a calculated column of NVARCHAR (20) based on the original field, LPAD with 0s if that's what you need.

Best Regards,
Abhi