SAP Knowledge Base Article - Preview

3386808 - Unexpected result when replace_regexpr and :PRINT: is used in a HANA transformation


As outlined in the consulting notes:

0001151294    Invalid Characters in Characteristic Values
0001075403    Unallowed characters and ALL_CAPITAL

There is a set of characteristic values, which are not valid within BW. Therefore the HANA function REPLACE_REGEXPR is a good way to look for such invalid characters and eliminate them (convert them to spaces). However if the Character class [:PRINT:] is used, it also removes the textual part of the values, and not just the unwanted ones. This happens typically if the values contain for example Chinese, Japanese, Cyrillic, etc characters.

For example the function is used in the following way:

replace_regexpr( '([^[:print:]]|[#|!])' in "T1" with ' ' occurrence all ) as T1,
replace_regexpr( '([^[:print:]]|[#|!])' in "T2" with ' ' occurrence all ) as T2,
replace_regexpr( '([^[:print:]]|[#|!])' in "T3" with ' ' occurrence all ) as T3,
replace_regexpr( '([^[:print:]]|[#|!])' in "T4" with ' ' occurrence all ) as T4
'祝你今天愉快 Aabc123' as T1,
'Приємного дня! Aabc123' as T2,
'良い一日を Aabc123' as T3,
'Have a nice day Aabc123' as T4
FROM dummy)

then the result is:



  • SAP BW/4HANA 1.00
  • SAP BW/4HANA 2.00
  • SAP BW/4HANA 2021
  • SAP Netweaver 7.50 on HANA
  • SAP BW 7.5x on HANA


SAP BW/4HANA all versions ; SAP NetWeaver 7.5


regular expression, invalid character, elimination, HEX 00 HEX 1F , KBA , BW4-DM-TRFN , SAP HANA execution in Transformation and DTP , BW-WHM-DST-DTP , Data Transfer Process , BW4-DM-DTP , ABAP Orchestration of Data Transfer Process , BW-WHM-DST-TRF , Transformation , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.